Beispiel #1
0
 public static frmAutomationTests GetChildInstance()
 {
     if (m_SChildform == null)
     {
         m_SChildform = new frmAutomationTests();
     }
     return(m_SChildform);
 }
Beispiel #2
0
 protected override void OnClosed(EventArgs e)
 {
     this.saveNExit();
     if (this.autoTestThread != null)
     {
         this.autoTestThread.Abort();
         clsGlobal.ScriptDone = true;
     }
     m_SChildform = null;
 }
Beispiel #3
0
        private void autoTestExitBtn_Click(object sender, EventArgs e)
        {
            DialogResult yes = DialogResult.Yes;

            if (!clsGlobal.ScriptDone)
            {
                yes = this.autoTestAbort();
            }
            if (yes == DialogResult.Yes)
            {
                m_SChildform = null;
                base.Close();
            }
        }
 private void autoTestExitBtn_Click(object sender, EventArgs e)
 {
     DialogResult yes = DialogResult.Yes;
     if (!clsGlobal.ScriptDone)
     {
         yes = this.autoTestAbort();
     }
     if (yes == DialogResult.Yes)
     {
         m_SChildform = null;
         base.Close();
     }
 }
 protected override void OnClosed(EventArgs e)
 {
     this.saveNExit();
     if (this.autoTestThread != null)
     {
         this.autoTestThread.Abort();
         clsGlobal.ScriptDone = true;
     }
     m_SChildform = null;
 }
 public static frmAutomationTests GetChildInstance()
 {
     if (m_SChildform == null)
     {
         m_SChildform = new frmAutomationTests();
     }
     return m_SChildform;
 }
Beispiel #7
0
 private object GetContentFromPersistString(string persistString)
 {
     if (persistString == typeof(frmAutomationTests).ToString())
     {
         _objFrmAutoTest = CreateAutomationTestWindow();
         return _objFrmAutoTest;
     }
     if (persistString == typeof(frmPerformanceMonitor).ToString())
     {
         _objFrmPerfMonitor = CreatefrmPerformanceMonitorWindow();
         return _objFrmPerfMonitor;
     }
     if (persistString == typeof(frmPython).ToString())
     {
         _objFrmPython = CreatePythonWindow();
         return _objFrmPython;
     }
     if (persistString == typeof(frmCommInputMessage).ToString())
     {
         if ((_objFrmCommOpen != null) && !_objFrmCommOpen.IsDisposed)
         {
             _objFrmCommInputMessage = new frmCommInputMessage();
             _objFrmCommInputMessage.CommWindow = _objFrmCommOpen.comm;
             _objFrmCommOpen._inputCommands = _objFrmCommInputMessage;
         }
         return _objFrmCommInputMessage;
     }
     if (persistString == typeof(frmCommLocationMap).ToString())
     {
         if ((_objFrmCommOpen != null) && !_objFrmCommOpen.IsDisposed)
         {
             _objFrmCommLocationMap = new frmCommLocationMap();
             _objFrmCommLocationMap.CommWindow = _objFrmCommOpen.comm;
             _objFrmCommOpen._locationViewPanel = _objFrmCommLocationMap;
         }
         return _objFrmCommLocationMap;
     }
     if (persistString == typeof(frmCommSignalView).ToString())
     {
         if ((_objFrmCommOpen != null) && !_objFrmCommOpen.IsDisposed)
         {
             _objFrmCommSignalView = new frmCommSignalView();
             _objFrmCommSignalView.CommWindow = _objFrmCommOpen.comm;
             _objFrmCommOpen._signalStrengthPanel = _objFrmCommSignalView;
         }
         return _objFrmCommSignalView;
     }
     if (persistString == typeof(frmEncryCtrl).ToString())
     {
         if ((_objFrmCommOpen != null) && !_objFrmCommOpen.IsDisposed)
         {
             _objFrmEncryCtrl = new frmEncryCtrl(_objFrmCommOpen.comm);
             _objFrmEncryCtrl.CommWindow = _objFrmCommOpen.comm;
         }
         return _objFrmEncryCtrl;
     }
     if (persistString == typeof(frmRFCaptureCtrl).ToString())
     {
         _objFrmCaptureCtrl = CreateRFReplayCaptureWindow();
         return _objFrmCaptureCtrl;
     }
     if (persistString == typeof(frmRFPlaybackConfig).ToString())
     {
         _objFrmRFPlaybackConfig = CreateRFReplayConfigWindow();
         return _objFrmRFPlaybackConfig;
     }
     if (persistString == typeof(frmRFPlaybackCtrl).ToString())
     {
         _objFrmRFPlaybackCtrl = CreateRFReplayPlaybackWindow();
         return _objFrmRFPlaybackCtrl;
     }
     if (persistString == typeof(frmSimplexCtrl).ToString())
     {
         _objFrmSimplexCtrl = frmSimplexCtrl.GetChildInstance();
         return _objFrmSimplexCtrl;
     }
     if (persistString == typeof(frmSPAzCtrl).ToString())
     {
         _objFrmSPAzCtrl = frmSPAzCtrl.GetChildInstance();
         return _objFrmSPAzCtrl;
     }
     if (persistString == typeof(frmRackCtrl).ToString())
     {
         _objFrmRackCtrl = frmRackCtrl.GetChildInstance();
         return _objFrmRackCtrl;
     }
     if (persistString == typeof(frmE911Report).ToString())
     {
         _objFrmE911Report = frmE911Report.GetChildInstance("E911");
         return _objFrmE911Report;
     }
     if (persistString == typeof(frmNavPerformanceReport).ToString())
     {
         _objFrmNavPerformanceReport = frmNavPerformanceReport.GetChildInstance();
         return _objFrmNavPerformanceReport;
     }
     /*
      * //!
     if (persistString == typeof(frmGPIBCtrl).ToString())
     {
         _objFrmGPIBCtrl = frmGPIBCtrl.GetChildInstance();
         return _objFrmNavPerformanceReport;
     }
      */
     if (persistString.Contains("frmCommOpen"))
     {
         _objFrmCommOpen = new frmCommOpen();
         return _objFrmCommOpen;
     }
     return null;
 }
Beispiel #8
0
 private frmAutomationTests CreateAutomationTestWindow()
 {
     frmAutomationTests objfrmAutoTest = null;
     base.Invoke((MethodInvoker)delegate
     {
         objfrmAutoTest = frmAutomationTests.GetChildInstance();
         if ((objfrmAutoTest == null) || objfrmAutoTest.IsDisposed)
         {
             objfrmAutoTest = new frmAutomationTests();
         }
         objfrmAutoTest.MdiParent = this;
         CreatePythonWindow();
         objfrmAutoTest.BringToFront();
         objfrmAutoTest.Show();
     });
     return objfrmAutoTest;
 }
Beispiel #9
0
 public void RunAutoTest()
 {
     try
     {
         frmAutomationTests childInstance = frmAutomationTests.GetChildInstance();
         if ((childInstance == null) || childInstance.IsDisposed)
         {
             childInstance = new frmAutomationTests();
         }
         clsGlobal.ScriptDone = true;
         clsGlobal.Abort = false;
         childInstance.autoTestRunSingle();
     }
     catch (Exception exception)
     {
         throw exception;
     }
 }