From 76796ca52a69cfce922be253d6e9207ccbfd09a7 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 4 Sep 2018 17:01:08 +0300 Subject: Started working on Test Studio... Machine Studio v3.4.42 --- .../Tango.MachineStudio.UI/MainWindow.xaml.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs') 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 f0f93a867..9989aa091 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs @@ -31,6 +31,7 @@ namespace Tango.MachineStudio.UI { public static MainWindow Instance { get; set; } private LogManager LogManager = LogManager.Default; + private bool _is_testing; public MainWindow() { @@ -40,6 +41,17 @@ namespace Tango.MachineStudio.UI { InitializeComponent(); + _is_testing = TestHelper.IsRunningUnderTestStudio(); + + if (!_is_testing) + { + Viewbox box = new Viewbox(); + box.Stretch = Stretch.Fill; + main_grid.Children.Remove(grid); + box.Child = grid; + main_grid.Children.Add(box); + } + WindowStartupLocation = WindowStartupLocation.Manual; var r = SettingsManager.Default.GetOrCreate().LastBounds; @@ -52,7 +64,7 @@ namespace Tango.MachineStudio.UI Instance = this; ThreadsHelper.SetDisptacher(Dispatcher); - Closing += MainWindow_Closing; + Closing += MainWindow_Closing; } catch (Exception ex) { -- cgit v1.3.1