Ejemplo n.º 1
0
 public void CloseGui()
 {
     if (IFForm != null && GUIThread != null && GUIThread.ThreadState == ThreadState.Running)
     {
         IFForm.CloseInvoke();
         GUIThread.Abort();
         IFForm = null;
     } 
 }
Ejemplo n.º 2
0
 public bool StartGui()
 {
     if (IFForm == null && (GUIThread==null || GUIThread.ThreadState == ThreadState.Stopped || GUIThread.ThreadState == ThreadState.StopRequested || GUIThread.ThreadState == ThreadState.Aborted || GUIThread.ThreadState == ThreadState.AbortRequested))
     {
         IFForm = new IndexFileForm();
         GUIThread = new Thread(() =>
          {
             
              IFForm.ShowDialog();
              IFForm.CloseInvoke();
              IFForm = null;
          });
         GUIThread.Start();
         return true;
     }
     else
     {
         return false;
     }
 }