Наследование: WeifenLuo.WinFormsUI.Docking.DockContent, IATMLDockableWindow, IAtmlActionable
Пример #1
0
        /**
         * To create a new project we need to have a UUT selected - this should be the same UUT identifier located
         * in the TPSI file. TODO: Should we create a project from the TPSI file - open the TPSI here?
         */

        private void btnSelectUUT_Click(object sender, EventArgs e)
        {
            var form = new ATMLLibraryForm(typeof(UUTDescriptionListControl));

            if (DialogResult.OK == form.ShowDialog())
            {
                errorProvider1.SetError(edtProjectName, "");
                errorProvider1.SetError(edtUUT, "");
                _uutDescription = form.SelectedObject as UUTDescription;
                if (_uutDescription != null)
                {
                    edtUUT.Value = _uutDescription.ToString();
                    if (!edtProjectName.HasValue())
                    {
                        edtProjectName.Value = _uutDescription.Item.Identification.ModelName;
                    }
                }
            }
        }
 /**
  * To create a new project we need to have a UUT selected - this should be the same UUT identifier located
  * in the TPSI file. TODO: Should we create a project from the TPSI file - open the TPSI here?
  */
 private void btnSelectUUT_Click(object sender, EventArgs e)
 {
     var form = new ATMLLibraryForm(typeof (UUTDescriptionListControl));
     if (DialogResult.OK == form.ShowDialog())
     {
         errorProvider1.SetError(edtProjectName, "");
         errorProvider1.SetError(edtUUT, "");
         _uutDescription = form.SelectedObject as UUTDescription;
         if (_uutDescription != null)
         {
             edtUUT.Value = _uutDescription.ToString();
             if (!edtProjectName.HasValue())
                 edtProjectName.Value = _uutDescription.Item.Identification.ModelName;
         }
     }
 }
 private void testStationListControl_OnFind()
 {
     var form = new ATMLLibraryForm(typeof(TestStationListControl));
     if (DialogResult.OK == form.ShowDialog())
     {
         var testStation = form.SelectedObject as TestStationDescription11;
         Document document = DocumentManager.GetDocument( testStation.uuid );
         if (document != null)
         {
             var reference = new TestConfigurationTestEquipmentItem();
             var documentReference = new DocumentReference();
             documentReference.ContentType = ATMLContext.CONTEXT_TYPE_XML;
             documentReference.DocumentContent = Encoding.UTF8.GetBytes( testStation.Serialize() );
             documentReference.DocumentName = document.name;
             documentReference.DocumentType = document.DocumentType;
             documentReference.ID = testStation.Identification.ModelName;
             documentReference.uuid = testStation.uuid;
             reference.Item = documentReference;
             testEquipmentListControl.AddListViewObject( reference );
         }
     }
 }