Пример #1
0
 // Methods
 public Shape()
 {
     base.Paint          += new PaintEventHandler(this.Shape_Paint);
     this._Corners        = new CornersProperty();
     this._FocalPoints    = new cFocalPoints(0.5, 0.5, 0.0, 0.0);
     this._BorderStyle    = DashStyle.Solid;
     this._RadiusInner    = 0f;
     this._BorderShow     = true;
     this._BorderWidth    = 2f;
     this._ColorFillSolid = SystemColors.Control;
     Color[] S0 = new Color[] { Color.White, Color.White };
     this._ColorFillBlend = new cBlendItems(S0, new float[] { 0f, 1f });
     this._FillType       = eFillType.Solid;
     this._FillTypeLinear = LinearGradientMode.Horizontal;
     this._BorderColor    = Color.Black;
     this._RegionClip     = false;
     this.InitializeComponent();
     this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
     this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
     this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
 }
Пример #2
0
 // Methods
 public Shape()
 {
     base.Paint += new PaintEventHandler(this.Shape_Paint);
     this._Corners = new CornersProperty();
     this._FocalPoints = new cFocalPoints(0.5, 0.5, 0.0, 0.0);
     this._BorderStyle = DashStyle.Solid;
     this._RadiusInner = 0f;
     this._BorderShow = true;
     this._BorderWidth = 2f;
     this._ColorFillSolid = SystemColors.Control;
     Color[] S0 = new Color[] { Color.White, Color.White };
     this._ColorFillBlend = new cBlendItems(S0, new float[] { 0f, 1f });
     this._FillType = eFillType.Solid;
     this._FillTypeLinear = LinearGradientMode.Horizontal;
     this._BorderColor = Color.Black;
     this._RegionClip = false;
     this.InitializeComponent();
     this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
     this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
     this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
 }
