more refactoring
This commit is contained in:
2
ModpackUpdater.Apps.Client/Form1.Designer.cs
generated
2
ModpackUpdater.Apps.Client/Form1.Designer.cs
generated
@@ -3,7 +3,7 @@ using System.Diagnostics;
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace ModpackUpdater
|
namespace ModpackUpdater.Apps.Client
|
||||||
{
|
{
|
||||||
[Microsoft.VisualBasic.CompilerServices.DesignerGenerated()]
|
[Microsoft.VisualBasic.CompilerServices.DesignerGenerated()]
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
using ModpackUpdater.Apps.Client;
|
using ModpackUpdater.Manager;
|
||||||
using ModpackUpdater.Manager;
|
|
||||||
using ModpackUpdater.My.Resources;
|
using ModpackUpdater.My.Resources;
|
||||||
using Pilz.UI.Symbols;
|
using Pilz.UI.Symbols;
|
||||||
using Pilz.UI.Telerik;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Telerik.WinControls;
|
using Telerik.WinControls;
|
||||||
using Telerik.WinControls.UI;
|
using Telerik.WinControls.UI;
|
||||||
|
|
||||||
namespace ModpackUpdater;
|
namespace ModpackUpdater.Apps.Client;
|
||||||
|
|
||||||
public partial class Form1
|
public partial class Form1
|
||||||
{
|
{
|
||||||
@@ -35,12 +33,12 @@ public partial class Form1
|
|||||||
|
|
||||||
Text = $"{Text} (v{Assembly.GetExecutingAssembly().GetName().Version})";
|
Text = $"{Text} (v{Assembly.GetExecutingAssembly().GetName().Version})";
|
||||||
|
|
||||||
RadButton_Install.SvgImage = AppSymbolFactory.Instance.GetSvgImage(AppSymbols.software_installer, SymbolSize.Small);
|
RadButton_Install.SvgImage = AppGlobals.Symbols.GetSvgImage(AppSymbols.software_installer, SymbolSize.Small);
|
||||||
RadButton_CheckForUpdates.SvgImage = AppSymbolFactory.Instance.GetSvgImage(AppSymbols.update_done, SymbolSize.Small);
|
RadButton_CheckForUpdates.SvgImage = AppGlobals.Symbols.GetSvgImage(AppSymbols.update_done, SymbolSize.Small);
|
||||||
radButton_RefreshConfig.SvgImage = AppSymbolFactory.Instance.GetSvgImage(AppSymbols.refresh, SymbolSize.Small);
|
radButton_RefreshConfig.SvgImage = AppGlobals.Symbols.GetSvgImage(AppSymbols.refresh, SymbolSize.Small);
|
||||||
RadButton_SearchMinecraftProfileFolder.SvgImage = AppSymbolFactory.Instance.GetSvgImage(AppSymbols.opened_folder, SymbolSize.Small);
|
RadButton_SearchMinecraftProfileFolder.SvgImage = AppGlobals.Symbols.GetSvgImage(AppSymbols.opened_folder, SymbolSize.Small);
|
||||||
radButton_PasteInstallKey.SvgImage = AppSymbolFactory.Instance.GetSvgImage(AppSymbols.paste, SymbolSize.Small);
|
radButton_PasteInstallKey.SvgImage = AppGlobals.Symbols.GetSvgImage(AppSymbols.paste, SymbolSize.Small);
|
||||||
RadButton_PasteModpackConfig.SvgImage = AppSymbolFactory.Instance.GetSvgImage(AppSymbols.paste, SymbolSize.Small);
|
RadButton_PasteModpackConfig.SvgImage = AppGlobals.Symbols.GetSvgImage(AppSymbols.paste, SymbolSize.Small);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadMinecraftProfile(string folderPath)
|
private void LoadMinecraftProfile(string folderPath)
|
||||||
@@ -108,7 +106,7 @@ public partial class Form1
|
|||||||
|
|
||||||
if (modpackInfo == null || string.IsNullOrWhiteSpace(RadTextBoxControl_MinecraftProfileFolder.Text) /*|| modpackInfo.Valid*/)
|
if (modpackInfo == null || string.IsNullOrWhiteSpace(RadTextBoxControl_MinecraftProfileFolder.Text) /*|| modpackInfo.Valid*/)
|
||||||
{
|
{
|
||||||
SetStatus(LangRes.StatusText_MinecraftProfileWarning, AppSymbolFactory.Instance.GetSvgImage(AppSymbols.general_warning_sign, SymbolSize.Small));
|
SetStatus(LangRes.StatusText_MinecraftProfileWarning, AppGlobals.Symbols.GetSvgImage(AppSymbols.general_warning_sign, SymbolSize.Small));
|
||||||
RadButton_PasteModpackConfig.Enabled = false;
|
RadButton_PasteModpackConfig.Enabled = false;
|
||||||
radButton_PasteInstallKey.Enabled = false;
|
radButton_PasteInstallKey.Enabled = false;
|
||||||
RadButton_CheckForUpdates.Enabled = false;
|
RadButton_CheckForUpdates.Enabled = false;
|
||||||
@@ -117,7 +115,7 @@ public partial class Form1
|
|||||||
}
|
}
|
||||||
else if (updateConfig == null || string.IsNullOrWhiteSpace(RadTextBoxControl_ModpackConfig.Text))
|
else if (updateConfig == null || string.IsNullOrWhiteSpace(RadTextBoxControl_ModpackConfig.Text))
|
||||||
{
|
{
|
||||||
SetStatus(LangRes.StatusText_ConfigIncompleteOrNotLoaded, AppSymbolFactory.Instance.GetSvgImage(AppSymbols.general_warning_sign, SymbolSize.Small));
|
SetStatus(LangRes.StatusText_ConfigIncompleteOrNotLoaded, AppGlobals.Symbols.GetSvgImage(AppSymbols.general_warning_sign, SymbolSize.Small));
|
||||||
RadButton_PasteModpackConfig.Enabled = true;
|
RadButton_PasteModpackConfig.Enabled = true;
|
||||||
radButton_PasteInstallKey.Enabled = false;
|
radButton_PasteInstallKey.Enabled = false;
|
||||||
RadButton_CheckForUpdates.Enabled = false;
|
RadButton_CheckForUpdates.Enabled = false;
|
||||||
@@ -126,7 +124,7 @@ public partial class Form1
|
|||||||
}
|
}
|
||||||
else if (updateConfig.Maintenance && !updateOptions.IgnoreMaintenance)
|
else if (updateConfig.Maintenance && !updateOptions.IgnoreMaintenance)
|
||||||
{
|
{
|
||||||
SetStatus(LangRes.StatusText_Maintenance, AppSymbolFactory.Instance.GetSvgImage(AppSymbols.services, SymbolSize.Small));
|
SetStatus(LangRes.StatusText_Maintenance, AppGlobals.Symbols.GetSvgImage(AppSymbols.services, SymbolSize.Small));
|
||||||
RadButton_PasteModpackConfig.Enabled = true;
|
RadButton_PasteModpackConfig.Enabled = true;
|
||||||
radButton_PasteInstallKey.Enabled = true;
|
radButton_PasteInstallKey.Enabled = true;
|
||||||
RadButton_CheckForUpdates.Enabled = false;
|
RadButton_CheckForUpdates.Enabled = false;
|
||||||
@@ -149,28 +147,28 @@ public partial class Form1
|
|||||||
|
|
||||||
void error()
|
void error()
|
||||||
{
|
{
|
||||||
SetStatus(LangRes.StatusText_ErrorWhileUpdateCheckOrUpdate, AppSymbolFactory.Instance.GetSvgImage(AppSymbols.close, SymbolSize.Small));
|
SetStatus(LangRes.StatusText_ErrorWhileUpdateCheckOrUpdate, AppGlobals.Symbols.GetSvgImage(AppSymbols.close, SymbolSize.Small));
|
||||||
currentUpdating = false;
|
currentUpdating = false;
|
||||||
}
|
}
|
||||||
void installing()
|
void installing()
|
||||||
{
|
{
|
||||||
SetStatus(LangRes.StatusText_Installing, AppSymbolFactory.Instance.GetSvgImage(AppSymbols.software_installer, SymbolSize.Small));
|
SetStatus(LangRes.StatusText_Installing, AppGlobals.Symbols.GetSvgImage(AppSymbols.software_installer, SymbolSize.Small));
|
||||||
currentUpdating = true;
|
currentUpdating = true;
|
||||||
}
|
}
|
||||||
void updatesAvailable()
|
void updatesAvailable()
|
||||||
{
|
{
|
||||||
SetStatus(LangRes.StatusText_UpdateAvailable, AppSymbolFactory.Instance.GetSvgImage(AppSymbols.software_installer, SymbolSize.Small));
|
SetStatus(LangRes.StatusText_UpdateAvailable, AppGlobals.Symbols.GetSvgImage(AppSymbols.software_installer, SymbolSize.Small));
|
||||||
}
|
}
|
||||||
void everythingOk()
|
void everythingOk()
|
||||||
{
|
{
|
||||||
SetStatus(LangRes.StatusTest_EverythingOk, AppSymbolFactory.Instance.GetSvgImage(AppSymbols.done, SymbolSize.Small));
|
SetStatus(LangRes.StatusTest_EverythingOk, AppGlobals.Symbols.GetSvgImage(AppSymbols.done, SymbolSize.Small));
|
||||||
currentUpdating = false;
|
currentUpdating = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check only if not pressed "install", not really needed otherwise.
|
// Check only if not pressed "install", not really needed otherwise.
|
||||||
if (lastUpdateCheckResult is null || !doInstall)
|
if (lastUpdateCheckResult is null || !doInstall)
|
||||||
{
|
{
|
||||||
SetStatus(LangRes.StatusText_CheckingForUpdates, AppSymbolFactory.Instance.GetSvgImage(AppSymbols.update_done, SymbolSize.Small));
|
SetStatus(LangRes.StatusText_CheckingForUpdates, AppGlobals.Symbols.GetSvgImage(AppSymbols.update_done, SymbolSize.Small));
|
||||||
|
|
||||||
// Check for extras once again
|
// Check for extras once again
|
||||||
updateOptions.IncludeExtras = features.IsEnabled(ModpackFeatures.FeatureAllowExtas, new AllowExtrasFeatureContext(modpackInfo));
|
updateOptions.IncludeExtras = features.IsEnabled(ModpackFeatures.FeatureAllowExtas, new AllowExtrasFeatureContext(modpackInfo));
|
||||||
@@ -239,12 +237,12 @@ public partial class Form1
|
|||||||
private void Update_InstallProgessUpdated(UpdateCheckResult result, int processedSyncs)
|
private void Update_InstallProgessUpdated(UpdateCheckResult result, int processedSyncs)
|
||||||
{
|
{
|
||||||
int actionCount = result.Actions.Count;
|
int actionCount = result.Actions.Count;
|
||||||
SetStatus(Math.Round(processedSyncs / (double)actionCount * 100d, 1) + "%", AppSymbolFactory.Instance.GetSvgImage(AppSymbols.software_installer, SymbolSize.Small));
|
SetStatus(Math.Round(processedSyncs / (double)actionCount * 100d, 1) + "%", AppGlobals.Symbols.GetSvgImage(AppSymbols.software_installer, SymbolSize.Small));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Updated_CheckingProgresssUpdated(int toCheck, int processed)
|
private void Updated_CheckingProgresssUpdated(int toCheck, int processed)
|
||||||
{
|
{
|
||||||
SetStatus(Math.Round(processed / (double)toCheck * 100d, 1) + "%", AppSymbolFactory.Instance.GetSvgImage(AppSymbols.update_done, SymbolSize.Small));
|
SetStatus(Math.Round(processed / (double)toCheck * 100d, 1) + "%", AppGlobals.Symbols.GetSvgImage(AppSymbols.update_done, SymbolSize.Small));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonX_SearchMinecraftProfile_Click(object sender, EventArgs e)
|
private void ButtonX_SearchMinecraftProfile_Click(object sender, EventArgs e)
|
||||||
@@ -300,7 +298,7 @@ public partial class Form1
|
|||||||
var updater = new AppUpdater();
|
var updater = new AppUpdater();
|
||||||
if (!updateOptions.NoUpdate && await updater.Check() && RadMessageBox.Show(LangRes.MsgBox_UpdateAvailable, LangRes.MsgBox_UpdateAvailable_Title, MessageBoxButtons.YesNo, RadMessageIcon.Info) == DialogResult.Yes)
|
if (!updateOptions.NoUpdate && await updater.Check() && RadMessageBox.Show(LangRes.MsgBox_UpdateAvailable, LangRes.MsgBox_UpdateAvailable_Title, MessageBoxButtons.YesNo, RadMessageIcon.Info) == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
SetStatus(LangRes.StatusText_InstallingAppUpdate, AppSymbolFactory.Instance.GetSvgImage(AppSymbols.software_installer, SymbolSize.Small));
|
SetStatus(LangRes.StatusText_InstallingAppUpdate, AppGlobals.Symbols.GetSvgImage(AppSymbols.software_installer, SymbolSize.Small));
|
||||||
Enabled = false;
|
Enabled = false;
|
||||||
await updater.Install();
|
await updater.Install();
|
||||||
Application.Restart();
|
Application.Restart();
|
||||||
|
|||||||
@@ -11,14 +11,6 @@
|
|||||||
<Version>1.5.2.2</Version>
|
<Version>1.5.2.2</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<None Remove="CustomThemes\Office2019DarkBluePurple.tssp" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<EmbeddedResource Include="CustomThemes\Office2019DarkBluePurple.tssp" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Update="FiledialogFilters.Designer.cs">
|
<Compile Update="FiledialogFilters.Designer.cs">
|
||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
@@ -57,12 +49,9 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\ModpackUpdater.Apps\ModpackUpdater.Apps.csproj" />
|
||||||
<ProjectReference Include="..\ModpackUpdater.Manager\ModpackUpdater.Manager.csproj" />
|
<ProjectReference Include="..\ModpackUpdater.Manager\ModpackUpdater.Manager.csproj" />
|
||||||
<ProjectReference Include="..\ModpackUpdater\ModpackUpdater.csproj" />
|
<ProjectReference Include="..\ModpackUpdater\ModpackUpdater.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<EmbeddedResource Include="Symbols\*.svg" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -44,8 +44,10 @@ public static class Program
|
|||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
Application.SetHighDpiMode(HighDpiMode.PerMonitorV2);
|
Application.SetHighDpiMode(HighDpiMode.PerMonitorV2);
|
||||||
|
AppGlobals.Initialize();
|
||||||
|
|
||||||
if (ThemeResolutionService.LoadPackageResource("ModpackUpdater.CustomThemes.Office2019DarkBluePurple.tssp"))
|
// Keep old theme for now, it looks a bit better
|
||||||
|
if (ThemeResolutionService.LoadPackageResource($"{typeof(AppGlobals).Namespace}.CustomThemes.Office2019DarkBluePurple.tssp"))
|
||||||
ThemeResolutionService.ApplicationThemeName = "Office2019DarkBluePurple";
|
ThemeResolutionService.ApplicationThemeName = "Office2019DarkBluePurple";
|
||||||
|
|
||||||
Application.Run(new Form1(updateOptions));
|
Application.Run(new Form1(updateOptions));
|
||||||
|
|||||||
74
ModpackUpdater.Apps.Manager/Form1.Designer.cs
generated
74
ModpackUpdater.Apps.Manager/Form1.Designer.cs
generated
@@ -28,11 +28,77 @@ partial class Form1
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.components = new System.ComponentModel.Container();
|
radSplitContainer1 = new Telerik.WinControls.UI.RadSplitContainer();
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
splitPanel1 = new Telerik.WinControls.UI.SplitPanel();
|
||||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
splitPanel2 = new Telerik.WinControls.UI.SplitPanel();
|
||||||
this.Text = "Form1";
|
((System.ComponentModel.ISupportInitialize)radSplitContainer1).BeginInit();
|
||||||
|
radSplitContainer1.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)splitPanel1).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)splitPanel2).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)this).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// radSplitContainer1
|
||||||
|
//
|
||||||
|
radSplitContainer1.Controls.Add(splitPanel1);
|
||||||
|
radSplitContainer1.Controls.Add(splitPanel2);
|
||||||
|
radSplitContainer1.Dock = DockStyle.Fill;
|
||||||
|
radSplitContainer1.Location = new Point(0, 0);
|
||||||
|
radSplitContainer1.Name = "radSplitContainer1";
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
radSplitContainer1.RootElement.MinSize = new Size(25, 25);
|
||||||
|
radSplitContainer1.Size = new Size(800, 450);
|
||||||
|
radSplitContainer1.TabIndex = 0;
|
||||||
|
radSplitContainer1.TabStop = false;
|
||||||
|
//
|
||||||
|
// splitPanel1
|
||||||
|
//
|
||||||
|
splitPanel1.Location = new Point(0, 0);
|
||||||
|
splitPanel1.Name = "splitPanel1";
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
splitPanel1.RootElement.MinSize = new Size(25, 25);
|
||||||
|
splitPanel1.Size = new Size(398, 450);
|
||||||
|
splitPanel1.TabIndex = 0;
|
||||||
|
splitPanel1.TabStop = false;
|
||||||
|
splitPanel1.Text = "splitPanel1";
|
||||||
|
//
|
||||||
|
// splitPanel2
|
||||||
|
//
|
||||||
|
splitPanel2.Location = new Point(402, 0);
|
||||||
|
splitPanel2.Name = "splitPanel2";
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
splitPanel2.RootElement.MinSize = new Size(25, 25);
|
||||||
|
splitPanel2.Size = new Size(398, 450);
|
||||||
|
splitPanel2.TabIndex = 1;
|
||||||
|
splitPanel2.TabStop = false;
|
||||||
|
splitPanel2.Text = "splitPanel2";
|
||||||
|
//
|
||||||
|
// Form1
|
||||||
|
//
|
||||||
|
AutoScaleBaseSize = new Size(7, 15);
|
||||||
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
|
ClientSize = new Size(800, 450);
|
||||||
|
Controls.Add(radSplitContainer1);
|
||||||
|
Name = "Form1";
|
||||||
|
Text = "Form1";
|
||||||
|
((System.ComponentModel.ISupportInitialize)radSplitContainer1).EndInit();
|
||||||
|
radSplitContainer1.ResumeLayout(false);
|
||||||
|
((System.ComponentModel.ISupportInitialize)splitPanel1).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)splitPanel2).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)this).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
private Telerik.WinControls.UI.RadSplitContainer radSplitContainer1;
|
||||||
|
private Telerik.WinControls.UI.SplitPanel splitPanel1;
|
||||||
|
private Telerik.WinControls.UI.SplitPanel splitPanel2;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,14 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Pilz.UI.Telerik" Version="2.7.2" />
|
||||||
<PackageReference Include="UI.for.WinForms.Common" Version="2024.3.806" />
|
<PackageReference Include="UI.for.WinForms.Common" Version="2024.3.806" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\ModpackUpdater.Apps\ModpackUpdater.Apps.csproj" />
|
||||||
|
<ProjectReference Include="..\ModpackUpdater.Manager\ModpackUpdater.Manager.csproj" />
|
||||||
|
<ProjectReference Include="..\ModpackUpdater\ModpackUpdater.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -11,6 +11,7 @@ internal static class Program
|
|||||||
// To customize application configuration such as set high DPI settings or default font,
|
// To customize application configuration such as set high DPI settings or default font,
|
||||||
// see https://aka.ms/applicationconfiguration.
|
// see https://aka.ms/applicationconfiguration.
|
||||||
ApplicationConfiguration.Initialize();
|
ApplicationConfiguration.Initialize();
|
||||||
|
AppGlobals.Initialize();
|
||||||
Application.Run(new Form1());
|
Application.Run(new Form1());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
6
ModpackUpdater.Apps.Manager/app.config
Normal file
6
ModpackUpdater.Apps.Manager/app.config
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<appSettings>
|
||||||
|
<add key="TelerikWinFormsThemeName" value="Windows11CompactDark" />
|
||||||
|
</appSettings>
|
||||||
|
</configuration>
|
||||||
17
ModpackUpdater.Apps/AppGlobals.cs
Normal file
17
ModpackUpdater.Apps/AppGlobals.cs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
using Pilz.UI.Telerik.Symbols;
|
||||||
|
using Pilz.UI.Telerik.Theming;
|
||||||
|
using Telerik.WinControls.Themes;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps;
|
||||||
|
|
||||||
|
public static class AppGlobals
|
||||||
|
{
|
||||||
|
public static IRadSymbolFactory<AppSymbols> Symbols { get; } = new AppSymbolFactory();
|
||||||
|
|
||||||
|
public static void Initialize()
|
||||||
|
{
|
||||||
|
ThemeHelper.ApplyApplicationTheme(ApplicationTheme.Auto,
|
||||||
|
() => new Windows11CompactTheme(),
|
||||||
|
() => new Windows11CompactDarkTheme());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,12 +2,10 @@
|
|||||||
using Pilz.UI.Telerik.Symbols;
|
using Pilz.UI.Telerik.Symbols;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
namespace ModpackUpdater.Apps.Client;
|
namespace ModpackUpdater.Apps;
|
||||||
|
|
||||||
public class AppSymbolFactory : RadSymbolFactory<AppSymbols>
|
internal class AppSymbolFactory : RadSymbolFactory<AppSymbols>
|
||||||
{
|
{
|
||||||
public static IRadSymbolFactory<AppSymbols> Instance { get; } = new AppSymbolFactory();
|
|
||||||
|
|
||||||
public override Assembly GetImageResourceAssembly()
|
public override Assembly GetImageResourceAssembly()
|
||||||
{
|
{
|
||||||
return Assembly.GetExecutingAssembly();
|
return Assembly.GetExecutingAssembly();
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace ModpackUpdater.Apps.Client;
|
namespace ModpackUpdater.Apps;
|
||||||
|
|
||||||
public enum AppSymbols
|
public enum AppSymbols
|
||||||
{
|
{
|
||||||
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
54
ModpackUpdater.Apps/ModpackUpdater.Apps.csproj
Normal file
54
ModpackUpdater.Apps/ModpackUpdater.Apps.csproj
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0-windows</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Remove="CustomThemes\Office2019DarkBluePurple.tssp" />
|
||||||
|
<None Remove="Symbols\checkmark.svg" />
|
||||||
|
<None Remove="Symbols\close.svg" />
|
||||||
|
<None Remove="Symbols\delete.svg" />
|
||||||
|
<None Remove="Symbols\done.svg" />
|
||||||
|
<None Remove="Symbols\download_from_ftp.svg" />
|
||||||
|
<None Remove="Symbols\general_warning_sign.svg" />
|
||||||
|
<None Remove="Symbols\opened_folder.svg" />
|
||||||
|
<None Remove="Symbols\paste.svg" />
|
||||||
|
<None Remove="Symbols\refresh.svg" />
|
||||||
|
<None Remove="Symbols\replay.svg" />
|
||||||
|
<None Remove="Symbols\save.svg" />
|
||||||
|
<None Remove="Symbols\services.svg" />
|
||||||
|
<None Remove="Symbols\software_installer.svg" />
|
||||||
|
<None Remove="Symbols\update_done.svg" />
|
||||||
|
<None Remove="Symbols\wrench.svg" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="CustomThemes\Office2019DarkBluePurple.tssp" />
|
||||||
|
<EmbeddedResource Include="Symbols\checkmark.svg" />
|
||||||
|
<EmbeddedResource Include="Symbols\close.svg" />
|
||||||
|
<EmbeddedResource Include="Symbols\delete.svg" />
|
||||||
|
<EmbeddedResource Include="Symbols\done.svg" />
|
||||||
|
<EmbeddedResource Include="Symbols\download_from_ftp.svg" />
|
||||||
|
<EmbeddedResource Include="Symbols\general_warning_sign.svg" />
|
||||||
|
<EmbeddedResource Include="Symbols\opened_folder.svg" />
|
||||||
|
<EmbeddedResource Include="Symbols\paste.svg" />
|
||||||
|
<EmbeddedResource Include="Symbols\refresh.svg" />
|
||||||
|
<EmbeddedResource Include="Symbols\replay.svg" />
|
||||||
|
<EmbeddedResource Include="Symbols\save.svg" />
|
||||||
|
<EmbeddedResource Include="Symbols\services.svg" />
|
||||||
|
<EmbeddedResource Include="Symbols\software_installer.svg" />
|
||||||
|
<EmbeddedResource Include="Symbols\update_done.svg" />
|
||||||
|
<EmbeddedResource Include="Symbols\wrench.svg" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Pilz.UI.Telerik" Version="2.7.2" />
|
||||||
|
<PackageReference Include="UI.for.WinForms.Common" Version="2024.3.806" />
|
||||||
|
<PackageReference Include="UI.for.WinForms.Themes" Version="2024.3.806" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -15,6 +15,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libs", "Libs", "{96B711FA-1
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModpackUpdater.Apps.Manager", "ModpackUpdater.Apps.Manager\ModpackUpdater.Apps.Manager.csproj", "{227A37AA-73F0-431D-B976-B9B3A8ADD8C2}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModpackUpdater.Apps.Manager", "ModpackUpdater.Apps.Manager\ModpackUpdater.Apps.Manager.csproj", "{227A37AA-73F0-431D-B976-B9B3A8ADD8C2}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModpackUpdater.Apps", "ModpackUpdater.Apps\ModpackUpdater.Apps.csproj", "{EF2EAFAF-01CD-46BD-BE45-0125B51316A4}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -37,6 +39,10 @@ Global
|
|||||||
{227A37AA-73F0-431D-B976-B9B3A8ADD8C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{227A37AA-73F0-431D-B976-B9B3A8ADD8C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{227A37AA-73F0-431D-B976-B9B3A8ADD8C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{227A37AA-73F0-431D-B976-B9B3A8ADD8C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{227A37AA-73F0-431D-B976-B9B3A8ADD8C2}.Release|Any CPU.Build.0 = Release|Any CPU
|
{227A37AA-73F0-431D-B976-B9B3A8ADD8C2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{EF2EAFAF-01CD-46BD-BE45-0125B51316A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{EF2EAFAF-01CD-46BD-BE45-0125B51316A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{EF2EAFAF-01CD-46BD-BE45-0125B51316A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{EF2EAFAF-01CD-46BD-BE45-0125B51316A4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@@ -46,6 +52,7 @@ Global
|
|||||||
{0E6B6470-8C1D-0CDD-3681-461297A01960} = {96B711FA-1AF2-469B-BC02-6D1E540E8E9D}
|
{0E6B6470-8C1D-0CDD-3681-461297A01960} = {96B711FA-1AF2-469B-BC02-6D1E540E8E9D}
|
||||||
{D3A92EBD-FF6E-09D0-00A1-20221AAA198E} = {96B711FA-1AF2-469B-BC02-6D1E540E8E9D}
|
{D3A92EBD-FF6E-09D0-00A1-20221AAA198E} = {96B711FA-1AF2-469B-BC02-6D1E540E8E9D}
|
||||||
{227A37AA-73F0-431D-B976-B9B3A8ADD8C2} = {743892CF-E482-4FBD-9BAB-02920C140F2B}
|
{227A37AA-73F0-431D-B976-B9B3A8ADD8C2} = {743892CF-E482-4FBD-9BAB-02920C140F2B}
|
||||||
|
{EF2EAFAF-01CD-46BD-BE45-0125B51316A4} = {743892CF-E482-4FBD-9BAB-02920C140F2B}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {322E6A6B-9F3E-4E88-8945-C98A9EF613BF}
|
SolutionGuid = {322E6A6B-9F3E-4E88-8945-C98A9EF613BF}
|
||||||
|
|||||||
Reference in New Issue
Block a user