当前位置: 首页>>代码示例>>C#>>正文


C# Forms.ToolStripArrowRenderEventArgs类代码示例

本文整理汇总了C#中System.Windows.Forms.ToolStripArrowRenderEventArgs的典型用法代码示例。如果您正苦于以下问题:C# ToolStripArrowRenderEventArgs类的具体用法?C# ToolStripArrowRenderEventArgs怎么用?C# ToolStripArrowRenderEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ToolStripArrowRenderEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了ToolStripArrowRenderEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnRenderArrow

 /// <summary>
 /// Raises the <see cref="System.Windows.Forms.ToolStripRenderer.RenderArrow"/> event.
 /// </summary>
 /// <param name="e">A <see cref="System.Windows.Forms.ToolStripArrowRenderEventArgs"/> that contains the event data.</param>
 protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
 {
     if (ColorTable.UseSystemColors == true)
     {
         base.OnRenderArrow(e);
     }
     else
     {
         ProfessionalColorTable colorTable = ColorTable as BSE.Windows.Forms.ProfessionalColorTable;
         if ((colorTable != null) && (e.Item.Enabled == true))
         {
             if (e.Item.Owner is MenuStrip)
             {
                 e.ArrowColor = colorTable.MenuItemText;
             }
             else if (e.Item.Owner is StatusStrip)
             {
                 e.ArrowColor = colorTable.StatusStripText;
             }
             else
             {
                 if (e.Item.Owner.GetType() != typeof(ToolStripDropDownMenu))
                 {
                     e.ArrowColor = colorTable.ToolStripText;
                 }
             }
         }
         base.OnRenderArrow(e);
     }
 }
开发者ID:mikhp,项目名称:greatmaps,代码行数:34,代码来源:BseRenderer.cs

示例2: OnRenderArrow

        /// <summary>
        /// Raises the RenderArrow event.
        /// </summary>
        /// <param name="e">A ToolStripArrowRenderEventArgs that contains the event data.</param>
        protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
        {
			if (ColorTable.UseSystemColors == false)
			{
				ProfessionalColorTable colorTable = ColorTable as XiaoCai.WinformUI.Panels.ProfessionalColorTable;
				if (colorTable != null)
				{
					if ((e.Item.Owner.GetType() == typeof(MenuStrip)) && (e.Item.Selected == false) && e.Item.Pressed == false)
					{
						if (colorTable.MenuItemText != Color.Empty)
						{
							e.ArrowColor = colorTable.MenuItemText;
						}
					}
					if ((e.Item.Owner.GetType() == typeof(StatusStrip)) && (e.Item.Selected == false) && e.Item.Pressed == false)
					{
						if (colorTable.StatusStripText != Color.Empty)
						{
							e.ArrowColor = colorTable.StatusStripText;
						}
					}
				}
			}
            base.OnRenderArrow(e);
        }
开发者ID:GarnettLuo,项目名称:XiaoCai.WinformUI,代码行数:29,代码来源:Office2007Renderer.cs

示例3: OnRenderArrow

 protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
 {
     if (currentRenderer != null)
         currentRenderer.DrawArrow(e);
     else
         base.OnRenderArrow(e);
 }
开发者ID:zhuangyy,项目名称:Motion,代码行数:7,代码来源:TabStripRenderer.cs

示例4: OnRenderArrow

 protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
 {
     if (e.Item.Enabled)
     {
         e.ArrowColor = FORE_COLOR;
     }
     base.OnRenderArrow(e);
 }
开发者ID:yienit,项目名称:KST,代码行数:8,代码来源:NuiContextMenuStripRender.cs

示例5: OnRenderArrow

 protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
 {
     if(e.Item.Enabled)
         e.ArrowColor = Color.Black;
     else
         e.ArrowColor = SystemColors.GrayText;
     base.OnRenderArrow(e);
 }
开发者ID:Kuzq,项目名称:gitter,代码行数:8,代码来源:MSVS2010StyleToolStripRenderer.cs

