Пример #1
0
 /// <summary>
 /// Paints the dock items using provided event handler for painting
 /// </summary>
 /// <param name="canvas">The canvas.</param>
 /// <param name="manager">The manager.</param>
 protected virtual void DoCustomPaint(Graphics canvas, IDockManager manager)
 {
     for (int i = 0; i < manager.Items.Count; i++)
     {
         DoDraw(canvas, manager.Items[i]);
     }
 }
Пример #2
0
 /// <summary>
 /// Paints the dock items
 /// </summary>
 /// <param name="canvas">The canvas.</param>
 /// <param name="manager">The manager.</param>
 public virtual void Paint(Graphics canvas, IDockManager manager)
 {
     if (Draw != null)
     {
         DoCustomPaint(canvas, manager);
     }
     else
     {
         DoDefaultPaint(canvas, manager);
     }
 }
Пример #3
0
 protected override void DoDefaultPaint(Graphics canvas, IDockManager manager)
 {
     canvas.SmoothingMode = SmoothingMode.AntiAlias;
     for (int i = 0; i < manager.Items.Count; i++)
     {
         if (manager.UseDenomination)
         {
             PaintDenominatedItem(canvas, manager.Items[i]);
         }
         else
         {
             PaintItem(canvas, manager.Items[i]);
         }
         if (manager.CaptionVisible(manager.Items[i]))
         {
             PaintCaption(canvas, manager.Items[i], manager.GetScaleCaption());
         }
     }
 }
Пример #4
0
 /// <summary>
 /// Does the default paint.
 /// </summary>
 /// <param name="canvas">The canvas.</param>
 /// <param name="manager">The manager.</param>
 protected virtual void DoDefaultPaint(Graphics canvas, IDockManager manager)
 {
     //default painting of the items is defined in derived classes
 }
Пример #5
0
 public HostWindowState(IDockManager dockManager, HostWindow hostWindow)
 {
     DockManager = dockManager;
     _hostWindow = hostWindow;
 }
Пример #6
0
 public DockControlState(IDockManager dockManager)
 {
     DockManager = dockManager;
 }