|
|
|
|
@ -1,3 +1,4 @@ |
|
|
|
|
using System.ComponentModel; |
|
|
|
|
using Avalonia; |
|
|
|
|
using Avalonia.Controls; |
|
|
|
|
using Avalonia.Markup.Xaml; |
|
|
|
|
@ -9,11 +10,21 @@ namespace Mystify.Views |
|
|
|
|
public MainWindow() |
|
|
|
|
{ |
|
|
|
|
InitializeComponent(); |
|
|
|
|
|
|
|
|
|
Closing += OnClosing; |
|
|
|
|
|
|
|
|
|
#if DEBUG |
|
|
|
|
this.AttachDevTools(); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void InitializeComponent() => AvaloniaXamlLoader.Load(this); |
|
|
|
|
|
|
|
|
|
private void OnClosing(object? sender, CancelEventArgs args) |
|
|
|
|
{ |
|
|
|
|
//don't really close main window, just hide it -> notify icon is still there |
|
|
|
|
Hide(); |
|
|
|
|
args.Cancel = true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |