• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ArrowDirection类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ToolStripArrowRenderEventArgs

 /// <include file='doc\ToolStripArrowRenderEventArgs.uex' path='docs/doc[@for="ToolStripArrowRenderEventArgs.ToolStripArrowRenderEventArgs"]/*' />
 public ToolStripArrowRenderEventArgs(Graphics g, ToolStripItem toolStripItem, Rectangle arrowRectangle, Color arrowColor, ArrowDirection arrowDirection) {
     this.item = toolStripItem;
     this.graphics = g;
     this.arrowRect = arrowRectangle;
     this.defaultArrowColor = arrowColor;
     this.arrowDirection = arrowDirection;
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:8,代码来源:ToolStripArrowRenderEventArgs.cs


示例2: DrawDisabled

 protected override void DrawDisabled(Graphics g, ArrowDirection direction)
 {
     g.DrawEllipse(_disabledPen, _circleRect);
     if (direction == ArrowDirection.Right)
         g.MultiplyTransform(new Matrix(-1, 0, 0, 1, 23, 0));
     g.DrawPath(_disabledArrowPen, _arrowPath);
 }
开发者ID:vainamov,项目名称:nUpdate,代码行数:7,代码来源:MetroTemplate.cs


示例3: CheckSolution

 public override void CheckSolution(ArrowDirection arrowDirection)
 {
     if (arrowDirection == ArrowDirection.UP)
     {
         this.correct = true;
     }
 }
开发者ID:Zerophase,项目名称:SplitAlphaBuild,代码行数:7,代码来源:ArrowSolution_OneInput.cs


示例4: MoveModelToView

        public override void MoveModelToView(ArchetypeData model)
        {
            base.MoveModelToView(model);
                        
            var m = model as ArrowWorldObjectArchetypeData;

            this.ArrowDirection = m.ArrowDirection;
        }
开发者ID:HaKDMoDz,项目名称:Zazumo,代码行数:8,代码来源:ArrowWorldObjectArchetypeDataViewModel.cs


示例5: DrawHover

 protected override void DrawHover(Graphics g, ArrowDirection direction)
 {
     g.FillEllipse(_hoverBrush,
         new RectangleF(_circleRect.X - 0.5f, _circleRect.Y - 0.5f, _circleRect.Width + 1,
             _circleRect.Height + 1));
     if (direction == ArrowDirection.Right)
         g.MultiplyTransform(new Matrix(-1, 0, 0, 1, 23, 0));
     g.DrawPath(_hoverArrowPen, _arrowPath);
 }
开发者ID:vainamov,项目名称:nUpdate,代码行数:9,代码来源:MetroTemplate.cs


示例6: ToolStripArrowRenderEventArgs

		public ToolStripArrowRenderEventArgs (Graphics g, ToolStripItem toolStripItem, Rectangle arrowRectangle, Color arrowColor, ArrowDirection arrowDirection)
			: base ()
		{
			this.graphics = g;
			this.tool_strip_item = toolStripItem;
			this.arrow_rectangle = arrowRectangle;
			this.arrow_color = arrowColor;
			this.arrow_direction = arrowDirection;
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:9,代码来源:ToolStripArrowRenderEventArgs.cs


示例7: UpdateShape

        protected override void UpdateShape(ArrowDirection pointerDirection)
        {
            switch (pointerDirection)
            {
                case ArrowDirection.Left: ShapePathData = Shapes.RoundedPointerLeft; break;
                case ArrowDirection.Right: ShapePathData = Shapes.RoundedPointerRight; break;
                case ArrowDirection.Up: ShapePathData = Shapes.RoundedPointerUp; break;
                case ArrowDirection.Down: ShapePathData = Shapes.RoundedPointerDown; break;

                default: throw new NotSupportedException(PointerDirection.ToString());
            }
        }
开发者ID:philcockfield,项目名称:Open.TestHarness.SL,代码行数:12,代码来源:RoundedPointerButton.cs


示例8: PaintScrollBarArrowEventArgs

 public PaintScrollBarArrowEventArgs(
     Graphics graphics,
     Rectangle arrowRect,
     ControlState controlState,
     ArrowDirection arrowDirection,
     Orientation orientation)
     : this(graphics,
     arrowRect,
     controlState,
     arrowDirection,
     orientation,
     true)
 {
 }
开发者ID:panshuiqing,项目名称:winform-ui,代码行数:14,代码来源:PaintScrollBarArrowEventArgs.cs


示例9: CheckSolution

 public override void CheckSolution(ArrowDirection arrowDirection)
 {
     orderPressed.Add(arrowDirection);
     //left, up, right, down
     for (int i = 0; i < orderPressed.Count; i++)
     {
         switch (i)
         {
             case 0:
                 if (orderPressed[i] == ArrowDirection.LEFT)
                 {
                     Debug.Log("Left");
                 }
                 else
                     orderPressed.Clear();
                 break;
             case 1:
                 if (orderPressed[i] == ArrowDirection.UP)
                 {
                     Debug.Log("Up");
                 }
                 else
                     orderPressed.Clear();
                 break;
             case 2:
                 if (orderPressed[i] == ArrowDirection.RIGHT)
                 {
                     Debug.Log("Right");
                 }
                 else
                     orderPressed.Clear();
                 break;
             case 3:
                 if (orderPressed[i] == ArrowDirection.DOWN)
                 {
                     this.correct = true;
                 }
                 else
                     orderPressed.Clear();
                 break;
             default:
                 break;
         }
     }
 }
开发者ID:Zerophase,项目名称:SplitAlphaBuild,代码行数:45,代码来源:ArrowSolution_OneDImensionWalls.cs


示例10: Draw

 public void Draw(Graphics g, ArrowDirection direction, ButtonState state)
 {
     switch (state)
     {
         case ButtonState.Hover:
             DrawHover(g, direction);
             break;
         case ButtonState.Disabled:
             DrawDisabled(g, direction);
             break;
         case ButtonState.Pressed:
             DrawPressed(g, direction);
             break;
         default:
             DrawNormal(g, direction);
             break;
     }
 }
开发者ID:chantsunman,项目名称:nUpdate,代码行数:18,代码来源:Template.cs


示例11: AddSegment

        private static void AddSegment(GraphicsPath path, int radius, Point p1, Point p2, bool roundP1, bool roundP2, ArrowDirection direction)
        {
            if (roundP1)
            {
                switch (direction)
                {
                    case ArrowDirection.Left:
                        p1.X -= radius;
                        goto Label_005C;

                    case ArrowDirection.Up:
                        p1.Y -= radius;
                        goto Label_005C;

                    case ArrowDirection.Down:
                        p1.Y += radius;
                        goto Label_005C;
                }
                p1.X += radius;
            }
        Label_005C:
            if (roundP2)
            {
                switch (direction)
                {
                    case ArrowDirection.Left:
                        p2.X += radius;
                        goto Label_00B8;

                    case ArrowDirection.Up:
                        p2.Y += radius;
                        goto Label_00B8;

                    case ArrowDirection.Down:
                        p2.Y -= radius;
                        goto Label_00B8;
                }
                p2.X -= radius;
            }
        Label_00B8:
            path.AddLine(p1, p2);
        }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:42,代码来源:StateMachineDesignerPaint.cs


示例12: RenderArrowInternal

        internal static void RenderArrowInternal(
            Graphics g,
            Rectangle dropDownRect,
            ArrowDirection direction,
            Brush brush)
        {
            Point point = new Point(
                dropDownRect.Left + (dropDownRect.Width / 2),
                dropDownRect.Top + (dropDownRect.Height / 2));
            Point[] points = null;
            switch (direction)
            {
                case ArrowDirection.Left:
                    points = new Point[] {
                        new Point(point.X + 1, point.Y - 4),
                        new Point(point.X + 1, point.Y + 4),
                        new Point(point.X - 2, point.Y) };
                    break;

                case ArrowDirection.Up:
                    points = new Point[] {
                        new Point(point.X - 4, point.Y + 1),
                        new Point(point.X + 4, point.Y + 1),
                        new Point(point.X, point.Y - 2) };
                    break;

                case ArrowDirection.Right:
                    points = new Point[] {
                        new Point(point.X - 2, point.Y - 4),
                        new Point(point.X - 2, point.Y + 4),
                        new Point(point.X + 1, point.Y) };
                    break;

                default:
                    points = new Point[] {
                        new Point(point.X - 4, point.Y - 1),
                        new Point(point.X + 4, point.Y - 1),
                        new Point(point.X, point.Y + 2) };
                    break;
            }
            g.FillPolygon(brush, points);
        }
开发者ID:piaolingzxh,项目名称:Justin,代码行数:42,代码来源:RenderHelper.cs


示例13: AddRoundedCorner

        private static void AddRoundedCorner(GraphicsPath path, int diameter, Point midPoint, ArrowDirection direction1, ArrowDirection direction2)
        {
            switch (direction1)
            {
                case ArrowDirection.Left:
                    if (direction2 != ArrowDirection.Down)
                    {
                        path.AddArc(midPoint.X, midPoint.Y - diameter, diameter, diameter, 90f, 90f);
                        return;
                    }
                    path.AddArc(midPoint.X, midPoint.Y, diameter, diameter, 270f, -90f);
                    return;

                case ArrowDirection.Up:
                    if (direction2 != ArrowDirection.Left)
                    {
                        path.AddArc(midPoint.X, midPoint.Y, diameter, diameter, 180f, 90f);
                        return;
                    }
                    path.AddArc(midPoint.X - diameter, midPoint.Y, diameter, diameter, 0f, -90f);
                    return;

                case ArrowDirection.Right:
                    if (direction2 == ArrowDirection.Down)
                    {
                        path.AddArc(midPoint.X - diameter, midPoint.Y, diameter, diameter, 270f, 90f);
                        return;
                    }
                    path.AddArc(midPoint.X - diameter, midPoint.Y - diameter, diameter, diameter, 90f, -90f);
                    return;
            }
            if (direction2 == ArrowDirection.Left)
            {
                path.AddArc(midPoint.X - diameter, midPoint.Y - diameter, diameter, diameter, 0f, 90f);
            }
            else
            {
                path.AddArc(midPoint.X, midPoint.Y - diameter, diameter, diameter, 180f, -90f);
            }
        }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:40,代码来源:StateMachineDesignerPaint.cs


示例14: CreateTrianglePath

        /// <summary>
        /// Creates a triangle based on the size and bounds sectors
        /// </summary>
        /// <param name="Bounds">The area which the triangle is confined to</param>
        /// <param name="Size">The size of the triangle</param>
        /// <param name="Direction">The direction which the triangle is pointing</param>
        /// <returns></returns>
        private GraphicsPath CreateTrianglePath(Rectangle Bounds, Int32 Size, ArrowDirection Direction)
        {
            GraphicsPath Result = new GraphicsPath();
            int x, y, c, j;

            if (Direction == ArrowDirection.Left || Direction == ArrowDirection.Right)
            {
                x = Bounds.Right - (Bounds.Width - Size) / 2;
                y = Bounds.Y + Bounds.Height / 2;
                c = Size;
                j = 0;
            }
            else
            {
                x = Bounds.X + Bounds.Width / 2;
                y = Bounds.Bottom - ((Bounds.Height - (Size - 1)) / 2);
                c = Size - 1;
                j = Size - 2;
            }

            switch (Direction)
            {
                case ArrowDirection.Right:
                    Result.AddLine(x, y, x - c, y - c);
                    Result.AddLine(x - c, y - c, x - c, y + c);
                    Result.AddLine(x - c, y + c, x, y);
                    break;
                case ArrowDirection.Down:
                    Result.AddLine(x + j, y - j, x - j, y - j);
                    Result.AddLine(x - j, y - j, x, y);
                    Result.AddLine(x, y, x + j, y - j);
                    break;
                case ArrowDirection.Left:
                    Result.AddLine(x - c, y, x, y - c);
                    Result.AddLine(x, y - c, x, y + c);
                    Result.AddLine(x, y + c, x - c, y);
                    break;
            }

            return Result;
        }
开发者ID:nicholatian,项目名称:monody,代码行数:48,代码来源:EasyRenderBase.cs


示例15: GetNextItem

 internal virtual ToolStripItem GetNextItem(ToolStripItem start, ArrowDirection direction, bool rtlAware)
 {
     if (rtlAware && (this.RightToLeft == RightToLeft.Yes))
     {
         if (direction == ArrowDirection.Right)
         {
             direction = ArrowDirection.Left;
         }
         else if (direction == ArrowDirection.Left)
         {
             direction = ArrowDirection.Right;
         }
     }
     return this.GetNextItem(start, direction);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:15,代码来源:ToolStrip.cs


示例16: RenderArrowInternal

        /// <summary>
        /// Renders the arrows in the OverflowButton.
        /// </summary>
        /// <param name="graphics">The Graphics to draw on.</param>
        /// <param name="dropDownRectangle">The rectangle in which the arrows should drawn.</param>
        /// <param name="direction">the direction of the arrows.</param>
        /// <param name="color">The color used to fill the arrow polygons</param>
        private static void RenderArrowInternal(Graphics graphics, Rectangle dropDownRectangle, ArrowDirection direction, Color color)
        {
            Point point = new Point(dropDownRectangle.Left + (dropDownRectangle.Width / 2), dropDownRectangle.Top + (dropDownRectangle.Height / 2));
            point.X += dropDownRectangle.Width % 2;
            Point[] points = null;
            switch (direction)
            {
                case ArrowDirection.Left:
                    points = new Point[] { new Point(point.X + 2, point.Y - 3), new Point(point.X + 2, point.Y + 3), new Point(point.X - 1, point.Y) };
                    break;

                case ArrowDirection.Up:
                    points = new Point[] { new Point(point.X - 2, point.Y + 1), new Point(point.X + 3, point.Y + 1), new Point(point.X, point.Y - 2) };
                    break;

                case ArrowDirection.Right:
                    points = new Point[] { new Point(point.X - 2, point.Y - 3), new Point(point.X - 2, point.Y + 3), new Point(point.X + 1, point.Y) };
                    break;

                default:
                    points = new Point[] { new Point(point.X - 2, point.Y - 1), new Point(point.X + 3, point.Y - 1), new Point(point.X, point.Y + 2) };
                    break;
            }
            using (SolidBrush backBrush = new SolidBrush(color))
            {
                graphics.FillPolygon(backBrush, points);
            }
        }
开发者ID:mikhp,项目名称:greatmaps,代码行数:35,代码来源:BseRenderer.cs


示例17: RenderButton

 public void RenderButton(Graphics g, Rectangle rect, Color baseColor, Color borderColor, Color arrowColor, ArrowDirection direction)
 {
     this.RenderBackgroundInternal(g, rect, baseColor, borderColor, 0.45f, true, LinearGradientMode.Vertical);
     using (SolidBrush brush = new SolidBrush(arrowColor))
     {
         this.RenderArrowInternal(g, rect, direction, brush);
     }
 }
开发者ID:zhushengwen,项目名称:example-zhushengwen,代码行数:8,代码来源:SkinNumericUpDown.cs


示例18: RenderArrowInternal

        public void RenderArrowInternal(Graphics g, Rectangle dropDownRect, ArrowDirection direction, Brush brush)
        {
            System.Drawing.Point point = new System.Drawing.Point(dropDownRect.Left + (dropDownRect.Width / 2), dropDownRect.Top + (dropDownRect.Height / 2));
            System.Drawing.Point[] points = null;
            switch (direction)
            {
                case ArrowDirection.Left:
                    points = new System.Drawing.Point[] { new System.Drawing.Point(point.X + 2, point.Y - 3), new System.Drawing.Point(point.X + 2, point.Y + 3), new System.Drawing.Point(point.X - 1, point.Y) };
                    break;

                case ArrowDirection.Up:
                    points = new System.Drawing.Point[] { new System.Drawing.Point(point.X - 3, point.Y + 1), new System.Drawing.Point(point.X + 3, point.Y + 1), new System.Drawing.Point(point.X, point.Y - 1) };
                    break;

                case ArrowDirection.Right:
                    points = new System.Drawing.Point[] { new System.Drawing.Point(point.X - 2, point.Y - 3), new System.Drawing.Point(point.X - 2, point.Y + 3), new System.Drawing.Point(point.X + 1, point.Y) };
                    break;

                default:
                    points = new System.Drawing.Point[] { new System.Drawing.Point(point.X - 3, point.Y - 1), new System.Drawing.Point(point.X + 3, point.Y - 1), new System.Drawing.Point(point.X, point.Y + 1) };
                    break;
            }
            g.FillPolygon(brush, points);
        }
开发者ID:zhushengwen,项目名称:example-zhushengwen,代码行数:24,代码来源:SkinNumericUpDown.cs


示例19: RenderScrollBarArrowInternal

 internal void RenderScrollBarArrowInternal(Graphics g, Rectangle rect, Color baseColor, Color borderColor, Color innerBorderColor, Color arrowColor, RoundStyle roundStyle, bool drawBorder, bool drawGlass, ArrowDirection arrowDirection, LinearGradientMode mode)
 {
     RenderHelper.RenderBackgroundInternal(g, rect, baseColor, borderColor, innerBorderColor, roundStyle, 0, 0.45f, drawBorder, drawGlass, mode);
     using (SolidBrush brush = new SolidBrush(arrowColor))
     {
         this.RenderArrowInternal(g, rect, arrowDirection, brush);
     }
 }
开发者ID:jxdong1013,项目名称:archivems,代码行数:8,代码来源:SkinComboBox.cs


示例20: CreateArrowPath

        private GraphicsPath CreateArrowPath(ToolStripItem item,
                                             Rectangle rect,
                                             ArrowDirection direction)
        {
            int x, y;

            // Find the correct starting position, which depends on direction
            if ((direction == ArrowDirection.Left) ||
                (direction == ArrowDirection.Right))
            {
                x = rect.Right - (rect.Width - 4)/2;
                y = rect.Y + rect.Height/2;
            }
            else
            {
                x = rect.X + rect.Width/2;
                y = rect.Bottom - (rect.Height - 3)/2;

                // The drop down button is position 1 pixel incorrectly when in RTL
                if ((item is ToolStripDropDownButton) &&
                    (item.RightToLeft == RightToLeft.Yes))
                    x++;
            }

            // Create triangle using a series of lines
            GraphicsPath path = new GraphicsPath();

            switch (direction)
            {
                case ArrowDirection.Right:
                    path.AddLine(x, y, x - 4, y - 4);
                    path.AddLine(x - 4, y - 4, x - 4, y + 4);
                    path.AddLine(x - 4, y + 4, x, y);
                    break;
                case ArrowDirection.Left:
                    path.AddLine(x - 4, y, x, y - 4);
                    path.AddLine(x, y - 4, x, y + 4);
                    path.AddLine(x, y + 4, x - 4, y);
                    break;
                case ArrowDirection.Down:
                    path.AddLine(x + 3f, y - 3f, x - 2f, y - 3f);
                    path.AddLine(x - 2f, y - 3f, x, y);
                    path.AddLine(x, y, x + 3f, y - 3f);
                    break;
                case ArrowDirection.Up:
                    path.AddLine(x + 3f, y, x - 3f, y);
                    path.AddLine(x - 3f, y, x, y - 4f);
                    path.AddLine(x, y - 4f, x + 3f, y);
                    break;
            }

            return path;
        }
开发者ID:RSchwoerer,项目名称:Terminals,代码行数:53,代码来源:Office2007Renderer.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Article类代码示例发布时间:2022-05-24
下一篇:
C# ArrayType类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap