diff --git a/VPet-Simulator.Windows/MainWindow.xaml.cs b/VPet-Simulator.Windows/MainWindow.xaml.cs index 19f8f49..bb8d68c 100644 --- a/VPet-Simulator.Windows/MainWindow.xaml.cs +++ b/VPet-Simulator.Windows/MainWindow.xaml.cs @@ -99,7 +99,7 @@ namespace VPet_Simulator.Windows //this.Height = 450 * ZoomSlider.Value; InitializeComponent(); - //this.Height = 500 * Set.ZoomLevel; + this.Height = 500 * Set.ZoomLevel; this.Width = 500 * Set.ZoomLevel; double L = 0, T = 0; @@ -118,17 +118,17 @@ namespace VPet_Simulator.Windows L = point.X; T = point.Y; } - //// control position inside bounds - Core.Controller = new MWController(this); - //double dist; - //if ((dist = Core.Controller.GetWindowsDistanceLeft()) < 0) L -= dist; - //if ((dist = Core.Controller.GetWindowsDistanceRight()) < 0) L += dist; - //if ((dist = Core.Controller.GetWindowsDistanceUp()) < 0) T -= dist; - //if ((dist = Core.Controller.GetWindowsDistanceDown()) < 0) T += dist; - Left = L; Top = T; + // control position inside bounds + Core.Controller = new MWController(this); + double dist; + if ((dist = Core.Controller.GetWindowsDistanceLeft()) < 0) Left -= dist; + if ((dist = Core.Controller.GetWindowsDistanceRight()) < 0) Left += dist; + if ((dist = Core.Controller.GetWindowsDistanceUp()) < 0) Top -= dist; + if ((dist = Core.Controller.GetWindowsDistanceDown()) < 0) Top += dist; + if (Set.TopMost) { Topmost = true;