|
@@ -1365,16 +1365,16 @@ namespace Venus_MainPages.ViewModels
|
|
|
}
|
|
|
private void OnOpenButterflyValveView()
|
|
|
{
|
|
|
- //if (butterflyValveMessageBox == null)
|
|
|
- //{
|
|
|
var _mainWindow = Application.Current.Windows.Cast<Window>().FirstOrDefault(window => window is Window) as Window;
|
|
|
- butterflyValveMessageBox = new ButterflyValveView(ModuleName.ToString());
|
|
|
- butterflyValveMessageBox.WindowStartupLocation = WindowStartupLocation.Manual;
|
|
|
- butterflyValveMessageBox.Left = 700;
|
|
|
- butterflyValveMessageBox.Top = 600;
|
|
|
- butterflyValveMessageBox.Show();
|
|
|
- butterflyValveMessageBox.Owner = _mainWindow;
|
|
|
- //}
|
|
|
+ if (butterflyValveMessageBox == null || butterflyValveMessageBox.IsVisible == false)
|
|
|
+ {
|
|
|
+ butterflyValveMessageBox = new ButterflyValveView(ModuleName.ToString());
|
|
|
+ butterflyValveMessageBox.WindowStartupLocation = WindowStartupLocation.Manual;
|
|
|
+ butterflyValveMessageBox.Left = 700;
|
|
|
+ butterflyValveMessageBox.Top = 600;
|
|
|
+ butterflyValveMessageBox.Show();
|
|
|
+ butterflyValveMessageBox.Owner = _mainWindow;
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
private void OnLoadRecipe()
|
|
@@ -1438,10 +1438,13 @@ namespace Venus_MainPages.ViewModels
|
|
|
}
|
|
|
AITHeaterData heaterData = obj as AITHeaterData;
|
|
|
var _mainWindow = Application.Current.Windows.Cast<Window>().FirstOrDefault(window => window is Window) as Window;
|
|
|
- heaterView = new HeaterView(heaterData, ModuleName);
|
|
|
- heaterView.WindowStartupLocation = WindowStartupLocation.CenterScreen;
|
|
|
- heaterView.Owner = _mainWindow;
|
|
|
- heaterView.Show();
|
|
|
+ if (heaterView == null || heaterView.IsVisible == false)
|
|
|
+ {
|
|
|
+ heaterView = new HeaterView(heaterData, ModuleName);
|
|
|
+ heaterView.WindowStartupLocation = WindowStartupLocation.CenterScreen;
|
|
|
+ heaterView.Owner = _mainWindow;
|
|
|
+ heaterView.Show();
|
|
|
+ }
|
|
|
}
|
|
|
private void OnOnline()
|
|
|
{
|