Пример #1
0
 		private void ShowResults(object sender, FindPrimesCompletedEventArgs e)
        {
            AsyncTestResult result = new AsyncTestResult();
			result.Text = String.Format("Primes From {0} To {1}",
				new object[] { e.From, e.To });
            result.ShowList(e.PrimeList);
            result.MdiParent = this;
            result.Show();

            lock (workers)
            {
                statusPanel.Text = String.Format("Currently running {0} tasks.", workers.Count);
            }
        }
Пример #2
0
        private void ShowResults(object sender, FindPrimesCompletedEventArgs e)
        {
            AsyncTestResult result = new AsyncTestResult();

            result.Text = String.Format("Primes From {0} To {1}",
                                        new object[] { e.From, e.To });
            result.ShowList(e.PrimeList);
            result.MdiParent = this;
            result.Show();

            lock (workers)
            {
                statusPanel.Text = String.Format("Currently running {0} tasks.", workers.Count);
            }
        }
Пример #3
0
 private void listTasks_DoubleClick(object sender, EventArgs e)
 {
     // Check for item click.
     if (listTasks.SelectedItems[0] != null)
     {
         // Check item is completed.
         if (listTasks.SelectedItems[0].Tag != null)
         {
             AsyncTestResult result = new AsyncTestResult();
             result.ShowList((string)listTasks.SelectedItems[0].Tag);
             result.ShowDialog();
             result.Dispose();
         }
     }
 }
Пример #4
0
 private void listTasks_DoubleClick(object sender, EventArgs e)
 {
     // Check for item click.
     if (listTasks.SelectedItems[0] != null)
     {
         // Check item is completed.
         if (listTasks.SelectedItems[0].Tag != null)
         {
             AsyncTestResult result = new AsyncTestResult();
             result.ShowList((string)listTasks.SelectedItems[0].Tag);
             result.ShowDialog();
             result.Dispose();
         }
     }
     
 }