aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs
diff options
context:
space:
mode:
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.cs14
1 files changed, 13 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 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<MachineStudioSettings>().LastBounds;
@@ -52,7 +64,7 @@ namespace Tango.MachineStudio.UI
Instance = this;
ThreadsHelper.SetDisptacher(Dispatcher);
- Closing += MainWindow_Closing;
+ Closing += MainWindow_Closing;
}
catch (Exception ex)
{