예제 #1
0
 public void CloseGui()
 {
     if (CMForm != null && GUIThread != null && GUIThread.ThreadState == ThreadState.Running)
     {
         CMForm.CloseInvoke();
         GUIThread.Abort();
         CMForm = null;
     }
 }
예제 #2
0
 public bool StartGui()
 {
     if (CMForm == null && (GUIThread == null || GUIThread.ThreadState == ThreadState.Stopped || GUIThread.ThreadState == ThreadState.StopRequested || GUIThread.ThreadState == ThreadState.Aborted || GUIThread.ThreadState == ThreadState.AbortRequested))
     {
         CMForm = new ConvertMediaForm();
         GUIThread = new Thread(() =>
         {
             CMForm.ShowDialog();
             CMForm.CloseInvoke();
             CMForm = null;
         });
         GUIThread.Start();
         return true;
     }
     else
     {
         return false;
     }
 }