public PaintScrollBarTrackEventArgs(System.Drawing.Graphics graphics, Rectangle trackRect, System.Windows.Forms.Orientation orientation, bool enabled)
 {
     this._graphics    = graphics;
     this._trackRect   = trackRect;
     this._orientation = orientation;
     this._enabled     = enabled;
 }
示例#2
0
        private int PositionToValue(int pos)
        {
            int height;
            int num2;

            System.Windows.Forms.Orientation orientation = this.orientation;
            if (orientation != System.Windows.Forms.Orientation.Horizontal)
            {
                if (orientation != System.Windows.Forms.Orientation.Vertical)
                {
                    throw ExceptionUtil.InvalidEnumArgumentException <System.Windows.Forms.Orientation>(this.orientation, "this.Orientation");
                }
            }
            else
            {
                height = base.Width;
                goto Label_0033;
            }
            height = base.Height;
Label_0033:
            num2 = (((height - 7) - (pos - 3)) * 0xff) / (height - 7);
            if (this.orientation == System.Windows.Forms.Orientation.Horizontal)
            {
                num2 = 0xff - num2;
            }
            return(num2);
        }
示例#3
0
        /// <summary>
        /// Gets the progress.
        /// </summary>
        /// <param name="orientation">The orientation.</param>
        /// <returns>System.Int32.</returns>
        private int GetProgress(System.Windows.Forms.Orientation orientation)
        {
            int num;

            num = (orientation != System.Windows.Forms.Orientation.Horizontal ? checked (checked ((int)Math.Round((double)this._Value / (double)this._Maximum * (double)(checked (this.Height - 2)))) + 1) : checked (checked ((int)Math.Round((double)this._Value / (double)this._Maximum * (double)(checked (this.Width - 2)))) + 1));
            return(num);
        }
示例#4
0
        private int ValueToPosition(int val)
        {
            int height;

            if (this.orientation == System.Windows.Forms.Orientation.Horizontal)
            {
                val = 0xff - val;
            }
            System.Windows.Forms.Orientation orientation = this.orientation;
            if (orientation != System.Windows.Forms.Orientation.Horizontal)
            {
                if (orientation != System.Windows.Forms.Orientation.Vertical)
                {
                    throw ExceptionUtil.InvalidEnumArgumentException <System.Windows.Forms.Orientation>(this.orientation, "this.Orientation");
                }
            }
            else
            {
                height = base.Width;
                goto Label_0044;
            }
            height = base.Height;
Label_0044:
            return(3 + ((height - 7) - ((val * (height - 7)) / 0xff)));
        }
 public PaintScrollBarTrackEventArgs(System.Drawing.Graphics graphics, Rectangle trackRect, System.Windows.Forms.Orientation orientation, bool enabled)
 {
     this._graphics = graphics;
     this._trackRect = trackRect;
     this._orientation = orientation;
     this._enabled = enabled;
 }
示例#6
0
        private void InvalidateTriangle(int index)
        {
            Rectangle rectangle;

            if ((index < 0) || (index >= this.vals.Length))
            {
                return;
            }
            int num = this.ValueToPosition(this.vals[index]);

            System.Windows.Forms.Orientation orientation = this.orientation;
            if (orientation != System.Windows.Forms.Orientation.Horizontal)
            {
                if (orientation != System.Windows.Forms.Orientation.Vertical)
                {
                    throw ExceptionUtil.InvalidEnumArgumentException <System.Windows.Forms.Orientation>(this.orientation, "this.Orientation");
                }
            }
            else
            {
                rectangle = new Rectangle(num - 3, 0, 7, base.Height);
                goto Label_0068;
            }
            rectangle = new Rectangle(0, num - 3, base.Width, 7);
Label_0068:
            base.Invalidate(rectangle, true);
        }
 public ScrollBarRenderTrackEventArgs(System.Drawing.Graphics graphics, Rectangle trackRect, System.Windows.Forms.Orientation orientation, bool enabled)
 {
     this.graphics_0    = graphics;
     this.rectangle_0   = trackRect;
     this.orientation_0 = orientation;
     this.bool_0        = enabled;
 }
