Beispiel #1
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;
         }
     }));
 }