示例#1
0
 protected override void OnRenderGrip(ToolStripGripRenderEventArgs e)
 {
     if (renderer is ToolStripProfessionalRenderer)
     {
         if (e.GripStyle == ToolStripGripStyle.Hidden)
         {
             return;
         }
         Color fore = PluginBase.MainForm.GetThemeColor("ToolStrip.3dLightColor");
         using (Brush lightBrush = new SolidBrush(fore == Color.Empty ? this.colorTable.GripLight : fore))
         {
             Rectangle r = new Rectangle(e.GripBounds.Left, e.GripBounds.Top + 6, 2, 2);
             for (Int32 i = 0; i < e.GripBounds.Height - 11; i += 4)
             {
                 e.Graphics.FillRectangle(lightBrush, r);
                 r.Offset(0, 4);
             }
         }
         Color back = PluginBase.MainForm.GetThemeColor("ToolStrip.3dDarkColor");
         using (Brush darkBrush = new SolidBrush(back == Color.Empty ? this.colorTable.GripDark: back))
         {
             Rectangle r = new Rectangle(e.GripBounds.Left - 1, e.GripBounds.Top + 5, 2, 2);
             for (Int32 i = 0; i < e.GripBounds.Height - 11; i += 4)
             {
                 e.Graphics.FillRectangle(darkBrush, r);
                 r.Offset(0, 4);
             }
         }
     }
     else
     {
         renderer.DrawGrip(e);
     }
 }
示例#2
0
 protected override void OnRenderGrip(ToolStripGripRenderEventArgs e)
 {
     if (renderer is ToolStripProfessionalRenderer)
     {
         if (e.GripStyle == ToolStripGripStyle.Hidden)
         {
             return;
         }
         using (Brush lightBrush = new SolidBrush(this.colorTable.GripLight))
         {
             Rectangle r = new Rectangle(e.GripBounds.Left, e.GripBounds.Top + 6, 2, 2);
             for (Int32 i = 0; i < e.GripBounds.Height - 11; i += 4)
             {
                 e.Graphics.FillRectangle(lightBrush, r);
                 r.Offset(0, 4);
             }
         }
         using (Brush darkBrush = new SolidBrush(this.colorTable.GripDark))
         {
             Rectangle r = new Rectangle(e.GripBounds.Left - 1, e.GripBounds.Top + 5, 2, 2);
             for (Int32 i = 0; i < e.GripBounds.Height - 11; i += 4)
             {
                 e.Graphics.FillRectangle(darkBrush, r);
                 r.Offset(0, 4);
             }
         }
     }
     else
     {
         renderer.DrawGrip(e);
     }
 }
示例#3
0
 protected override void OnRenderGrip(ToolStripGripRenderEventArgs e)
 {
     if (renderer is ToolStripProfessionalRenderer)
     {
         if (e.GripStyle == ToolStripGripStyle.Hidden)
         {
             return;
         }
         Color fore = GetThemeColor("ToolStrip.3dLightColor");
         using (Brush lightBrush = new SolidBrush(fore == Color.Empty ? this.colorTable.GripLight : fore))
         {
             Rectangle r = new Rectangle(e.GripBounds.Left, e.GripBounds.Top + 6, 2, 2);
             for (Int32 i = 0; i < e.GripBounds.Height - 11; i += 4)
             {
                 e.Graphics.FillRectangle(lightBrush, r);
                 r.Offset(0, 4);
             }
         }
         Color back = GetThemeColor("ToolStrip.3dDarkColor");
         using (Brush darkBrush = new SolidBrush(back == Color.Empty ? this.colorTable.GripDark : back))
         {
             Rectangle r = new Rectangle(e.GripBounds.Left - 1, e.GripBounds.Top + 5, 2, 2);
             for (Int32 i = 0; i < e.GripBounds.Height - 11; i += 4)
             {
                 e.Graphics.FillRectangle(darkBrush, r);
                 r.Offset(0, 4);
             }
         }
     }
     //else if (Win32.IsRunningOnWindows())
     else if (Type.GetType("Mono.Runtime") == null)
     {
         if (e.GripStyle == ToolStripGripStyle.Hidden)
         {
             return;
         }
         using (Brush lightBrush = new SolidBrush(this.colorTable.GripLight))
         {
             Rectangle r = new Rectangle(e.GripBounds.Left, e.GripBounds.Top + 8, 2, 2);
             for (Int32 i = 0; i < e.GripBounds.Height - 11; i += 4)
             {
                 e.Graphics.FillRectangle(lightBrush, r);
                 r.Offset(0, 4);
             }
         }
         using (Brush darkBrush = new SolidBrush(this.colorTable.GripDark))
         {
             Rectangle r = new Rectangle(e.GripBounds.Left - 1, e.GripBounds.Top + 7, 2, 2);
             for (Int32 i = 0; i < e.GripBounds.Height - 11; i += 4)
             {
                 e.Graphics.FillRectangle(darkBrush, r);
                 r.Offset(0, 4);
             }
         }
     }
     else
     {
         renderer.DrawGrip(e);
     }
 }
示例#4
0
 protected override void OnRenderGrip(System.Windows.Forms.ToolStripGripRenderEventArgs e)
 {
     if (currentRenderer != null)
     {
         currentRenderer.DrawGrip(e);
         return;
     }
     base.OnRenderGrip(e);
 }
示例#5
0
 protected override void OnRenderGrip(ToolStripGripRenderEventArgs e)
 {
     if (_currentRenderer != null)
     {
         _currentRenderer.DrawGrip(e);
     }
     else
     {
         base.OnRenderGrip(e);
     }
 }