Ejemplo n.º 1
0
 public GXDLMSProfileGenericColumnDlg(
     GXKeyValuePair <GXDLMSObject, GXDLMSCaptureObject> target, GXDLMSObjectCollection list, string title)
 {
     Target     = target;
     AllObjects = new GXDLMSObjectCollection();
     AllObjects.AddRange(list);
     //Remove not needed objects.
     foreach (GXDLMSObject it in list.GetObjects(new ObjectType[] { ObjectType.AssociationLogicalName, ObjectType.AssociationShortName, ObjectType.ProfileGeneric }))
     {
         AllObjects.Remove(it);
     }
     InitializeComponent();
     if (title != null)
     {
         this.Text = title;
     }
     foreach (GXDLMSObject it in AllObjects)
     {
         TargetCb.Items.Add(it);
     }
     if (Target.Key != null)
     {
         TargetCb.SelectedItem = AllObjects.FindByLN(Target.Key.ObjectType, Target.Key.LogicalName);
     }
     if (Target.Value != null)
     {
         IndexTB.Text     = target.Value.AttributeIndex.ToString();
         DataIndexTb.Text = target.Value.DataIndex.ToString();
     }
     else
     {
         IndexTB.Text     = "2";
         DataIndexTb.Text = "0";
     }
 }