Catalog Lite
This commit is contained in:
parent
398cfa310e
commit
181229aa41
18 changed files with 1435 additions and 0 deletions
52
CatalogLite/ExpiredWindow.cs
Normal file
52
CatalogLite/ExpiredWindow.cs
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
using Avalonia.Controls;
|
||||
using Avalonia.Layout;
|
||||
|
||||
namespace CatalogLite;
|
||||
|
||||
internal sealed class ExpiredWindow : Window
|
||||
{
|
||||
public ExpiredWindow(DateOnly? expirationDate)
|
||||
{
|
||||
Title = "Catalog Lite";
|
||||
Width = 430;
|
||||
Height = 190;
|
||||
CanResize = false;
|
||||
WindowStartupLocation = WindowStartupLocation.CenterScreen;
|
||||
|
||||
var message = expirationDate is null
|
||||
? "L'applicazione e scaduta e non puo essere utilizzata."
|
||||
: $"L'applicazione e scaduta il {expirationDate:dd/MM/yyyy} e non puo essere utilizzata.";
|
||||
|
||||
var closeButton = new Button
|
||||
{
|
||||
Content = "Chiudi",
|
||||
HorizontalAlignment = HorizontalAlignment.Right,
|
||||
MinWidth = 96
|
||||
};
|
||||
closeButton.Click += (_, _) => Close();
|
||||
|
||||
Content = new Border
|
||||
{
|
||||
Padding = new Avalonia.Thickness(22),
|
||||
Child = new StackPanel
|
||||
{
|
||||
Spacing = 14,
|
||||
Children =
|
||||
{
|
||||
new TextBlock
|
||||
{
|
||||
Text = "Applicazione scaduta",
|
||||
FontSize = 18,
|
||||
FontWeight = Avalonia.Media.FontWeight.SemiBold
|
||||
},
|
||||
new TextBlock
|
||||
{
|
||||
Text = message,
|
||||
TextWrapping = Avalonia.Media.TextWrapping.Wrap
|
||||
},
|
||||
closeButton
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue