예제 #1
0
        private void OpenWindow(WindowPositionSide side, WpfScreen screen)
        {
            if (side == WindowPositionSide.None)
            {
                return;
            }
            CloseWindowIfExists();

            double dockwindowLeft, dockwindowWidth;

            switch (side)
            {
            case WindowPositionSide.Left:
                dockwindowLeft  = WpfScreen.MostLeftX;
                dockwindowWidth = 300;
                break;

            case WindowPositionSide.Right:
                dockwindowLeft  = WpfScreen.MostRightX - 300;
                dockwindowWidth = 300;
                break;

            case WindowPositionSide.Top:
                return;

            default:
                throw new ArgumentOutOfRangeException("side");
            }

            _window = new DockRangeWindow(screen.WorkingArea.Top, dockwindowLeft, screen.WorkingArea.Height, dockwindowWidth);
            _window.Show();
        }
예제 #2
0
 private void CloseWindowIfExists()
 {
     if (_window != null)
     {
         _window.Close(); _window = null;
     }
 }