示例6: OnRenderArrow

 protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
 {
     ToolStripDropDownItem item = e.Item as ToolStripDropDownItem;
     if (!(((item == null) || (e.Direction != ArrowDirection.Down)) || item.DropDown.Visible))
     {
         e.Direction = ArrowDirection.Right;
     }
     base.OnRenderArrow(e);
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:9,代码来源:BreadcrumbToolStripRenderer.cs

示例7: OnRenderArrow

        protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
        {
            if (!e.Item.Selected && !e.Item.Pressed)
            {
                e.ArrowColor = ColorScheme.ColorGray89;
            }

            base.OnRenderArrow(e);
        }
开发者ID:filipkunc,项目名称:GLGraphics,代码行数:9,代码来源:DarkToolStripRenderer.cs

示例8: OnRenderArrow

 /// <summary>
 /// 绘制 ToolStripItem 上的箭头。
 /// </summary>
 /// <param name="e"></param>
 protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
 {
     Graphics g = e.Graphics;
     Image arrow = AssemblyHelper.GetImage("QQ.ContextMenu.menu_arrow.png");
     Rectangle imgPoint = new Rectangle(
         e.ArrowRectangle.X + 4,
         (e.ArrowRectangle.Height - arrow.Height) / 2,
         arrow.Width,
         arrow.Height);//图片的位置和显示的大小
     Rectangle imgRect = new Rectangle(0, 0, arrow.Width, arrow.Height);
     g.DrawImage(arrow, imgPoint, imgRect, GraphicsUnit.Pixel);
 }
开发者ID:JimmyFung,项目名称:DesktopHelper,代码行数:16,代码来源:QQToolStripRenderer.cs

示例9: OnRenderArrow

 protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
 {
     ToolStripSplitButton item = e.Item as ToolStripSplitButton;
     if (!((e.Item is ToolStripMenuItem) || !((item != null) ? item.ButtonPressed : e.Item.Pressed)))
     {
         Rectangle arrowRectangle = e.ArrowRectangle;
         arrowRectangle.Offset(1, 1);
         e.ArrowRectangle = arrowRectangle;
     }
     if (!e.Item.Enabled)
     {
         e.ArrowColor = SystemColors.GrayText;
     }
     base.OnRenderArrow(e);
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:15,代码来源:ToolStripFlatRenderer.cs

示例10: OnRenderArrow

        protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
        {
            try
            {
                e.ArrowRectangle = Rectangle.Inflate(e.ArrowRectangle, 5, -2);

                if (e.Direction == ArrowDirection.Down)
                    e.Graphics.DrawImageUnscaled(Properties.Resources.bullet_arrow_down, e.ArrowRectangle);
                else if (e.Direction == ArrowDirection.Up)
                    e.Graphics.DrawImageUnscaled(Properties.Resources.bullet_arrow_up, e.ArrowRectangle);
                else if (e.Direction == ArrowDirection.Left)
                    e.Graphics.DrawImageUnscaled(Properties.Resources.bullet_arrow_left, e.ArrowRectangle);
                else if (e.Direction == ArrowDirection.Right)
                    e.Graphics.DrawImageUnscaled(Properties.Resources.bullet_arrow_right, e.ArrowRectangle);

                //e.Graphics.FillRectangle(Brushes.Red, e.ArrowRectangle);
            }
            catch
            {
                base.OnRenderArrow(e);
            }
        }
开发者ID:jsutton29,项目名称:Paint-Bucket,代码行数:22,代码来源:GlassToolstripRenderer.cs

示例11: OnRenderArrow

        /// <summary>
        ///     Raises the RenderArrow event.
        /// </summary>
        /// <param name="e"> An ToolStripArrowRenderEventArgs containing the event data. </param>
        protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
        {
            // Cannot paint a zero sized area
            if ((e.ArrowRectangle.Width > 0) &&
                (e.ArrowRectangle.Height > 0))
            {
                // Create a path that is used to fill the arrow
                using (GraphicsPath arrowPath = this.CreateArrowPath(e.Item,
                                                                     e.ArrowRectangle,
                                                                     e.Direction))
                {
                    // Get the rectangle that encloses the arrow and expand slightly
                    // so that the gradient is always within the expanding bounds
                    RectangleF boundsF = arrowPath.GetBounds();
                    boundsF.Inflate(1f, 1f);

                    Color color1 = (e.Item.Enabled ? _arrowLight : _arrowDisabled);
                    Color color2 = (e.Item.Enabled ? _arrowDark : _arrowDisabled);

                    float angle = 0;

                    // Use gradient angle to match the arrow direction
                    switch (e.Direction)
                    {
                        case ArrowDirection.Right:
                            angle = 0;
                            break;
                        case ArrowDirection.Left:
                            angle = 180f;
                            break;
                        case ArrowDirection.Down:
                            angle = 90f;
                            break;
                        case ArrowDirection.Up:
                            angle = 270f;
                            break;
                    }

                    // Draw the actual arrow using a gradient
                    using (LinearGradientBrush arrowBrush = new LinearGradientBrush(boundsF, color1, color2, angle))
                        e.Graphics.FillPath(arrowBrush, arrowPath);
                }
            }
        }
开发者ID:RSchwoerer,项目名称:Terminals,代码行数:48,代码来源:Office2007Renderer.cs

示例12: OnRenderArrow

 protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
 {
     e.Direction = ArrowDirection.Right;
     base.OnRenderArrow(e);
 }
开发者ID:sschocke,项目名称:BrainSimulator,代码行数:5,代码来源:NodeToolStripRenderer.cs

示例13: OnRenderArrow

 protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
 {
     using (var bmp = Bitmaps.Load("Arrow"))
         e.Graphics.DrawImage(bmp, new Point(e.Item.Bounds.Width - 10, e.ArrowRectangle.Y + 7));
 }
开发者ID:rizwan3d,项目名称:elalang,代码行数:5,代码来源:MenuRenderer.cs

示例14: DrawArrow

 /// <include file='doc\WinBarRenderer.uex' path='docs/doc[@for="ToolStripRenderer.DrawArrow"]/*' />
 public void DrawArrow(ToolStripArrowRenderEventArgs e) {            
     OnRenderArrow(e);
     
     ToolStripArrowRenderEventHandler eh = Events[EventRenderArrow] as ToolStripArrowRenderEventHandler;
     if (eh != null) {
         eh(this, e);
     }        
 }
开发者ID:JianwenSun,项目名称:cc,代码行数:9,代码来源:ToolStripRenderer.cs

示例15: OnRenderArrow

 /// <summary>Override - see base.</summary>
 protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
 {
     // The default renderer will draw an arrow for us (the UXTheme API seems not to have one for all directions),
     // but it will get the colour wrong in many cases. The text colour is probably the best colour to use.
     if (EnsureRenderer())
         e.ArrowColor = GetItemTextColor(e.Item);
     base.OnRenderArrow(e);
 }
开发者ID:RT-Projects,项目名称:RT.Util,代码行数:9,代码来源:NativeToolStripRenderer.cs


注:本文中的System.Windows.Forms.ToolStripArrowRenderEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。