From 6ef4e1ee8a965683e2b14cb7dff5cf0789099245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0?= Date: Thu, 8 Nov 2018 22:57:06 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=B1=D0=BB=D0=BE=D0=BA=D0=B8=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=B3=D0=BB=D0=B0=D0=B2=D0=BD=D0=BE=D0=B3=D0=BE?= =?UTF-8?q?=20=D0=BE=D0=BA=D0=BD=D0=B0=20=D0=BF=D1=80=D0=B8=20=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D1=80=D1=8B=D1=82=D0=B8=D0=B8=20=D0=B4=D1=80=D1=83=D0=B3?= =?UTF-8?q?=D0=B8=D1=85=20=D0=BE=D0=BA=D0=BE=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Signal Generator/MainWindow.xaml.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Signal Generator/MainWindow.xaml.cs b/Signal Generator/MainWindow.xaml.cs index 88e4a84..28975a7 100644 --- a/Signal Generator/MainWindow.xaml.cs +++ b/Signal Generator/MainWindow.xaml.cs @@ -35,12 +35,19 @@ namespace Signal_Generator private void addSignal_Button_Click(object sender, RoutedEventArgs e) { + IsEnabled = false; addSignalWindow_Instance = new AddSignalWindow(); - addSignalWindow_Instance.createItem_Button.Click += addSignalWindow_Instance_Closing; + addSignalWindow_Instance.createItem_Button.Click += addSignalWindow_createItem_Button_Click; + addSignalWindow_Instance.Closed += enableMainWindow; addSignalWindow_Instance.Show(); } - private void addSignalWindow_Instance_Closing(object sender, EventArgs e) + private void enableMainWindow(object sender, EventArgs e) + { + IsEnabled = true; + } + + private void addSignalWindow_createItem_Button_Click(object sender, EventArgs e) { var signal = null as IAnalogSignal; signal = (IAnalogSignal) addSignalWindow_Instance.signalType_ComboBox.SelectedItem; @@ -52,6 +59,7 @@ namespace Signal_Generator private void startProcedure_Button_Click(object sender, RoutedEventArgs e) { + IsEnabled = false; MultiSignal ms = new MultiSignal(); foreach (IAnalogSignal item in signalCollection) { @@ -59,6 +67,7 @@ namespace Signal_Generator } taskWindow_Instance = new TaskWindow(ms); taskWindow_Instance.Show(); + taskWindow_Instance.Closed += enableMainWindow; } private void removeSignal_Button_Click(object sender, RoutedEventArgs e)