From 0808bef9566cc463637a16ef4c4371f757635eba Mon Sep 17 00:00:00 2001 From: larsbrubaker Date: Sat, 12 Apr 2014 11:54:05 -0700 Subject: [PATCH] Made the desktop position happen before visible so it does not move after being opened. --- MatterControlApplication.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/MatterControlApplication.cs b/MatterControlApplication.cs index dbbe3581d..909081587 100644 --- a/MatterControlApplication.cs +++ b/MatterControlApplication.cs @@ -132,6 +132,13 @@ namespace MatterHackers.MatterControl MinimumSize = new Vector2(590, 540); + string desktopPosition = ApplicationSettings.Instance.get("DesktopPosition"); + if (desktopPosition != null && desktopPosition != "") + { + string[] sizes = desktopPosition.Split(','); + DesktopPosition = new Point2D(int.Parse(sizes[0]), int.Parse(sizes[1])); + } + ShowAsSystemWindow(); } @@ -274,13 +281,6 @@ namespace MatterHackers.MatterControl if (firstDraw) { - string desktopPosition = ApplicationSettings.Instance.get("DesktopPosition"); - if (desktopPosition != null && desktopPosition != "") - { - string[] sizes = desktopPosition.Split(','); - DesktopPosition = new Point2D(int.Parse(sizes[0]), int.Parse(sizes[1])); - } - firstDraw = false; foreach (string arg in commandLineArgs) { @@ -316,7 +316,7 @@ namespace MatterHackers.MatterControl width = int.Parse(sizes[0]); height = int.Parse(sizes[1]); } - //MessageBox.ShowMessageBox(timerInfo, "Timing", MessageBox.MessageType.OK); + new MatterControlApplication(width, height); }