Tab restore

This commit is contained in:
2022-05-24 17:02:36 +02:00
parent dcff003c28
commit 8167909781
16 changed files with 339 additions and 11 deletions

View File

@@ -22,6 +22,7 @@
Icon="/Assets/filetime.ico"
InputElement.KeyDown="OnKeyDown"
Opened="OnWindowOpened"
Closed="OnWindowClosed"
TransparencyLevelHint="Blur"
mc:Ignorable="d">

View File

@@ -82,7 +82,7 @@ public partial class MainWindow : Window
&& sender is StyledElement control)
{
FullName? path = null;
if (control.DataContext is IHaveFullPath { Path: { } } hasFullPath)
if (control.DataContext is IHaveFullPath {Path: { }} hasFullPath)
{
path = hasFullPath.Path;
}
@@ -108,4 +108,10 @@ public partial class MainWindow : Window
e.Handled = true;
}
}
private void OnWindowClosed(object? sender, EventArgs e)
{
var vm = ViewModel;
Task.Run(() => vm?.OnExit()).Wait();
}
}