f946f0718f74a83324029635f5d715f7024f54a8.svn-base 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 DataGateWayProject
  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. // progress bar
  25. private delegate void myDelegate(int theValue, int theMax);
  26. private void updateProgress(int theValue, int theMax)
  27. {
  28. Close();
  29. }
  30. public void Stop_progressBar()
  31. {
  32. this.Invoke(new myDelegate(updateProgress), new object[]{ 100, 100 });
  33. }
  34. private void myThread()
  35. {
  36. ShowDialog();
  37. start_progressBar.Enabled = true;
  38. }
  39. }
  40. }