26 lines
588 B
C#
26 lines
588 B
C#
using HMIToolkit;
|
|
using MahApps.Metro.Controls;
|
|
|
|
namespace InfineonHMI
|
|
{
|
|
/// <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();
|
|
}
|
|
}
|
|
} |