aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2017-12-19 10:25:40 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2017-12-19 10:25:40 +0200
commitafc7a07d285e08d905c58dd5978441c155b2f296 (patch)
treea2f4f51ef2747ae3a2aded2637a352ce8ef85934 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs
parentad35c9c2df0001157ea13312382f3cdfdad67f06 (diff)
downloadTango-afc7a07d285e08d905c58dd5978441c155b2f296.tar.gz
Tango-afc7a07d285e08d905c58dd5978441c155b2f296.zip
MERGE.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs
index 3f7d4cad8..9193cfd3e 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs
@@ -1,4 +1,5 @@
using MahApps.Metro.Controls;
+using Microsoft.Practices.ServiceLocation;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -13,6 +14,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
+using Tango.MachineStudio.Common.StudioApplication;
namespace Tango.MachineStudio.UI
{
@@ -26,8 +28,15 @@ namespace Tango.MachineStudio.UI
public MainWindow()
{
InitializeComponent();
-
Instance = this;
+
+ this.Closing += MainWindow_Closing;
+ }
+
+ private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
+ {
+ e.Cancel = true;
+ ServiceLocator.Current.GetInstance<IStudioApplicationManager>().ShutDown();
}
}
}