Ejemplo n.º 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();
        }
Ejemplo n.º 2
0
 private void CloseWindowIfExists()
 {
     if (_window != null)
     {
         _window.Close(); _window = null;
     }
 }
Ejemplo n.º 3
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();
        }
Ejemplo n.º 4
0
 private void CloseWindowIfExists()
 {
     if (_window != null) { _window.Close(); _window = null; }
 }