コード例 #1
0
 private void ProgressUpdate(int minimum, int maximum, int value)
 {
     if (FlashProgrammingProgressBar.InvokeRequired)
     {
         var d = new ProgressDelegate(ProgressUpdate);
         FlashProgrammingProgressBar.Invoke(d, new object[] { minimum, maximum, value });
     }
     else
     {
         FlashProgrammingProgressBar.Minimum = minimum;
         FlashProgrammingProgressBar.Maximum = maximum;
         FlashProgrammingProgressBar.Value   = value;
     }
 }
コード例 #2
0
 private void ResultUpdate(bool success)
 {
     if (FlashProgrammingProgressBar.InvokeRequired)
     {
         var d = new ResultDelegate(ResultUpdate);
         FlashProgrammingProgressBar.Invoke(d, new object[] { success });
     }
     else
     {
         FlashProgrammingProgressBar.Minimum = 0;
         FlashProgrammingProgressBar.Maximum = 0;
         FlashProgrammingProgressBar.Value   = 0;
         if (success)
         {
             MessageBox.Show("Programming succesfull");
         }
         else
         {
             MessageBox.Show("Programming failed");
         }
     }
 }