示例#8
0
 public virtual void OnOrientationChanged(System.Windows.Forms.Orientation old)
 {
     if (this.Orientation == System.Windows.Forms.Orientation.Vertical)
     {
         if (this.InPort != null)
         {
             this.InPort.ToSpot   = 0x20;
             this.InPort.FromSpot = 0x20;
         }
         if (this.OutPort != null)
         {
             this.OutPort.ToSpot   = 0x80;
             this.OutPort.FromSpot = 0x80;
         }
     }
     else
     {
         if (this.InPort != null)
         {
             this.InPort.ToSpot   = 0x100;
             this.InPort.FromSpot = 0x100;
         }
         if (this.OutPort != null)
         {
             this.OutPort.ToSpot   = 0x40;
             this.OutPort.FromSpot = 0x40;
         }
     }
     this.LayoutChildren(null);
 }
示例#9
0
        public virtual void OnOrientationChanged(System.Windows.Forms.Orientation old)
        {
            int num1 = this.LeftPortsCount;

            for (int num2 = 0; num2 < num1; num2++)
            {
                GeneralNodePort port1 = this.GetLeftPort(num2);
                if (this.Orientation == System.Windows.Forms.Orientation.Vertical)
                {
                    port1.ToSpot   = 0x20;
                    port1.FromSpot = 0x20;
                }
                else
                {
                    port1.ToSpot   = 0x100;
                    port1.FromSpot = 0x100;
                }
            }
            num1 = this.RightPortsCount;
            for (int num3 = 0; num3 < num1; num3++)
            {
                GeneralNodePort port2 = this.GetRightPort(num3);
                if (this.Orientation == System.Windows.Forms.Orientation.Vertical)
                {
                    port2.ToSpot   = 0x80;
                    port2.FromSpot = 0x80;
                }
                else
                {
                    port2.ToSpot   = 0x40;
                    port2.FromSpot = 0x40;
                }
            }
            this.LayoutChildren(null);
        }
 public PaintScrollBarThumbEventArgs(System.Drawing.Graphics graphics, Rectangle thumbRect, ControlState controlState, System.Windows.Forms.Orientation orientation, bool enabled)
 {
     this._graphics     = graphics;
     this._thumbRect    = thumbRect;
     this._controlState = controlState;
     this._orientation  = orientation;
     this._enabled      = enabled;
 }
 public ScrollBarRenderThumbEventArgs(System.Drawing.Graphics graphics, Rectangle thumbRect, ControlState controlState, System.Windows.Forms.Orientation orientation, bool enabled)
 {
     this.graphics_0     = graphics;
     this.rectangle_0    = thumbRect;
     this.controlState_0 = controlState;
     this.orientation_0  = orientation;
     this.bool_0         = enabled;
 }
 public PaintScrollBarThumbEventArgs(System.Drawing.Graphics graphics, Rectangle thumbRect, CCWin.SkinClass.ControlState controlState, System.Windows.Forms.Orientation orientation, bool enabled)
 {
     this._graphics = graphics;
     this._thumbRect = thumbRect;
     this._controlState = controlState;
     this._orientation = orientation;
     this._enabled = enabled;
 }
 public PaintScrollBarArrowEventArgs(System.Drawing.Graphics graphics, Rectangle arrowRect, ControlState controlState, System.Windows.Forms.ArrowDirection arrowDirection, System.Windows.Forms.Orientation orientation, bool enabled)
 {
     this._graphics = graphics;
     this._arrowRect = arrowRect;
     this._controlState = controlState;
     this._arrowDirection = arrowDirection;
     this._orientation = orientation;
     this._enabled = enabled;
 }
 public PaintScrollBarArrowEventArgs(System.Drawing.Graphics graphics, Rectangle arrowRect, ControlState controlState, System.Windows.Forms.ArrowDirection arrowDirection, System.Windows.Forms.Orientation orientation, bool enabled)
 {
     this._graphics       = graphics;
     this._arrowRect      = arrowRect;
     this._controlState   = controlState;
     this._arrowDirection = arrowDirection;
     this._orientation    = orientation;
     this._enabled        = enabled;
 }
示例#15
0
 public BevelLine()
 {
     base.SetStyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true);
     this.bevelLineWidth  = 1;
     this.topLineColor    = SystemColors.ControlDark;
     this.bottomLineColor = SystemColors.ControlLightLight;
     this.orientation     = System.Windows.Forms.Orientation.Horizontal;
     this.blend           = false;
     this.angle           = 90;
 }
