Tab restore
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
Icon="/Assets/filetime.ico"
|
||||
InputElement.KeyDown="OnKeyDown"
|
||||
Opened="OnWindowOpened"
|
||||
Closed="OnWindowClosed"
|
||||
TransparencyLevelHint="Blur"
|
||||
mc:Ignorable="d">
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user