Tab restore
This commit is contained in:
@@ -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