示例#16
0
 private void setOrientation(System.Windows.Forms.Orientation o, bool undoing)
 {
     System.Windows.Forms.Orientation orientation1 = this.myOrientation;
     if (orientation1 != o)
     {
         this.myOrientation = o;
         this.Changed(0x967, (int)orientation1, null, DiagramShape.NullRect, (int)o, null, DiagramShape.NullRect);
         this.OnOrientationChanged(orientation1);
     }
 }
 public ConnectorSegment(Point point1, Point point2)
 {
     if ((point1.X != point2.X) && (point1.Y != point2.Y))
     {
         throw new InvalidOperationException(SR.GetString("Error_InvalidConnectorSegment"));
     }
     this.point1      = point1;
     this.point2      = point2;
     this.orientation = (this.point1.X == this.point2.X) ? System.Windows.Forms.Orientation.Vertical : System.Windows.Forms.Orientation.Horizontal;
 }
            public ConnectorRouter.ConnectorSegment PeprendecularThroughPoint(Point p)
            {
                System.Windows.Forms.Orientation orientation = (this.orientation == System.Windows.Forms.Orientation.Horizontal) ? System.Windows.Forms.Orientation.Vertical : System.Windows.Forms.Orientation.Horizontal;
                Point point = new Point(p.X, p.Y);

                if (orientation == System.Windows.Forms.Orientation.Horizontal)
                {
                    point.X = 0x7fffffff;
                }
                else
                {
                    point.Y = 0x7fffffff;
                }
                return(new ConnectorRouter.ConnectorSegment(p, point));
            }
示例#19
0
 private int GetOrientedValue(Point pt)
 {
     System.Windows.Forms.Orientation orientation = this.orientation;
     if (orientation != System.Windows.Forms.Orientation.Horizontal)
     {
         if (orientation != System.Windows.Forms.Orientation.Vertical)
         {
             throw ExceptionUtil.InvalidEnumArgumentException <System.Windows.Forms.Orientation>(this.orientation, "this.Orientation");
         }
     }
     else
     {
         return(pt.X);
     }
     return(pt.Y);
 }
示例#20
0
        /// <summary>
        /// Apllies the orientation to the control and its child elements.
        /// </summary>
        /// <param name="value">The orientation to apply</param>
        /// <param name="fireEvents">Indicates whether events should be fired</param>
        protected virtual void SetOrientationCore(System.Windows.Forms.Orientation value, bool fireEvents)
        {
            CancelEventArgs args   = new CancelEventArgs();
            bool            cancel = (fireEvents) ? this.OnOrientationChanging(args) : false;

            if (cancel)
            {
                return;
            }

            this.RootElement.SuspendLayout(true);
            this.ApplyOrientation(value);
            this.commandBarElement.SetOrientationCore(value);
            this.RootElement.ResumeLayout(true, true);
            if (fireEvents)
            {
                this.OnOrientationChanged(new EventArgs());
            }
        }
 public ScrollableItemStrip(IServiceProvider serviceProvider, System.Windows.Forms.Orientation orientation, System.Drawing.Size itemSize, System.Drawing.Size margin)
 {
     if (serviceProvider == null)
     {
         throw new ArgumentNullException("serviceProvider");
     }
     this.serviceProvider = serviceProvider;
     this.orientation = orientation;
     this.margin = margin;
     if (orientation == System.Windows.Forms.Orientation.Horizontal)
     {
         this.buttonSize = new System.Drawing.Size((itemSize.Width * 2) / 3, itemSize.Height);
     }
     else
     {
         this.buttonSize = new System.Drawing.Size(itemSize.Width, (itemSize.Height * 2) / 3);
     }
     this.itemStrip = this.CreateItemStrip(serviceProvider, orientation, itemSize, margin);
     this.itemStrip.ScrollPositionChanged += new EventHandler(this.OnScrollPositionChanged);
 }
示例#22
0
 public ScrollableItemStrip(IServiceProvider serviceProvider, System.Windows.Forms.Orientation orientation, System.Drawing.Size itemSize, System.Drawing.Size margin)
 {
     if (serviceProvider == null)
     {
         throw new ArgumentNullException("serviceProvider");
     }
     this.serviceProvider = serviceProvider;
     this.orientation     = orientation;
     this.margin          = margin;
     if (orientation == System.Windows.Forms.Orientation.Horizontal)
     {
         this.buttonSize = new System.Drawing.Size((itemSize.Width * 2) / 3, itemSize.Height);
     }
     else
     {
         this.buttonSize = new System.Drawing.Size(itemSize.Width, (itemSize.Height * 2) / 3);
     }
     this.itemStrip = this.CreateItemStrip(serviceProvider, orientation, itemSize, margin);
     this.itemStrip.ScrollPositionChanged += new EventHandler(this.OnScrollPositionChanged);
 }
