Exemple #1
0
        public void MoveTo(double x, double y)
        {
            MainPanel.Left = x;
            MainPanel.Top  = y;
            WindowManipulator.FitToNearestDesktop(MainPanel);

            Config.Save();
        }
        public void ReloadLayout()
        {
            ClearLayout();
            Designer.GenerateLayout(this);
            WindowManipulator.FitToNearestDesktop(this);

            LastMoved    = DateTime.Now;
            LastPosition = new Point(Top, Left);
        }
        private void HandleExitSizeMove(object sender, EventArgs e)
        {
            WindowManipulator.FitToNearestDesktop(this);
            Config.State.X = Left;
            Config.State.Y = Top;
            Config.Save();

            var newPosition = new Point(Top, Left);

            if (newPosition != LastPosition)
            {
                LastMoved = DateTime.Now;
            }
        }
 private void HandleSizeChanged(object sender, SizeChangedEventArgs e)
 {
     WindowManipulator.FitToNearestDesktop(this, e.NewSize);
 }