/// <summary>
        /// 添加数字框
        /// </summary>
        /// <param name="group"></param>
        /// <param name="id"></param>
        /// <param name="Caption"></param>
        /// <param name="tip"></param>
        /// <param name="align"></param>
        /// <param name="options"></param>
        /// <returns></returns>
        private static PropertyManagerPageGroup AddNumberBox(this PropertyManagerPageGroup group, int id, string Caption, string tip,
                                                             swPropertyManagerPageControlLeftAlign_e align = swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge,
                                                             swAddControlOptions_e options = swAddControlOptions_e.swControlOptions_Enabled |
                                                             swAddControlOptions_e.swControlOptions_Visible)
        {
            short controlType = (short)swPropertyManagerPageControlType_e.swControlType_Numberbox;

            group.AddControl2(id, controlType, Caption, (short)align, (int)options, tip);

            return(group);
        }
 public PMPageControl(int iD, string caption, string hint,
                      swPropertyManagerPageControlType_e controlType,
                      swPropertyManagerPageControlLeftAlign_e align,
                      swAddControlOptions_e options)
 {
     ControlType = controlType;
     Align       = align;
     Options     = options;
     ID          = iD;
     Caption     = caption;
     tip         = hint;
 }
 /// <summary>
 /// Constructor allowing to specify control common parameters
 /// </summary>
 /// <param name="opts">Generic control options as defined in <see href="http://help.solidworks.com/2016/english/api/swconst/solidworks.interop.swconst~solidworks.interop.swconst.swaddcontroloptions_e.html">swAddControlOptions_e Enumeration</see></param>
 /// <param name="align">Control alignment options as defined in <see href="http://help.solidworks.com/2016/english/api/swconst/solidworks.interop.swconst~solidworks.interop.swconst.swpropertymanagerpagecontrolleftalign_e.html">swPropertyManagerPageControlLeftAlign_e Enumeration</see></param>
 /// <param name="backgroundColor">Background color of control. Use 0 for default color</param>
 /// <param name="textColor">Color of the text on the control. Use 0 for default color</param>
 /// <param name="left">Left alignment of the control. Use -1 for default alignment</param>
 /// <param name="top">Top alignment of the control. Use -1 to align the control under the previous control</param>
 /// <param name="width">Width of the control. Use -1 for auto width</param>
 /// <param name="height">Height of the control in property manager page dialog box units. Use -1 for the auto height</param>
 /// <param name="resizeOptions">Options to resize as defined in <see href="http://help.solidworks.com/2016/english/api/swconst/solidworks.interop.swconst~solidworks.interop.swconst.swpropmgrpagecontrolonresizeoptions_e.html">swPropMgrPageControlOnResizeOptions_e Enumeration</see></param>
 public ControlOptionsAttribute(
     swAddControlOptions_e opts = swAddControlOptions_e.swControlOptions_Enabled | swAddControlOptions_e.swControlOptions_Visible,
     swPropertyManagerPageControlLeftAlign_e align = swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge,
     KnownColor backgroundColor = 0, KnownColor textColor = 0, short left = -1, short top = -1, short width = -1, short height = -1,
     swPropMgrPageControlOnResizeOptions_e resizeOptions = 0)
 {
     Options         = opts;
     Align           = align;
     BackgroundColor = backgroundColor;
     TextColor       = textColor;
     Left            = left;
     Top             = top;
     Width           = width;
     Height          = height;
     ResizeOptions   = resizeOptions;
 }