c0e0ab5248f2d8a4ea249ab5462c800bfb092727.svn-base 1009 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using System.Threading;
  10. namespace BEMSDataGateway
  11. {
  12. public partial class FirstCheck_Progressbar : Form
  13. {
  14. Thread th1;
  15. public FirstCheck_Progressbar()
  16. {
  17. InitializeComponent();
  18. }
  19. public void Start_progressBar()
  20. {
  21. th1 = new Thread(new ThreadStart(myThread));
  22. th1.Start();
  23. }
  24. private delegate void myDelegate(int theValue, int theMax);
  25. private void updateProgress(int theValue, int theMax)
  26. {
  27. Close();
  28. }
  29. public void Stop_progressBar()
  30. {
  31. this.Invoke(new myDelegate(updateProgress), new object[] { 100, 100 });
  32. }
  33. private void myThread()
  34. {
  35. ShowDialog();
  36. start_progressBar.Enabled = true;
  37. }
  38. }
  39. }