Esempio n. 1
0
 private void comBoxAttrName_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(this.comBoxAttrName.Text))
     {
         string text = this.comBoxAttrName.Text;
         this.pnlValue.Controls.Clear();
         ComboBoxEditPLM tplm     = new ComboBoxEditPLM();
         DEMetaAttribute metaAttr = this.GetMetaAttr(text);
         if (metaAttr != null)
         {
             DEMetaClass myCls = ModelContext.MetaModel.GetClass(metaAttr.LinkedResClass);
             if (myCls != null)
             {
                 ResFunc func = new ResFunc();
                 foreach (DEMetaAttribute attribute2 in func.GetResAttrs(myCls))
                 {
                     if ((!attribute2.IsSystem && (attribute2.DataType2 == PLMDataType.String)) && (attribute2.Name != "OID"))
                     {
                         tplm.Properties.Items.Add(attribute2.Label);
                     }
                 }
                 if (tplm.Properties.Items.Count > 0)
                 {
                     this.pnlValue.Controls.Add(tplm);
                     tplm.Dock = DockStyle.Fill;
                 }
             }
         }
     }
 }