Initial Push
This commit is contained in:
26
uniper_hmi/UniperHMI/MainWindow.xaml.cs
Normal file
26
uniper_hmi/UniperHMI/MainWindow.xaml.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using HMIToolkit;
|
||||
using MahApps.Metro.Controls;
|
||||
|
||||
namespace UniperHMI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow
|
||||
{
|
||||
|
||||
|
||||
public MainWindow(MainWindowVM mainWindowVM)
|
||||
{
|
||||
this.DataContext = mainWindowVM;
|
||||
InitializeComponent();
|
||||
Closed += OnClosedEvent;
|
||||
}
|
||||
|
||||
private void OnClosedEvent(object? sender, EventArgs e)
|
||||
{
|
||||
if (DataContext is IDisposable dataContext)
|
||||
dataContext.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user