Esempio n. 1
0
        internal PropertyManagerPagePageEx(IPropertyManagerPage2 page,
                                           THandler handler, ISldWorks app, string helpLink, string whatsNewLink)
        {
            Page           = page;
            Handler        = handler;
            App            = app;
            m_HelpLink     = helpLink;
            m_WhatsNewLink = whatsNewLink;

            Handler.HelpRequested     += OnHelpRequested;
            Handler.WhatsNewRequested += OnWhatsNewRequested;
        }
Esempio n. 2
0
 protected virtual TControlSw CreateSwControlInPage(IPropertyManagerPage2 page,
                                                    ControlOptionsAttribute opts, IAttributeSet atts)
 {
     if (m_App.IsVersionNewerOrEqual(SwVersion_e.Sw2014, 1))
     {
         return(page.AddControl2(atts.Id, (short)m_Type, atts.Name,
                                 (short)opts.Align, (short)opts.Options, atts.Description) as TControlSw);
     }
     else
     {
         return(page.AddControl(atts.Id, (short)m_Type, atts.Name,
                                (short)opts.Align, (short)opts.Options, atts.Description) as TControlSw);
     }
 }
 protected override PropertyManagerPageOptionBox CreateSwControlInPage(IPropertyManagerPage2 page,
                                                                       ControlOptionsAttribute opts, IAttributeSet atts)
 {
     return(CreateOptionBoxControl(opts, atts,
                                   (int id, short controlType, string caption, short leftAlign, int options, string tip) =>
     {
         if (m_App.IsVersionNewerOrEqual(SwVersion_e.Sw2014, 1))
         {
             return page.AddControl2(id, controlType, caption, leftAlign, options, tip) as IPropertyManagerPageOption;
         }
         else
         {
             return page.AddControl(id, controlType, caption, leftAlign, options, tip) as IPropertyManagerPageOption;
         }
     }));
 }
        CreateGroup(this IPropertyManagerPage2 page,
                    int id,
                    string caption,
                    IEnumerable <swAddGroupBoxOptions_e> options = null
                    )
        {
            options = options ??
                      new[]
            {
                swAddGroupBoxOptions_e.swGroupBoxOptions_Expanded,
                swAddGroupBoxOptions_e.swGroupBoxOptions_Visible
            };

            var optionsShort = (short)CombineToInt(options, v => (short)v);

            return((IPropertyManagerPageGroup)page.AddGroupBox(id, caption, optionsShort));
        }
Esempio n. 5
0
        protected void CreatePropertyManagerPage()
        {
            int errors = -1;
            int options = (int)swPropertyManagerPageOptions_e.swPropertyManagerOptions_OkayButton |
                (int)swPropertyManagerPageOptions_e.swPropertyManagerOptions_CancelButton;

            handler = new PMPHandler(userAddin);
            swPropertyPage = (IPropertyManagerPage2)iSwApp.CreatePropertyManagerPage(".Net Control Disply PMP", options, handler, ref errors);
            if (swPropertyPage != null && errors == (int)swPropertyManagerPageStatus_e.swPropertyManagerPage_Okay)
            {
                try
                {
                    AddControls();
                }
                catch (Exception e)
                {
                    iSwApp.SendMsgToUser2(e.Message, 0, 0);
                }
            }
        }
Esempio n. 6
0
        protected void CreatePropertyManagerPage()
        {
            int errors  = -1;
            int options = (int)swPropertyManagerPageOptions_e.swPropertyManagerOptions_OkayButton |
                          (int)swPropertyManagerPageOptions_e.swPropertyManagerOptions_CancelButton;

            handler        = new PMPHandler(userAddin);
            swPropertyPage = (IPropertyManagerPage2)iSwApp.CreatePropertyManagerPage("Estrusion PMP", options, handler, ref errors);
            if (swPropertyPage != null && errors == (int)swPropertyManagerPageStatus_e.swPropertyManagerPage_Okay)
            {
                try
                {
                    AddControls();
                }
                catch (Exception e)
                {
                    iSwApp.SendMsgToUser2(e.Message, 0, 0);
                }
            }
        }
Esempio n. 7
0
        protected void CreatePropertyManagerPage()
        {
            int       errors  = -1;
            const int Options = (int)swPropertyManagerPageOptions_e.swPropertyManagerOptions_OkayButton |
                                (int)swPropertyManagerPageOptions_e.swPropertyManagerOptions_CancelButton;

            this.handler        = new PropManPageHandler(this.userAddin);
            this.swPropertyPage = (IPropertyManagerPage2)iSwApp.CreatePropertyManagerPage("Save PDF", Options, this.handler, ref errors);
            if (this.swPropertyPage != null && errors == (int)swPropertyManagerPageStatus_e.swPropertyManagerPage_Okay)
            {
                try
                {
                    this.AddControls();
                }
                catch (Exception e)
                {
                    this.iSwApp.SendMsgToUser2(e.Message, 0, 0);
                }
            }
        }
Esempio n. 8
0
 public ControlHolder(IPropertyManagerPage2 object0)
 {
     _Objects.Add(object0);
 }
Esempio n. 9
0
 public void AfterClose()
 {
     Page = null;
 }
Esempio n. 10
0
 public static IDisposable Create(IPropertyManagerPage2 page)
 {
     return(new ControlHolder(page));
 }
Esempio n. 11
0
 public IPropertyManagerPage2Builder(IPropertyManagerPage2 page)
 {
     Page = page;
 }
Esempio n. 12
0
 protected override IPropertyManagerPageBitmapButton CreateSwControlInPage(IPropertyManagerPage2 page, ControlOptionsAttribute opts, IAttributeSet atts)
 {
     SetButtonSpecificType(atts);
     return(base.CreateSwControlInPage(page, opts, atts));
 }
Esempio n. 13
0
 public IPropertyManagerPage2Object(IPropertyManagerPage2 IPropertyManagerPage2instance)
 {
     IPropertyManagerPage2Instance = IPropertyManagerPage2instance;
 }
 public void AfterClose()
 {
     Page = null;
     _AfterCloseSubject.OnNext(Unit.Default);
 }
Esempio n. 15
0
        protected void CreatePropertyManagerPage()
        {
            int errors = -1;
            const int options = (int)swPropertyManagerPageOptions_e.swPropertyManagerOptions_OkayButton |
                                (int)swPropertyManagerPageOptions_e.swPropertyManagerOptions_CancelButton;

            _handler = new PmpHandler(_userAddin);
            _swPropertyPage = (IPropertyManagerPage2)_iSwApp.CreatePropertyManagerPage("Sample PMP", options, _handler, ref errors);
            if (_swPropertyPage != null && errors == (int)swPropertyManagerPageStatus_e.swPropertyManagerPage_Okay)
            {
                try
                {
                    AddControls();
                }
                catch (Exception e)
                {
                    _iSwApp.SendMsgToUser2(e.Message, 0, 0);
                }
            }
        }