示例#1
0
 private void ThreadProc(object o)
 {
     try
     {
         var         pp = (Tuple <int, List <string> >)o;
         BatchRunner br = new BatchRunner(_config, _createCoreComm(), pp.Item2, pp.Item1);
         br.OnProgress += BrOnProgress;
         var results = br.Run();
         this.Invoke(() => { label3.Text = "Status: Finished!"; _mostRecentResults = results; });
     }
     catch (Exception e)
     {
         MessageBox.Show(e.ToString(), "The Whole Thing Died!");
         this.Invoke(() => label3.Text = "Deaded!");
     }
     this.Invoke(() => _thread = null);
 }
示例#2
0
		void ThreadProc(object o)
		{
			try
			{
				var pp = (Tuple<int, List<string>>)o;
				BatchRunner br = new BatchRunner(pp.Item2, pp.Item1);
				br.OnProgress += br_OnProgress;
				var results = br.Run();
				this.Invoke(() => { label3.Text = "Status: Finished!"; MostRecentResults = results; });
			}
			catch (Exception e)
			{
				MessageBox.Show(e.ToString(), "The Whole Thing Died!");
				this.Invoke(() => label3.Text = "Deaded!");
			}
			this.Invoke(() => thread = null);
		}
示例#3
0
		void br_OnProgress(object sender, BatchRunner.ProgressEventArgs e)
		{
			this.Invoke(() => ProgressUpdate(e.Completed, e.Total));
			e.ShouldCancel = false;
		}