Exemple #1
0
 /// <summary>
 /// 关闭
 /// </summary>
 public bool Close()
 {
     if (null != myJobManager)
     {
         try
         {
             myJob.Reset();
             myJobManager.Stop();
             myJobManager.Shutdown();
             myJob            = null;
             myJobManager     = null;
             myJobIndependent = null;
             Imagein.Dispose();
             return(true);
         }
         catch
         {
             return(false);
         }
         GC.Collect();
     }
     else
     {
         return(false);
     }
 }
Exemple #2
0
 public bool Close()
 {
     if (null != myJobManager)
     {
         myJob.Reset();
         myJobManager.Stop();
         myJobManager.Shutdown();
         myJob            = null;
         myJobManager     = null;
         myJobIndependent = null;
         return(true);
     }
     GC.Collect();
     return(false);
 }
Exemple #3
0
 private void RunContCheckBox_CheckedChanged(object sender, System.EventArgs e)
 {
     if (RunContCheckBox.Checked)
     {
         try
         {
             myJobManager.RunContinuous();
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
         RunOnceButton.Enabled = false;
     }
     else
     {
         try
         {
             myJobManager.Stop();
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
         RunOnceButton.Enabled = true;
     }
 }
Exemple #4
0
 public bool Close()
 {
     if (null != myJobManager)
     {
         for (int i = 0; i < myJob.Count; i++)
         {
             myJob[i].Reset();
             myJobManager.Stop();
             myJobManager.Shutdown();
             myJob[i]            = null;
             myJobManager        = null;
             myJobIndependent[i] = null;
         }
         return(true);
     }
     GC.Collect();
     return(false);
 }
Exemple #5
0
 public bool Close()
 {
     bool closeS1 = false;
     bool closeS2 = false;
     bool closeS3 = false;
     bool closeS4 = false;
     if (null != myJobManager0)
     {
         try
         {
             myJob0.Reset();
             myJobManager0.Stop();
             myJobManager0.Shutdown();
             myJob0 = null;
             myJobManager0 = null;
             myJobIndependent0 = null;
             closeS1 = true;
         }
         catch
         {}
     }
     else
     {
         closeS1 = false;
     }
     if (null != myJobManager1)
     {
         try
         {
             myJob1.Reset();
             myJobManager1.Stop();
             myJobManager1.Shutdown();
             myJob1 = null;
             myJobManager1 = null;
             myJobIndependent1 = null;
             closeS2 = true;
         }
         catch
         {}
     }
     else
     {
         closeS2 = false;
     }
     if (null != myJobManager2)
     {
         try
         {
             myJob2.Reset();
             myJobManager2.Stop();
             myJobManager2.Shutdown();
             myJob2 = null;
             myJobManager2 = null;
             myJobIndependent2 = null;
             closeS3 = true;
         }
         catch
         {}
     }
     else
     {
         closeS3 = false;
     }
     if (null != myJobManager3)
     {
         try
         {
             myJob3.Reset();
             myJobManager3.Stop();
             myJobManager3.Shutdown();
             myJob3 = null;
             myJobManager3 = null;
             myJobIndependent3 = null;
             closeS4= true;
         }
         catch
         {}
     }
     else
     {
         closeS4 = false;
     }
     GC.Collect();
     if (closeS1 == true && closeS2 == true && closeS3 == true && closeS4 == true)
     {
         return true;
     }
     else
     {
         return false;
     }
 }