Skip to content

Commit

Permalink
Merge pull request #74 from Eficaz-Sistemas/master
Browse files Browse the repository at this point in the history
Release 6.1.6
  • Loading branch information
HClausing committed Sep 26, 2023
2 parents 3cdd496 + ba95a33 commit a541f00
Show file tree
Hide file tree
Showing 34 changed files with 513 additions and 204 deletions.
Binary file modified Assets/Blazor/MdiHost.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.6.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.6.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.7.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<Version>6.1.5</Version>
<AssemblyVersion>6.1.5.0</AssemblyVersion>
<FileVersion>6.1.5.0</FileVersion>
<Version>6.1.6</Version>
<AssemblyVersion>6.1.6.0</AssemblyVersion>
<FileVersion>6.1.6.0</FileVersion>
<RootNamespace>EficazFramework</RootNamespace>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>EfCore.snk</AssemblyOriginatorKeyFile>
Expand Down
10 changes: 5 additions & 5 deletions src/Core/EficazFramework.Data/EficazFramework.Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!--in Memory of Laudo Ferreira da Silva and Francisco Luis de Sousa † 2020-->
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<Version>6.1.5</Version>
<AssemblyVersion>6.1.5.0</AssemblyVersion>
<FileVersion>6.1.5.0</FileVersion>
<Version>6.1.6</Version>
<AssemblyVersion>6.1.6.0</AssemblyVersion>
<FileVersion>6.1.6.0</FileVersion>
<RootNamespace>EficazFramework</RootNamespace>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>EfCore.snk</AssemblyOriginatorKeyFile>
Expand Down Expand Up @@ -90,8 +90,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.11" />
<PackageReference Include="System.Security.Permissions" Version="7.0.0" />
<PackageReference Include="DefaultDocumentation" Version="0.8.2">
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<Version>6.1.5</Version>
<AssemblyVersion>6.1.5.0</AssemblyVersion>
<FileVersion>6.1.5.0</FileVersion>
<Version>6.1.6</Version>
<AssemblyVersion>6.1.6.0</AssemblyVersion>
<FileVersion>6.1.6.0</FileVersion>
<RootNamespace>EficazFramework</RootNamespace>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>EfCore.snk</AssemblyOriginatorKeyFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ namespace EficazFramework.Application;

