refactor(app): split dashboard settings and layout into partial classes

This commit is contained in:
2026-04-03 12:59:16 +02:00
parent b8b1c74a84
commit 08185f88cd
6 changed files with 218 additions and 155 deletions
@@ -0,0 +1,42 @@
using System.Reflection;
namespace Duempelkas.App.Components.Layout;
public partial class MainLayout
{
#region Fields
private bool showAboutDialog;
#endregion
#region Properties
private static string AppVersion
{
get
{
var entryAssembly = Assembly.GetEntryAssembly();
var infoVersion = entryAssembly?
.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?
.InformationalVersion;
if (!string.IsNullOrWhiteSpace(infoVersion))
{
return infoVersion.Split('+')[0];
}
return entryAssembly?.GetName().Version?.ToString(2) ?? "1.0";
}
}
#endregion
#region Event Handlers
private void OpenAboutDialog() => showAboutDialog = true;
private void CloseAboutDialog() => showAboutDialog = false;
#endregion
}