manager: migrate base project structure & deps
This commit is contained in:
@@ -1,24 +1,20 @@
|
||||
using ModpackUpdater.Apps.Manager;
|
||||
using Pilz.UI.WinForms.Telerik.Dialogs;
|
||||
using Pilz.UI.WinForms.Telerik.Symbols;
|
||||
using Pilz.UI.WinForms.Telerik.Theming;
|
||||
using Telerik.WinControls.Themes;
|
||||
using Pilz.UI.AvaloniaUI.Symbols;
|
||||
|
||||
namespace ModpackUpdater.Apps;
|
||||
|
||||
public static class AppGlobals
|
||||
{
|
||||
public static IRadSymbolFactory<AppSymbols> Symbols { get; } = new AppSymbolFactory();
|
||||
public static ISymbolFactory<AppSymbols> Symbols { get; } = new AppSymbolFactory();
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
ThemeHelper.ApplyApplicationTheme(new ThemeDefinition(ApplicationTheme.Auto, HighContrastMode.Auto), n => n.Theme switch
|
||||
{
|
||||
ApplicationTheme.Light => new Windows11CompactTheme(),
|
||||
ApplicationTheme.Gray or ApplicationTheme.Dark => new Windows11CompactDarkTheme(),
|
||||
_ => throw new NotImplementedException(),
|
||||
});
|
||||
RadFlyoutBase.ConfirmSvg = Symbols.GetSvgImage(AppSymbols.checkmark, Pilz.UI.Symbols.SymbolSize.Small);
|
||||
RadFlyoutBase.CancelSvg = Symbols.GetSvgImage(AppSymbols.cancel, Pilz.UI.Symbols.SymbolSize.Small);
|
||||
// ThemeHelper.ApplyApplicationTheme(new ThemeDefinition(ApplicationTheme.Auto, HighContrastMode.Auto), n => n.Theme switch
|
||||
// {
|
||||
// ApplicationTheme.Light => new Windows11CompactTheme(),
|
||||
// ApplicationTheme.Gray or ApplicationTheme.Dark => new Windows11CompactDarkTheme(),
|
||||
// _ => throw new NotImplementedException(),
|
||||
// });
|
||||
// RadFlyoutBase.ConfirmSvg = Symbols.GetSvgImage(AppSymbols.checkmark, Pilz.UI.Symbols.SymbolSize.Small);
|
||||
// RadFlyoutBase.CancelSvg = Symbols.GetSvgImage(AppSymbols.cancel, Pilz.UI.Symbols.SymbolSize.Small);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using Pilz.UI.WinForms.Telerik.Symbols;
|
||||
using System.Reflection;
|
||||
using System.Reflection;
|
||||
using Pilz.UI.AvaloniaUI.Symbols;
|
||||
|
||||
namespace ModpackUpdater.Apps.Manager;
|
||||
namespace ModpackUpdater.Apps;
|
||||
|
||||
internal class AppSymbolFactory : RadSymbolFactory<AppSymbols>
|
||||
internal class AppSymbolFactory : SymbolFactory<AppSymbols>
|
||||
{
|
||||
public override Assembly GetImageResourceAssembly()
|
||||
{
|
||||
|
||||
@@ -1,20 +1,33 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
|
||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AvaloniaResource Include="Assets\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Symbols\*.svg" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pilz" Version="2.6.1" />
|
||||
<PackageReference Include="Pilz.UI" Version="3.1.1" />
|
||||
<PackageReference Include="Pilz.UI.WinForms.Telerik.Symbols" Version="1.2.1" />
|
||||
<PackageReference Include="UI.for.WinForms.Common" Version="2025.3.812" />
|
||||
<PackageReference Include="UI.for.WinForms.Themes" Version="2025.3.812" />
|
||||
<PackageReference Include="Pilz.UI.AvaloniaUI" Version="1.2.0" />
|
||||
<PackageReference Include="Avalonia" Version="11.3.8" />
|
||||
<PackageReference Include="Avalonia.Desktop" Version="11.3.8" />
|
||||
<PackageReference Include="Avalonia.Svg" Version="11.3.0" />
|
||||
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.3.8" />
|
||||
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.3.8" />
|
||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||
<PackageReference Include="Avalonia.Diagnostics" Version="11.3.8">
|
||||
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
|
||||
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user