public class ApplicationDefinition
{
public const string STARTWINDOWSTATE = "StartWindowState";

// Metadata
public string? Title { get; set; }
public string? LongTitle { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,18 +215,7 @@ private void AddTargetProperties(IDictionary<string, ApplicationTarget> sourceTa
{
foreach (var sourceTarget in sourceTargets)
{
ApplicationTarget appTarget = new()
{
Icon = sourceTarget.Value.Icon,
InitialSize = sourceTarget.Value.InitialSize,
SplashScreen = sourceTarget.Value.SplashScreen,
StartupUriOrType = sourceTarget.Value.StartupUriOrType
};
foreach (var item in sourceTarget.Value.Properties)
{
appTarget.Properties.Add(item.Key, item.Value);
}
Targets.Add(sourceTarget.Key, appTarget);
Targets.Add(sourceTarget);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace EficazFramework.Application;

[ExcludeFromCodeCoverage]
public class ApplicationTarget
public abstract class ApplicationTarget
{
/// <summary>
/// Informações de inicialização da aplicação
Expand All @@ -32,7 +32,7 @@ public class ApplicationTarget
/// <summary>
/// Ativo Visual de inicialização/carregamento do aplicativo
/// </summary>
public Size InitialSize { get; set; } = new(250, 200);
public Size InitialSize { get; set; } = new(425, 200);


/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!--in Memory of Laudo Ferreira da Silva and Francisco Luis de Sousa † 2020-->
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<Version>6.1.5</Version>
<AssemblyVersion>6.1.5.0</AssemblyVersion>
<FileVersion>6.1.5.0</FileVersion>
<Version>6.1.6</Version>
<AssemblyVersion>6.1.6.0</AssemblyVersion>
<FileVersion>6.1.6.0</FileVersion>
<Nullable>enable</Nullable>
<RootNamespace>EficazFramework</RootNamespace>
<Authors>Eficaz Sistemas</Authors>
Expand Down Expand Up @@ -72,7 +72,7 @@
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="7.0.5" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="7.0.11" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<Version>6.1.5</Version>
<AssemblyVersion>6.1.5.0</AssemblyVersion>
<FileVersion>6.1.5.0</FileVersion>
<Version>6.1.6</Version>
<AssemblyVersion>6.1.6.0</AssemblyVersion>
<FileVersion>6.1.6.0</FileVersion>
<RootNamespace>EficazFramework</RootNamespace>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>EfCore.snk</AssemblyOriginatorKeyFile>
Expand Down Expand Up @@ -56,7 +56,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.11" />
<PackageReference Include="DefaultDocumentation" Version="0.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<Version>6.1.5</Version>
<AssemblyVersion>6.1.5.0</AssemblyVersion>
<FileVersion>6.1.5.0</FileVersion>
<Version>6.1.6</Version>
<AssemblyVersion>6.1.6.0</AssemblyVersion>
<FileVersion>6.1.6.0</FileVersion>
<RootNamespace>EficazFramework</RootNamespace>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>EfCore.snk</AssemblyOriginatorKeyFile>
Expand Down Expand Up @@ -56,7 +56,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.11" />
<PackageReference Include="DefaultDocumentation" Version="0.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<Version>6.1.5</Version>
<AssemblyVersion>6.1.5.0</AssemblyVersion>
<FileVersion>6.1.5.0</FileVersion>
<Version>6.1.6</Version>
<AssemblyVersion>6.1.6.0</AssemblyVersion>
<FileVersion>6.1.6.0</FileVersion>
<RootNamespace>EficazFramework</RootNamespace>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>EfCore.snk</AssemblyOriginatorKeyFile>
Expand Down Expand Up @@ -54,7 +54,7 @@
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="MySql.EntityFrameworkCore" Version="7.0.2" />
<PackageReference Include="MySql.EntityFrameworkCore" Version="7.0.5" />
<PackageReference Include="DefaultDocumentation" Version="0.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<Version>6.1.5</Version>
<AssemblyVersion>6.1.5.0</AssemblyVersion>
<FileVersion>6.1.5.0</FileVersion>
<Version>6.1.6</Version>
<AssemblyVersion>6.1.6.0</AssemblyVersion>
<FileVersion>6.1.6.0</FileVersion>
<RootNamespace>EficazFramework</RootNamespace>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>EfCore.snk</AssemblyOriginatorKeyFile>
Expand Down Expand Up @@ -48,7 +48,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.11" />
<PackageReference Include="DefaultDocumentation" Version="0.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
namespace EficazFramework.Application;

public static class ApplicationDefinitionHelpers
{
public static WpfApplicationTarget Wpf([NotNull] this ApplicationDefinition applicationDefinition) =>
(WpfApplicationTarget)applicationDefinition.Targets["WPF"];


}


/// <summary>
/// Wrapper class for <see cref="EficazFramework.Application.ApplicationTarget.Properties"/> parameters for Blazor target.
/// </summary>
public sealed class WpfApplicationTarget : ApplicationTarget
{
public WindowState StartWindowState
{
get
{
if (!Properties.ContainsKey("StartWindowState"))
Properties["StartWindowState"] = WindowState.Normal;
return (WindowState)Properties["StartWindowState"];
}
set => Properties["StartWindowState"] = value;
}

//public bool Resizable
//{
// get
// {
// if (!Properties.ContainsKey("Resizable"))
// Properties["Resizable"] = true;
// return (bool)Properties["Resizable"];
// }
// set => Properties["Resizable"] = value;
//}


public int OffsetX
{
get
{
if (!Properties.ContainsKey("OffsetX"))
Properties["OffsetX"] = 15;
return (int)Properties["OffsetX"];
}

set => Properties["OffsetX"] = value;
}

public int OffsetY
{
get
{
if (!Properties.ContainsKey("OffsetY"))
Properties["OffsetY"] = 15;
return (int)Properties["OffsetY"];
}
set => Properties["OffsetY"] = value;
}


public int Width
{
get
{
if (!Properties.ContainsKey("Width"))
Properties["Width"] = 425;
return (int)Properties["Width"];
}
set => Properties["Width"] = value;
}

public int Height
{
get
{
if (!Properties.ContainsKey("Height"))
Properties["Height"] = 200;
return (int)Properties["Height"];
}
set => Properties["Height"] = value;
}


public int ZIndex
{
get
{
if (!Properties.ContainsKey("ZIndex"))
Properties["ZIndex"] = 1;
return (int)Properties["ZIndex"];
}
internal set => Properties["ZIndex"] = value;
}


}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections;
using EficazFramework.Application;
using System.Collections;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Controls.Primitives;

Expand All @@ -22,7 +22,7 @@ public static void SetApplicationDefinition(DependencyObject obj, Application.Ap

public object CustomTaskBarLeftContent
{
get => (object)GetValue(CustomTaskBarLeftContentProperty);
get => GetValue(CustomTaskBarLeftContentProperty);
set => SetValue(CustomTaskBarLeftContentProperty, value);
}
public static readonly DependencyProperty CustomTaskBarLeftContentProperty =
Expand All @@ -39,7 +39,7 @@ public DataTemplate CustomTaskBarLeftContentTemplate

public object CustomTaskBarRightContent
{
get { return (object)GetValue(CustomTaskBarRightContentProperty); }
get { return GetValue(CustomTaskBarRightContentProperty); }
set { SetValue(CustomTaskBarRightContentProperty, value); }
}
public static readonly DependencyProperty CustomTaskBarRightContentProperty =
Expand Down Expand Up @@ -121,8 +121,8 @@ protected override void PrepareContainerForItemOverride(DependencyObject element
{
window.AppDefinition = appinfo;
window.Title = appinfo.LongTitle ?? appinfo.Title;
window.WindowState = (WindowState)(appinfo.Targets["WPF"].Properties[Application.ApplicationDefinition.STARTWINDOWSTATE] ?? WindowState.Normal);
target = (UIElement)(appinfo.Content ?? appinfo.Targets["WPF"].SplashScreen);
window.WindowState = appinfo.Wpf().StartWindowState;
target = (UIElement)(appinfo.Content ?? appinfo.Wpf().SplashScreen);
}
else
{
Expand Down Expand Up @@ -318,7 +318,8 @@ public static async void LoadApplication(Application.ApplicationInstance item)
try
{
await Task.Delay(1000);
UIElement app = await System.Windows.Application.Current.Dispatcher.InvokeAsync(() => System.Windows.Application.LoadComponent(new Uri(item.Targets["WPF"].StartupUriOrType.ToString(), UriKind.RelativeOrAbsolute)) as UIElement);
UIElement app = await System.Windows.Application.Current.Dispatcher.InvokeAsync(() =>
System.Windows.Application.LoadComponent(new Uri(item.Wpf().StartupUriOrType.ToString(), UriKind.RelativeOrAbsolute)) as UIElement);
if (app != null) item.Content = app;
item.IsLoading = false;
}
Expand Down
Loading

0 comments on commit a541f00

Please sign in to comment.