Beispiel #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="label">Associated label</param>
 public FormMultilibrary(IObjectLabel label)
 {
     InitializeComponent();
     this.LoadControlResources(ControlUtilites.Resources);
     this.label = label;
     obj        = label.Object as MultiLibraryObject;
     fill();
     Text = label.Name;
 }
Beispiel #2
0
 /// <summary>
 /// Creates object editor form of property editor object
 /// </summary>
 /// <param name="obj">The property editor ofject</param>
 /// <returns>The property editor form</returns>
 static public Form CreateEditorForm(object obj)
 {
     if (obj is IAssociatedObject)
     {
         IAssociatedObject ao = obj as IAssociatedObject;
         IPropertiesEditor pe = ao.GetObject <IPropertiesEditor>();
         if (pe != null)
         {
             object ob = pe.Editor;
             if (ob != null)
             {
                 if (ob is Form)
                 {
                     Form f = ob as Form;
                     return(f);
                 }
                 if (ob is Array)
                 {
                     Array  arr = ob as Array;
                     object h   = arr.GetValue(0);
                     if (h is Form)
                     {
                         Form f = h as Form;
                         return(f);
                     }
                 }
             }
         }
     }
     if (obj is MultiLibraryObject)
     {
         MultiLibraryObject mo  = obj as MultiLibraryObject;
         IObjectLabel       lab = mo.Object as IObjectLabel;
         return(new FormMultilibrary(lab));
     }
     return(null);
 }