更新数据接口
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using SukiUI.Controls;
|
||||
using System;
|
||||
using Footwear_Test_methodsfor_wholeshoe_Slipresistanceperformance.ViewModels;
|
||||
|
||||
namespace Footwear_Test_methodsfor_wholeshoe_Slipresistanceperformance.Views
|
||||
{
|
||||
@@ -7,6 +9,15 @@ namespace Footwear_Test_methodsfor_wholeshoe_Slipresistanceperformance.Views
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
Closed += OnClosed;
|
||||
}
|
||||
|
||||
private void OnClosed(object? sender, EventArgs e)
|
||||
{
|
||||
if (DataContext is MainWindowViewModel viewModel)
|
||||
{
|
||||
viewModel.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user