示例#1
0
        /// <summary>
        /// On autohide pane preview button
        /// </summary>
        /// <param name="sender">sender of the event</param>
        /// <param name="e">event argument</param>
        private void OnBottomPaneShowPreview(object sender, PreviewEventArgs e)
        {
            if (_autoShowPanel != null)
            {
                return;
            }

            _previewPane.Size = _topBottomPreviewSize;

            int x = e.ButtonLocation.X;

            if (x < BottomAutohideButtons.Left)
            {
                x = BottomAutohideButtons.Left;
            }
            else if (x + _previewPane.Width > BottomAutohideButtons.Right)
            {
                x = BottomAutohideButtons.Right - _previewPane.Width;
            }

            _previewPane.Left = x;

            _previewPane.Top = BottomAutohideButtons.Top - _previewPane.Height;

            if (_previewPane.Renderer != null)
            {
                _previewPane.Renderer.SelectedForm = e.Form;
            }

            _previewPane.Visible = PreviewRenderer != null;
        }
示例#2
0
        /// <summary>
        /// On autohide pane preview button
        /// </summary>
        /// <param name="sender">sender of the event</param>
        /// <param name="e">event argument</param>
        private void OnRightPaneShowPreview(object sender, PreviewEventArgs e)
        {
            if (_autoShowPanel != null)
            {
                return;
            }

            _previewPane.Size = _leftRightPreviewSize;
            _previewPane.Left = RightAutohideButtons.Left - _previewPane.Width;

            int y = e.ButtonLocation.Y;

            if (y < RightAutohideButtons.Top)
            {
                y = RightAutohideButtons.Top;
            }
            else if (y + _previewPane.Height > RightAutohideButtons.Bottom)
            {
                y = RightAutohideButtons.Bottom - _previewPane.Height;
            }

            _previewPane.Top = y;

            if (_previewPane.Renderer != null)
            {
                _previewPane.Renderer.SelectedForm = e.Form;
            }

            _previewPane.Visible = PreviewRenderer != null;
        }
        /// <summary>
        /// Occurs when mouse button was moved over a tab button
        /// </summary>
        /// <param name="buttonUnderMouse">button under mouse</param>
        protected override void OnMouseMoveOverTabButton(TabButton buttonUnderMouse)
        {
            EventHandler <PreviewEventArgs> handler = ShowPreview;

            if (handler != null)
            {
                PreviewEventArgs args = new PreviewEventArgs(new Point(buttonUnderMouse.Left, buttonUnderMouse.Top), (Form)buttonUnderMouse.Page);
                handler(this, args);
            }
        }
示例#4
0
文件: Autohide.cs 项目: Remurr/nDbg
        /// <summary>
        /// On autohide pane preview button
        /// </summary>
        /// <param name="sender">sender of the event</param>
        /// <param name="e">event argument</param>
        private void OnTopPaneShowPreview(object sender, PreviewEventArgs e)
        {
            if (_autoShowPanel != null)
             {
            return;
             }

             _previewPane.Size = _topBottomPreviewSize;

             int x = e.ButtonLocation.X;

             if (x < TopAutohideButtons.Left)
             {
            x = TopAutohideButtons.Left;
             }
             else if (x + _previewPane.Width > TopAutohideButtons.Right)
             {
            x = TopAutohideButtons.Right - _previewPane.Width;
             }

             _previewPane.Left = x;

             _previewPane.Top = TopAutohideButtons.Bottom;

             if (_previewPane.Renderer != null)
             {
            _previewPane.Renderer.SelectedForm = e.Form;
             }

             _previewPane.Visible = PreviewRenderer != null;
        }
示例#5
0
文件: Autohide.cs 项目: Remurr/nDbg
        /// <summary>
        /// On autohide pane preview button
        /// </summary>
        /// <param name="sender">sender of the event</param>
        /// <param name="e">event argument</param>
        private void OnRightPaneShowPreview(object sender, PreviewEventArgs e)
        {
            if (_autoShowPanel != null)
             {
            return;
             }

             _previewPane.Size = _leftRightPreviewSize;
             _previewPane.Left = RightAutohideButtons.Left - _previewPane.Width;

             int y = e.ButtonLocation.Y;

             if (y < RightAutohideButtons.Top)
             {
            y = RightAutohideButtons.Top;
             }
             else if (y + _previewPane.Height > RightAutohideButtons.Bottom)
             {
            y = RightAutohideButtons.Bottom - _previewPane.Height;
             }

             _previewPane.Top = y;

             if (_previewPane.Renderer != null)
             {
            _previewPane.Renderer.SelectedForm = e.Form;
             }

             _previewPane.Visible = PreviewRenderer != null;
        }
示例#6
0
 /// <summary>
 /// Occurs when mouse button was moved over a tab button
 /// </summary>
 /// <param name="buttonUnderMouse">button under mouse</param>
 protected override void OnMouseMoveOverTabButton(TabButton buttonUnderMouse)
 {
     EventHandler<PreviewEventArgs> handler = ShowPreview;
      if (handler != null)
      {
     PreviewEventArgs args = new PreviewEventArgs(new Point(buttonUnderMouse.Left, buttonUnderMouse.Top), (Form)buttonUnderMouse.Page);
     handler(this, args);
      }
 }