Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/22/10 00:44:01 (14 years ago)
Author:
swagner
Message:

Sorted usings and removed unused usings in entire solution (#1094)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPaneCaptionBase.cs

    r2645 r4068  
    1 using System;
     1using System.Drawing;
     2using System.Security.Permissions;
    23using System.Windows.Forms;
    3 using System.Drawing;
    4 using System.Runtime.InteropServices;
    5 using System.Security.Permissions;
    64
    7 namespace WeifenLuo.WinFormsUI.Docking
    8 {
    9   public abstract class DockPaneCaptionBase : Control
    10   {
    11     protected internal DockPaneCaptionBase(DockPane pane)
    12     {
    13       m_dockPane = pane;
     5namespace WeifenLuo.WinFormsUI.Docking {
     6  public abstract class DockPaneCaptionBase : Control {
     7    protected internal DockPaneCaptionBase(DockPane pane) {
     8      m_dockPane = pane;
    149
    15       SetStyle(ControlStyles.OptimizedDoubleBuffer |
     10      SetStyle(ControlStyles.OptimizedDoubleBuffer |
    1611                ControlStyles.ResizeRedraw |
    1712                ControlStyles.UserPaint |
    1813                ControlStyles.AllPaintingInWmPaint, true);
    19       SetStyle(ControlStyles.Selectable, false);
    20     }
     14      SetStyle(ControlStyles.Selectable, false);
     15    }
    2116
    22     private DockPane m_dockPane;
    23     protected DockPane DockPane
    24     {
    25       get { return m_dockPane;  }
    26     }
     17    private DockPane m_dockPane;
     18    protected DockPane DockPane {
     19      get { return m_dockPane; }
     20    }
    2721
    28     protected DockPane.AppearanceStyle Appearance
    29     {
    30       get { return DockPane.Appearance; }
    31     }
     22    protected DockPane.AppearanceStyle Appearance {
     23      get { return DockPane.Appearance; }
     24    }
    3225
    33         protected bool HasTabPageContextMenu
    34         {
    35             get { return DockPane.HasTabPageContextMenu; }
     26    protected bool HasTabPageContextMenu {
     27      get { return DockPane.HasTabPageContextMenu; }
     28    }
     29
     30    protected void ShowTabPageContextMenu(Point position) {
     31      DockPane.ShowTabPageContextMenu(this, position);
     32    }
     33
     34    protected override void OnMouseUp(MouseEventArgs e) {
     35      base.OnMouseUp(e);
     36
     37      if (e.Button == MouseButtons.Right)
     38        ShowTabPageContextMenu(new Point(e.X, e.Y));
     39    }
     40
     41    protected override void OnMouseDown(MouseEventArgs e) {
     42      base.OnMouseDown(e);
     43
     44      if (e.Button == MouseButtons.Left &&
     45    DockPane.DockPanel.AllowEndUserDocking &&
     46          DockPane.AllowDockDragAndDrop &&
     47  !DockHelper.IsDockStateAutoHide(DockPane.DockState) &&
     48          DockPane.ActiveContent != null)
     49        DockPane.DockPanel.BeginDrag(DockPane);
     50    }
     51
     52    [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
     53    protected override void WndProc(ref Message m) {
     54      if (m.Msg == (int)Win32.Msgs.WM_LBUTTONDBLCLK) {
     55        if (DockHelper.IsDockStateAutoHide(DockPane.DockState)) {
     56          DockPane.DockPanel.ActiveAutoHideContent = null;
     57          return;
    3658        }
    3759
    38         protected void ShowTabPageContextMenu(Point position)
    39         {
    40             DockPane.ShowTabPageContextMenu(this, position);
    41         }
     60        if (DockPane.IsFloat)
     61          DockPane.RestoreToPanel();
     62        else
     63          DockPane.Float();
     64      }
     65      base.WndProc(ref m);
     66    }
    4267
    43         protected override void OnMouseUp(MouseEventArgs e)
    44         {
    45             base.OnMouseUp(e);
     68    internal void RefreshChanges() {
     69      if (IsDisposed)
     70        return;
    4671
    47             if (e.Button == MouseButtons.Right)
    48                 ShowTabPageContextMenu(new Point(e.X, e.Y));
    49         }
     72      OnRefreshChanges();
     73    }
    5074
    51         protected override void OnMouseDown(MouseEventArgs e)
    52         {
    53             base.OnMouseDown(e);
     75    protected virtual void OnRightToLeftLayoutChanged() {
     76    }
    5477
    55             if (e.Button == MouseButtons.Left &&
    56           DockPane.DockPanel.AllowEndUserDocking &&
    57                 DockPane.AllowDockDragAndDrop &&
    58         !DockHelper.IsDockStateAutoHide(DockPane.DockState) &&
    59                 DockPane.ActiveContent != null)
    60         DockPane.DockPanel.BeginDrag(DockPane);
    61         }
     78    protected virtual void OnRefreshChanges() {
     79    }
    6280
    63         [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]         
    64         protected override void WndProc(ref Message m)
    65         {
    66             if (m.Msg == (int)Win32.Msgs.WM_LBUTTONDBLCLK)
    67             {
    68                 if (DockHelper.IsDockStateAutoHide(DockPane.DockState))
    69                 {
    70                     DockPane.DockPanel.ActiveAutoHideContent = null;
    71                     return;
    72                 }
    73 
    74                 if (DockPane.IsFloat)
    75                     DockPane.RestoreToPanel();
    76                 else
    77                     DockPane.Float();
    78             }
    79             base.WndProc(ref m);
    80         }
    81 
    82     internal void RefreshChanges()
    83     {
    84             if (IsDisposed)
    85                 return;
    86 
    87       OnRefreshChanges();
    88     }
    89 
    90         protected virtual void OnRightToLeftLayoutChanged()
    91         {
    92         }
    93 
    94     protected virtual void OnRefreshChanges()
    95     {
    96     }
    97 
    98     protected internal abstract int MeasureHeight();
    99   }
     81    protected internal abstract int MeasureHeight();
     82  }
    10083}
Note: See TracChangeset for help on using the changeset viewer.