Ejemplo n.º 1
0
 private void CapabilityListControl_OnEdit()
 {
     if (SelectedItems.Count > 0)
     {
         ListViewItem lvi = SelectedItems[0];
         object       obj = lvi.Tag;
         if (obj is Capability)
         {
             var    capability = obj as Capability;
             object dataObject = GetDataObject();
             if (dataObject != null)
             {
                 var form = new CapabilityForm(dataObject);
                 form.Capability  = capability;
                 form.Closed     += form_Closed;
                 form.CloseOnSave = true;
                 form.Show();
             }
         }
         else if (obj is DocumentReference)
         {
             var reference = obj as DocumentReference;
             var form      = new CapabilityReferenceForm();
             form.InstrumentDescription = _instrumentDescription;
             form.DocumentReference     = reference;
             form.Closed += form_Closed;
             form.Show();
         }
     }
 }
Ejemplo n.º 2
0
        private void btnImportCapabilityDocument_Click(object sender,EventArgs e)
        {
            var form = new CapabilityReferenceForm();

            form.InstrumentDescription = _instrumentDescription;
            form.DocumentReference     = new DocumentReference();
            if (DialogResult.OK == form.ShowDialog())
            {
                DocumentReference docRef = form.DocumentReference;
                _capabilityItems.Add(docRef);
            }

            //Select the resource, then the resource port.
            //Create a class reporesentation of a capability mapping
        }
 private void CapabilityListControl_OnEdit()
 {
     if (SelectedItems.Count > 0)
     {
         ListViewItem lvi = SelectedItems[0];
         object obj = lvi.Tag;
         if (obj is Capability)
         {
             var capability = obj as Capability;
             object dataObject = GetDataObject();
             if (dataObject != null)
             {
                 var form = new CapabilityForm(dataObject);
                 form.Capability = capability;
                 form.Closed += form_Closed;
                 form.CloseOnSave = true;
                 form.Show();
             }
         }
         else if (obj is DocumentReference)
         {
             var reference = obj as DocumentReference;
             var form = new CapabilityReferenceForm();
             form.InstrumentDescription = _instrumentDescription;
             form.DocumentReference = reference;
             form.Closed += form_Closed;
             form.Show();
         }
     }
 }
        private void btnImportCapabilityDocument_Click(object sender, EventArgs e)
        {
            var form = new CapabilityReferenceForm();
            form.InstrumentDescription = _instrumentDescription;
            form.DocumentReference = new DocumentReference();
            if (DialogResult.OK == form.ShowDialog())
            {
                DocumentReference docRef = form.DocumentReference;
                _capabilityItems.Add(docRef);
            }

            //Select the resource, then the resource port.
            //Create a class reporesentation of a capability mapping
        }