示例#23
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ZeroitMetroProgressbar" /> class.
 /// </summary>
 public ZeroitMetroProgressbar()
 {
     this._Style           = Design.Style.Light;
     this._Orientation     = System.Windows.Forms.Orientation.Horizontal;
     this._Value           = 50;
     this._Maximum         = 100;
     this._ProgressColor   = Design.MetroColors.AccentBlue;
     this._DefaultColor    = Design.MetroColors.LightDefault;
     this._BorderColor     = Design.MetroColors.LightBorder;
     this._gradientColor   = Design.MetroColors.ChangeColorBrightness(this._ProgressColor, -0.2f);
     this._DrawBorder      = true;
     this._ShowValueAsText = false;
     this._UseGradient     = true;
     this._SpecialSymbol   = "%";
     this._IsRound         = false;
     this._RoundingArc     = this.Height;
     this._AutoStyle       = true;
     this.Size             = new System.Drawing.Size(200, 25);
     this.SetStyle(ControlStyles.UserPaint | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
     this.UpdateStyles();
 }
示例#24
0
        private void UpdateDropDown()
        {
            _drawDropDown.Visible       = _dropDown;
            _drawSplitBorder.Visible    = _splitter & _dropDown;
            _drawOuterSeparator.Visible = !_splitter & _dropDown;
            _drawCanvas.Splitter        = _splitter & _dropDown;

            ViewDockStyle dockStyle = ViewDockStyle.Right;

            System.Windows.Forms.Orientation splitOrientation = System.Windows.Forms.Orientation.Vertical;
            switch (_dropDownPosition)
            {
            case VisualOrientation.Top:
                dockStyle        = ViewDockStyle.Top;
                splitOrientation = System.Windows.Forms.Orientation.Horizontal;
                break;

            case VisualOrientation.Bottom:
                dockStyle        = ViewDockStyle.Bottom;
                splitOrientation = System.Windows.Forms.Orientation.Horizontal;
                break;

            case VisualOrientation.Left:
                dockStyle        = ViewDockStyle.Left;
                splitOrientation = System.Windows.Forms.Orientation.Vertical;
                break;

            case VisualOrientation.Right:
                dockStyle        = ViewDockStyle.Right;
                splitOrientation = System.Windows.Forms.Orientation.Vertical;
                break;
            }

            _drawSplitBorder.Orientation       = splitOrientation;
            _drawSplitBorder.VisualOrientation = Orientation;
            _layoutDocker.SetDock(_drawSplitBorder, dockStyle);
            _layoutDocker.SetDock(_drawDropDown, dockStyle);
            _layoutDocker.SetDock(_drawOuterSeparator, dockStyle);
        }
 public static ConnectorRouter.ConnectorSegment ConstructBoundSegment(ConnectorRouter.CoverSet coverSet, Point a, System.Windows.Forms.Orientation orientation)
 {
     if (orientation != System.Windows.Forms.Orientation.Horizontal)
     {
         return(SegmentFromBottomToTopCover(coverSet, a));
     }
     return(SegmentFromLeftToRightCover(coverSet, a));
 }
 public ScrollBarRenderTrackEventArgs(System.Drawing.Graphics graphics, Rectangle trackRect, System.Windows.Forms.Orientation orientation) : this(graphics, trackRect, orientation, true)
 {
 }
示例#27
0
 public static extern int SetScrollPos(IntPtr hWnd, System.Windows.Forms.Orientation nBar, int nPos, bool bRedraw);
示例#28
0
 protected abstract ItemStrip CreateItemStrip(IServiceProvider serviceProvider, System.Windows.Forms.Orientation orientation, System.Drawing.Size itemSize, System.Drawing.Size margin);
 public ScrollBarRenderThumbEventArgs(System.Drawing.Graphics graphics, Rectangle thumbRect, ControlState controlState, System.Windows.Forms.Orientation orientation) : this(graphics, thumbRect, controlState, orientation, true)
 {
 }
 public static extern int GetScrollPos(IntPtr hWnd, System.Windows.Forms.Orientation nBar);
示例#31
0
 public ScrollBarRenderArrowEventArgs(System.Drawing.Graphics graphics, Rectangle arrowRect, ControlState controlState, System.Windows.Forms.ArrowDirection arrowDirection, System.Windows.Forms.Orientation orientation) : this(graphics, arrowRect, controlState, arrowDirection, orientation, true)
 {
 }
示例#32
0
        private void DrawGradient(Graphics g)
        {
            Rectangle rectangle;
            double    num;

            g.PixelOffsetMode = PixelOffsetMode.Half;
            System.Windows.Forms.Orientation orientation = this.orientation;
            if (orientation != System.Windows.Forms.Orientation.Horizontal)
            {
                if (orientation != System.Windows.Forms.Orientation.Vertical)
                {
                    throw ExceptionUtil.InvalidEnumArgumentException <System.Windows.Forms.Orientation>(this.orientation, "this.Orientation");
                }
            }
            else
            {
                num = 180.0;
                goto Label_0040;
            }
            num = 90.0;
Label_0040:
            rectangle   = base.ClientRectangle;
            orientation = this.orientation;
            if (orientation != System.Windows.Forms.Orientation.Horizontal)
            {
                if (orientation != System.Windows.Forms.Orientation.Vertical)
                {
                    throw ExceptionUtil.InvalidEnumArgumentException <System.Windows.Forms.Orientation>(this.orientation, "this.Orientation");
                }
            }
            else
            {
                rectangle.Inflate(-3, -4);
                goto Label_0082;
            }
            rectangle.Inflate(-4, -3);
Label_0082:
            if (((this.customGradient != null) && (rectangle.Width > 1)) && (rectangle.Height > 1))
            {
                Surface surface = new Surface(rectangle.Size.ToSizeInt32());
                using (RenderArgs args = new RenderArgs(surface))
                {
                    ColorRectangle.Draw(args.Graphics, args.Bounds, Color.Transparent, true, false);
                    if (this.Orientation == System.Windows.Forms.Orientation.Horizontal)
                    {
                        for (int j = 0; j < surface.Width; j++)
                        {
                            double num16;
                            double num17;
                            double num18;
                            double d             = ((double)(j * (this.customGradient.Length - 1))) / ((double)(surface.Width - 1));
                            int    index         = (int)Math.Floor(d);
                            double num5          = 1.0 - (d - index);
                            int    num6          = (int)Math.Min((double)(this.customGradient.Length - 1), Math.Ceiling(d));
                            Color  c             = this.customGradient[index];
                            Color  disabledColor = this.customGradient[num6];
                            if (!base.Enabled)
                            {
                                c             = DisabledRendering.GetDisabledColor(c);
                                disabledColor = DisabledRendering.GetDisabledColor(disabledColor);
                            }
                            double num7  = ((double)c.A) / 255.0;
                            double num8  = ((double)c.R) / 255.0;
                            double num9  = ((double)c.G) / 255.0;
                            double num10 = ((double)c.B) / 255.0;
                            double num11 = ((double)disabledColor.A) / 255.0;
                            double num12 = ((double)disabledColor.R) / 255.0;
                            double num13 = ((double)disabledColor.G) / 255.0;
                            double num14 = ((double)disabledColor.B) / 255.0;
                            double num15 = (num5 * num7) + ((1.0 - num5) * num11);
                            if (num15 == 0.0)
                            {
                                num16 = 0.0;
                                num17 = 0.0;
                                num18 = 0.0;
                            }
                            else
                            {
                                num16 = (((num5 * num7) * num8) + (((1.0 - num5) * num11) * num12)) / num15;
                                num17 = (((num5 * num7) * num9) + (((1.0 - num5) * num11) * num13)) / num15;
                                num18 = (((num5 * num7) * num10) + (((1.0 - num5) * num11) * num14)) / num15;
                            }
                            int num19 = ((int)Math.Round((double)(num15 * 255.0), MidpointRounding.AwayFromZero)).Clamp(0, 0xff);
                            int num20 = ((int)Math.Round((double)(num16 * 255.0), MidpointRounding.AwayFromZero)).Clamp(0, 0xff);
                            int num21 = ((int)Math.Round((double)(num17 * 255.0), MidpointRounding.AwayFromZero)).Clamp(0, 0xff);
                            int num22 = ((int)Math.Round((double)(num18 * 255.0), MidpointRounding.AwayFromZero)).Clamp(0, 0xff);
                            for (int k = 0; k < surface.Height; k++)
                            {
                                ColorBgra bgra  = surface[j, k];
                                int       num24 = ((num20 * num19) + (bgra.R * (0xff - num19))) / 0xff;
                                int       num25 = ((num21 * num19) + (bgra.G * (0xff - num19))) / 0xff;
                                int       num26 = ((num22 * num19) + (bgra.B * (0xff - num19))) / 0xff;
                                surface[j, k] = ColorBgra.FromBgra((byte)num26, (byte)num25, (byte)num24, 0xff);
                            }
                        }
                        g.DrawImage(args.Bitmap, rectangle, args.Bounds, GraphicsUnit.Pixel);
                    }
                    else if (this.Orientation != System.Windows.Forms.Orientation.Vertical)
                    {
                        throw ExceptionUtil.InvalidEnumArgumentException <System.Windows.Forms.Orientation>(this.orientation, "this.Orientation");
                    }
                }
                surface.Dispose();
            }
            else
            {
                Color color3 = base.Enabled ? this.maxColor : DisabledRendering.GetDisabledColor(this.maxColor);
                Color color4 = base.Enabled ? this.minColor : DisabledRendering.GetDisabledColor(this.minColor);
                using (LinearGradientBrush brush = new LinearGradientBrush(base.ClientRectangle, color3, color4, (float)num, false))
                {
                    g.FillRectangle(brush, rectangle);
                }
            }
            using (PdnRegion region = new PdnRegion())
            {
                region.MakeInfinite();
                region.Exclude(rectangle);
                using (SolidBrush brush2 = new SolidBrush(this.BackColor))
                {
                    g.FillRegion(brush2, region.GetRegionReadOnly());
                }
            }
            for (int i = 0; i < this.vals.Length; i++)
            {
                Brush blue;
                Pen   pen;
                Point point;
                Point point2;
                Point point3;
                Point point4;
                Point point5;
                Point point6;
                int   x = this.ValueToPosition(this.vals[i]);
                if (i == this.highlight)
                {
                    blue = Brushes.Blue;
                    pen  = (Pen)Pens.White.Clone();
                }
                else
                {
                    blue = base.Enabled ? Brushes.Black : Brushes.Gray;
                    pen  = (Pen)Pens.Gray.Clone();
                }
                g.SmoothingMode = SmoothingMode.AntiAlias;
                orientation     = this.orientation;
                if (orientation != System.Windows.Forms.Orientation.Horizontal)
                {
                    if (orientation != System.Windows.Forms.Orientation.Vertical)
                    {
                        throw ExceptionUtil.InvalidEnumArgumentException <System.Windows.Forms.Orientation>(this.orientation, "this.Orientation");
                    }
                }
                else
                {
                    point  = new Point(x - 3, 0);
                    point2 = new Point(x, 6);
                    point3 = new Point(x + 3, 0);
                    point4 = new Point(point.X, (base.Height - 1) - point.Y);
                    point5 = new Point(point2.X, (base.Height - 1) - point2.Y);
                    point6 = new Point(point3.X, (base.Height - 1) - point3.Y);
                    goto Label_0678;
                }
                point  = new Point(0, x - 3);
                point2 = new Point(6, x);
                point3 = new Point(0, x + 3);
                point4 = new Point((base.Width - 1) - point.X, point.Y);
                point5 = new Point((base.Width - 1) - point2.X, point2.Y);
                point6 = new Point((base.Width - 1) - point3.X, point3.Y);
Label_0678:
                if (this.drawNearNub)
                {
                    Point[] points = new Point[] { point, point2, point3, point };
                    g.FillPolygon(blue, points);
                }
                if (this.drawFarNub)
                {
                    Point[] pointArray2 = new Point[] { point4, point5, point6, point4 };
                    g.FillPolygon(blue, pointArray2);
                }
                if (pen != null)
                {
                    if (this.drawNearNub)
                    {
                        Point[] pointArray3 = new Point[] { point, point2, point3, point };
                        g.DrawPolygon(pen, pointArray3);
                    }
                    if (this.drawFarNub)
                    {
                        Point[] pointArray4 = new Point[] { point4, point5, point6, point4 };
                        g.DrawPolygon(pen, pointArray4);
                    }
                    pen.Dispose();
                }
            }
        }