43 lines
906 B
C#
43 lines
906 B
C#
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
|
|
}
|