예제 #1
0
 public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
 {
     if (context != null && context.Instance != null)
     {
         UIListboxEditor.UIListboxIsDropDownResizable uIListboxIsDropDownResizable = (UIListboxEditor.UIListboxIsDropDownResizable)context.PropertyDescriptor.Attributes[typeof(UIListboxEditor.UIListboxIsDropDownResizable)];
         if (uIListboxIsDropDownResizable != null)
         {
             this.bIsDropDownResizable = true;
         }
         return(UITypeEditorEditStyle.DropDown);
     }
     return(UITypeEditorEditStyle.None);
 }
예제 #2
0
 private void BuildAttributes_ListboxEditor()
 {
     if (this.oDatasource != null)
     {
         UIListboxEditor.UIListboxDatasource    value  = new UIListboxEditor.UIListboxDatasource(ref this.oDatasource);
         UIListboxEditor.UIListboxValueMember   value2 = new UIListboxEditor.UIListboxValueMember(this.sValueMember);
         UIListboxEditor.UIListboxDisplayMember value3 = new UIListboxEditor.UIListboxDisplayMember(this.sDisplayMember);
         ArrayList arrayList = new ArrayList();
         arrayList.Add(value);
         arrayList.Add(value2);
         arrayList.Add(value3);
         if (this.bIsDropdownResizable)
         {
             UIListboxEditor.UIListboxIsDropDownResizable value4 = new UIListboxEditor.UIListboxIsDropDownResizable();
             arrayList.Add(value4);
         }
         Attribute[] attributes = (Attribute[])arrayList.ToArray(typeof(Attribute));
         this.oCustomAttributes = new AttributeCollection(attributes);
     }
 }
예제 #3
0
 private void BuildAttributes_ListboxEditor()
 {
     if (oDatasource != null)
     {
         UIListboxEditor.UIListboxDatasource          ds  = new UIListboxEditor.UIListboxDatasource(ref oDatasource);
         UIListboxEditor.UIListboxValueMember         vm  = new UIListboxEditor.UIListboxValueMember(sValueMember);
         UIListboxEditor.UIListboxDisplayMember       dm  = new UIListboxEditor.UIListboxDisplayMember(sDisplayMember);
         UIListboxEditor.UIListboxIsDropDownResizable ddr = null;
         ArrayList attrs = new ArrayList();
         attrs.Add(ds);
         attrs.Add(vm);
         attrs.Add(dm);
         if (bIsDropdownResizable)
         {
             ddr = new UIListboxEditor.UIListboxIsDropDownResizable();
             attrs.Add(ddr);
         }
         Attribute[] attrArray;
         attrArray         = (System.Attribute[])attrs.ToArray(typeof(Attribute));
         oCustomAttributes = new AttributeCollection(attrArray);
     }
 }