Пример #3
0
        private void InitializeComponent()
        {
            cBlendItems cBlendItems1 = new cBlendItems();
            cFocalPoints cFocalPoints1 = new cFocalPoints();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DropdownShapeEditor));
            cBlendItems cBlendItems2 = new cBlendItems();
            cFocalPoints cFocalPoints2 = new cFocalPoints();
            cBlendItems cBlendItems3 = new cBlendItems();
            cFocalPoints cFocalPoints3 = new cFocalPoints();
            cBlendItems cBlendItems4 = new cBlendItems();
            cFocalPoints cFocalPoints4 = new cFocalPoints();
            this._sDiamond = new Shape();
            this._sTriangle = new Shape();
            this._sRectangle = new Shape();
            this._sCircle = new Shape();
            this.SuspendLayout();
            // 
            // _sDiamond
            // 
            this._sDiamond.BorderColor = System.Drawing.Color.Black;
            this._sDiamond.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid;
            this._sDiamond.BorderWidth = 2F;
            cBlendItems1.iColor = new System.Drawing.Color[] {
                                                                 System.Drawing.Color.White,
                                                                 System.Drawing.Color.White};
            cBlendItems1.iPoint = new float[] {
                                                  0F,
                                                  1F};
            this._sDiamond.ColorFillBlend = cBlendItems1;
            this._sDiamond.ColorFillSolid = System.Drawing.SystemColors.Control;
            this._sDiamond.Corners.All = ((short)(0));
            this._sDiamond.Corners.LowerLeft = ((short)(0));
            this._sDiamond.Corners.LowerRight = ((short)(0));
            this._sDiamond.Corners.UpperLeft = ((short)(0));
            this._sDiamond.Corners.UpperRight = ((short)(0));
            this._sDiamond.FillType = Shape.eFillType.Solid;
            this._sDiamond.FillTypeLinear = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
            cFocalPoints1.CenterPoint = ((System.Drawing.PointF)(resources.GetObject("cFocalPoints1.CenterPoint")));
            cFocalPoints1.FocusScales = ((System.Drawing.PointF)(resources.GetObject("cFocalPoints1.FocusScales")));
            this._sDiamond.FocalPoints = cFocalPoints1;
            this._sDiamond.Location = new System.Drawing.Point(175, 3);
            this._sDiamond.Name = "_sDiamond";
            this._sDiamond.RadiusInner = 0F;
            this._sDiamond.RegionClip = false;
            this._sDiamond.ShapeType = Shape.eShape.Diamond;
            this._sDiamond.Size = new System.Drawing.Size(50, 50);
            this._sDiamond.TabIndex = 3;
            this._sDiamond.Text = "_sDiamond";
            // 
            // _sTriangle
            // 
            this._sTriangle.BorderColor = System.Drawing.Color.Black;
            this._sTriangle.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid;
            this._sTriangle.BorderWidth = 2F;
            cBlendItems2.iColor = new System.Drawing.Color[] {
                                                                 System.Drawing.Color.White,
                                                                 System.Drawing.Color.White};
            cBlendItems2.iPoint = new float[] {
                                                  0F,
                                                  1F};
            this._sTriangle.ColorFillBlend = cBlendItems2;
            this._sTriangle.ColorFillSolid = System.Drawing.SystemColors.Control;
            this._sTriangle.Corners.All = ((short)(0));
            this._sTriangle.Corners.LowerLeft = ((short)(0));
            this._sTriangle.Corners.LowerRight = ((short)(0));
            this._sTriangle.Corners.UpperLeft = ((short)(0));
            this._sTriangle.Corners.UpperRight = ((short)(0));
            this._sTriangle.FillType = Shape.eFillType.Solid;
            this._sTriangle.FillTypeLinear = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
            cFocalPoints2.CenterPoint = ((System.Drawing.PointF)(resources.GetObject("cFocalPoints2.CenterPoint")));
            cFocalPoints2.FocusScales = ((System.Drawing.PointF)(resources.GetObject("cFocalPoints2.FocusScales")));
            this._sTriangle.FocalPoints = cFocalPoints2;
            this._sTriangle.Location = new System.Drawing.Point(119, 3);
            this._sTriangle.Name = "_sTriangle";
            this._sTriangle.RadiusInner = 0F;
            this._sTriangle.RegionClip = false;
            this._sTriangle.ShapeType = Shape.eShape.Triangle;
            this._sTriangle.Size = new System.Drawing.Size(50, 50);
            this._sTriangle.TabIndex = 2;
            this._sTriangle.Text = "_sTriangle";
            // 
            // _sRectangle
            // 
            this._sRectangle.BorderColor = System.Drawing.Color.Black;
            this._sRectangle.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid;
            this._sRectangle.BorderWidth = 2F;
            cBlendItems3.iColor = new System.Drawing.Color[] {
                                                                 System.Drawing.Color.White,
                                                                 System.Drawing.Color.White};
            cBlendItems3.iPoint = new float[] {
                                                  0F,
                                                  1F};
            this._sRectangle.ColorFillBlend = cBlendItems3;
            this._sRectangle.ColorFillSolid = System.Drawing.SystemColors.Control;
            this._sRectangle.Corners.All = ((short)(0));
            this._sRectangle.Corners.LowerLeft = ((short)(0));
            this._sRectangle.Corners.LowerRight = ((short)(0));
            this._sRectangle.Corners.UpperLeft = ((short)(0));
            this._sRectangle.Corners.UpperRight = ((short)(0));
            this._sRectangle.FillType = Shape.eFillType.Solid;
            this._sRectangle.FillTypeLinear = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
            cFocalPoints3.CenterPoint = ((System.Drawing.PointF)(resources.GetObject("cFocalPoints3.CenterPoint")));
            cFocalPoints3.FocusScales = ((System.Drawing.PointF)(resources.GetObject("cFocalPoints3.FocusScales")));
            this._sRectangle.FocalPoints = cFocalPoints3;
            this._sRectangle.Location = new System.Drawing.Point(63, 3);
            this._sRectangle.Name = "_sRectangle";
            this._sRectangle.RadiusInner = 0F;
            this._sRectangle.RegionClip = false;
            this._sRectangle.ShapeType = Shape.eShape.Rectangle;
            this._sRectangle.Size = new System.Drawing.Size(50, 50);
            this._sRectangle.TabIndex = 1;
            this._sRectangle.Text = "_sRectangle";
            // 
            // _sCircle
            // 
            this._sCircle.BorderColor = System.Drawing.Color.Black;
            this._sCircle.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid;
            this._sCircle.BorderWidth = 2F;
            cBlendItems4.iColor = new System.Drawing.Color[] {
                                                                 System.Drawing.Color.White,
                                                                 System.Drawing.Color.White};
            cBlendItems4.iPoint = new float[] {
                                                  0F,
                                                  1F};
            this._sCircle.ColorFillBlend = cBlendItems4;
            this._sCircle.ColorFillSolid = System.Drawing.SystemColors.Control;
            this._sCircle.Corners.All = ((short)(0));
            this._sCircle.Corners.LowerLeft = ((short)(0));
            this._sCircle.Corners.LowerRight = ((short)(0));
            this._sCircle.Corners.UpperLeft = ((short)(0));
            this._sCircle.Corners.UpperRight = ((short)(0));
            this._sCircle.FillType = Shape.eFillType.Solid;
            this._sCircle.FillTypeLinear = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
            cFocalPoints4.CenterPoint = ((System.Drawing.PointF)(resources.GetObject("cFocalPoints4.CenterPoint")));
            cFocalPoints4.FocusScales = ((System.Drawing.PointF)(resources.GetObject("cFocalPoints4.FocusScales")));
            this._sCircle.FocalPoints = cFocalPoints4;
            this._sCircle.Location = new System.Drawing.Point(7, 3);
            this._sCircle.Name = "_sCircle";
            this._sCircle.RadiusInner = 0F;
            this._sCircle.RegionClip = false;
            this._sCircle.ShapeType = Shape.eShape.Ellipse;
            this._sCircle.Size = new System.Drawing.Size(50, 50);
            this._sCircle.TabIndex = 0;
            this._sCircle.Text = "_sCircle";
            // 
            // DropdownShapeEditor
            // 
            this.BackColor = System.Drawing.SystemColors.Window;
            this.Controls.Add(this._sDiamond);
            this.Controls.Add(this._sTriangle);
            this.Controls.Add(this._sRectangle);
            this.Controls.Add(this._sCircle);
            this.Name = "DropdownShapeEditor";
            this.Size = new System.Drawing.Size(235, 62);
            this.ResumeLayout(false);

        }
        private void InitializeComponent()
        {
            cBlendItems  cBlendItems1  = new cBlendItems();
            cFocalPoints cFocalPoints1 = new cFocalPoints();

            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DropdownShapeEditor));
            cBlendItems  cBlendItems2  = new cBlendItems();
            cFocalPoints cFocalPoints2 = new cFocalPoints();
            cBlendItems  cBlendItems3  = new cBlendItems();
            cFocalPoints cFocalPoints3 = new cFocalPoints();
            cBlendItems  cBlendItems4  = new cBlendItems();
            cFocalPoints cFocalPoints4 = new cFocalPoints();

            this._sDiamond   = new Shape();
            this._sTriangle  = new Shape();
            this._sRectangle = new Shape();
            this._sCircle    = new Shape();
            this.SuspendLayout();
            //
            // _sDiamond
            //
            this._sDiamond.BorderColor = System.Drawing.Color.Black;
            this._sDiamond.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid;
            this._sDiamond.BorderWidth = 2F;
            cBlendItems1.iColor        = new System.Drawing.Color[] {
                System.Drawing.Color.White,
                System.Drawing.Color.White
            };
            cBlendItems1.iPoint = new float[] {
                0F,
                1F
            };
            this._sDiamond.ColorFillBlend     = cBlendItems1;
            this._sDiamond.ColorFillSolid     = System.Drawing.SystemColors.Control;
            this._sDiamond.Corners.All        = ((short)(0));
            this._sDiamond.Corners.LowerLeft  = ((short)(0));
            this._sDiamond.Corners.LowerRight = ((short)(0));
            this._sDiamond.Corners.UpperLeft  = ((short)(0));
            this._sDiamond.Corners.UpperRight = ((short)(0));
            this._sDiamond.FillType           = Shape.eFillType.Solid;
            this._sDiamond.FillTypeLinear     = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
            cFocalPoints1.CenterPoint         = ((System.Drawing.PointF)(resources.GetObject("cFocalPoints1.CenterPoint")));
            cFocalPoints1.FocusScales         = ((System.Drawing.PointF)(resources.GetObject("cFocalPoints1.FocusScales")));
            this._sDiamond.FocalPoints        = cFocalPoints1;
            this._sDiamond.Location           = new System.Drawing.Point(175, 3);
            this._sDiamond.Name        = "_sDiamond";
            this._sDiamond.RadiusInner = 0F;
            this._sDiamond.RegionClip  = false;
            this._sDiamond.ShapeType   = Shape.eShape.Diamond;
            this._sDiamond.Size        = new System.Drawing.Size(50, 50);
            this._sDiamond.TabIndex    = 3;
            this._sDiamond.Text        = "_sDiamond";
            //
            // _sTriangle
            //
            this._sTriangle.BorderColor = System.Drawing.Color.Black;
            this._sTriangle.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid;
            this._sTriangle.BorderWidth = 2F;
            cBlendItems2.iColor         = new System.Drawing.Color[] {
                System.Drawing.Color.White,
                System.Drawing.Color.White
            };
            cBlendItems2.iPoint = new float[] {
                0F,
                1F
            };
            this._sTriangle.ColorFillBlend     = cBlendItems2;
            this._sTriangle.ColorFillSolid     = System.Drawing.SystemColors.Control;
            this._sTriangle.Corners.All        = ((short)(0));
            this._sTriangle.Corners.LowerLeft  = ((short)(0));
            this._sTriangle.Corners.LowerRight = ((short)(0));
            this._sTriangle.Corners.UpperLeft  = ((short)(0));
            this._sTriangle.Corners.UpperRight = ((short)(0));
            this._sTriangle.FillType           = Shape.eFillType.Solid;
            this._sTriangle.FillTypeLinear     = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
            cFocalPoints2.CenterPoint          = ((System.Drawing.PointF)(resources.GetObject("cFocalPoints2.CenterPoint")));
            cFocalPoints2.FocusScales          = ((System.Drawing.PointF)(resources.GetObject("cFocalPoints2.FocusScales")));
            this._sTriangle.FocalPoints        = cFocalPoints2;
            this._sTriangle.Location           = new System.Drawing.Point(119, 3);
            this._sTriangle.Name        = "_sTriangle";
            this._sTriangle.RadiusInner = 0F;
            this._sTriangle.RegionClip  = false;
            this._sTriangle.ShapeType   = Shape.eShape.Triangle;
            this._sTriangle.Size        = new System.Drawing.Size(50, 50);
            this._sTriangle.TabIndex    = 2;
            this._sTriangle.Text        = "_sTriangle";
            //
            // _sRectangle
            //
            this._sRectangle.BorderColor = System.Drawing.Color.Black;
            this._sRectangle.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid;
            this._sRectangle.BorderWidth = 2F;
            cBlendItems3.iColor          = new System.Drawing.Color[] {
                System.Drawing.Color.White,
                System.Drawing.Color.White
            };
            cBlendItems3.iPoint = new float[] {
                0F,
                1F
            };
            this._sRectangle.ColorFillBlend     = cBlendItems3;
            this._sRectangle.ColorFillSolid     = System.Drawing.SystemColors.Control;
            this._sRectangle.Corners.All        = ((short)(0));
            this._sRectangle.Corners.LowerLeft  = ((short)(0));
            this._sRectangle.Corners.LowerRight = ((short)(0));
            this._sRectangle.Corners.UpperLeft  = ((short)(0));
            this._sRectangle.Corners.UpperRight = ((short)(0));
            this._sRectangle.FillType           = Shape.eFillType.Solid;
            this._sRectangle.FillTypeLinear     = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
            cFocalPoints3.CenterPoint           = ((System.Drawing.PointF)(resources.GetObject("cFocalPoints3.CenterPoint")));
            cFocalPoints3.FocusScales           = ((System.Drawing.PointF)(resources.GetObject("cFocalPoints3.FocusScales")));
            this._sRectangle.FocalPoints        = cFocalPoints3;
            this._sRectangle.Location           = new System.Drawing.Point(63, 3);
            this._sRectangle.Name        = "_sRectangle";
            this._sRectangle.RadiusInner = 0F;
            this._sRectangle.RegionClip  = false;
            this._sRectangle.ShapeType   = Shape.eShape.Rectangle;
            this._sRectangle.Size        = new System.Drawing.Size(50, 50);
            this._sRectangle.TabIndex    = 1;
            this._sRectangle.Text        = "_sRectangle";
            //
            // _sCircle
            //
            this._sCircle.BorderColor = System.Drawing.Color.Black;
            this._sCircle.BorderStyle = System.Drawing.Drawing2D.DashStyle.Solid;
            this._sCircle.BorderWidth = 2F;
            cBlendItems4.iColor       = new System.Drawing.Color[] {
                System.Drawing.Color.White,
                System.Drawing.Color.White
            };
            cBlendItems4.iPoint = new float[] {
                0F,
                1F
            };
            this._sCircle.ColorFillBlend     = cBlendItems4;
            this._sCircle.ColorFillSolid     = System.Drawing.SystemColors.Control;
            this._sCircle.Corners.All        = ((short)(0));
            this._sCircle.Corners.LowerLeft  = ((short)(0));
            this._sCircle.Corners.LowerRight = ((short)(0));
            this._sCircle.Corners.UpperLeft  = ((short)(0));
            this._sCircle.Corners.UpperRight = ((short)(0));
            this._sCircle.FillType           = Shape.eFillType.Solid;
            this._sCircle.FillTypeLinear     = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
            cFocalPoints4.CenterPoint        = ((System.Drawing.PointF)(resources.GetObject("cFocalPoints4.CenterPoint")));
            cFocalPoints4.FocusScales        = ((System.Drawing.PointF)(resources.GetObject("cFocalPoints4.FocusScales")));
            this._sCircle.FocalPoints        = cFocalPoints4;
            this._sCircle.Location           = new System.Drawing.Point(7, 3);
            this._sCircle.Name        = "_sCircle";
            this._sCircle.RadiusInner = 0F;
            this._sCircle.RegionClip  = false;
            this._sCircle.ShapeType   = Shape.eShape.Ellipse;
            this._sCircle.Size        = new System.Drawing.Size(50, 50);
            this._sCircle.TabIndex    = 0;
            this._sCircle.Text        = "_sCircle";
            //
            // DropdownShapeEditor
            //
            this.BackColor = System.Drawing.SystemColors.Window;
            this.Controls.Add(this._sDiamond);
            this.Controls.Add(this._sTriangle);
            this.Controls.Add(this._sRectangle);
            this.Controls.Add(this._sCircle);
            this.Name = "DropdownShapeEditor";
            this.Size = new System.Drawing.Size(235, 62);
            this.ResumeLayout(false);
        }