コード例 #1
0
        //---  End Properties  ----//
        #endregion

        #region Constructor
        public Shape(byte inheritedShapeProperties)
        {
            //4 is the amount of properties that this base class contains
            GdiProperties = new GDIProperties(4 + inheritedShapeProperties);

            //Set the base class properties
            GdiProperties.AddProperty("Edit Color", false,
                                      "Will generate the shape's color as variables for you to edit via " +
                                      "a class property. Set the value to false if you do not " +
                                      "wish to edit the shape's color after code generation.");

            GdiProperties.AddProperty("Edit Bounds", false,
                                      "Will generate a bounds variable that you will be able " +
                                      "to get or set the the bounds of the shape.  This applies " +
                                      "only to the generated code");

            GdiProperties.AddProperty("Edit Blend", false,
                                      "Will generate a custom blend variable that allows you " +
                                      "to edit the 'Coverage' and 'BlendSmoothness' of the " +
                                      "shape's gradient color.  Value will be ignored if the shape " +
                                      "does not have a gradient color.");

            GdiProperties.AddProperty("Allow Scaling", true,
                                      "Scaling occurs after code generation when the user " +
                                      "resizes the shape collection via the 'CurrentSize' " +
                                      "property. Set value to true if the shape is allowed " +
                                      "to scale itself");

            //Ask the inherited shape to add any additional properties
            SetProperties();
        }
コード例 #2
0
ファイル: Shape.cs プロジェクト: vebin/PhotoBrushProject
        public Shape(byte inheritedShapeProperties)
        {
            //4 is the amount of properties that this base class contains
            GdiProperties = new GDIProperties(4 + inheritedShapeProperties);

            //Set the base class properties
            GdiProperties.AddProperty("Edit Color",false,
                "Will generate the shape's color as variables for you to edit via " +
                "a class property. Set the value to false if you do not " +
                "wish to edit the shape's color after code generation.");

               GdiProperties.AddProperty("Edit Bounds", false,
                "Will generate a bounds variable that you will be able " +
                "to get or set the the bounds of the shape.  This applies " +
                "only to the generated code");

            GdiProperties.AddProperty("Edit Blend", false,
                "Will generate a custom blend variable that allows you " +
                "to edit the 'Coverage' and 'BlendSmoothness' of the " +
                "shape's gradient color.  Value will be ignored if the shape " +
                "does not have a gradient color.");

            GdiProperties.AddProperty("Allow Scaling", true,
                "Scaling occurs after code generation when the user " +
                "resizes the shape collection via the 'CurrentSize' " +
                "property. Set value to true if the shape is allowed " +
                "to scale itself");

            //Ask the inherited shape to add any additional properties
            SetProperties();
        }