Made the desktop position happen before visible so it does not move after being opened.

This commit is contained in:
larsbrubaker 2014-04-12 11:54:05 -07:00
parent bacab154fd
commit 0808bef956

View file

@ -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);
}