Progress.cs 712 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. namespace ServiceHelper
  10. {
  11. public partial class Progress : Form
  12. {
  13. public Progress()
  14. {
  15. InitializeComponent();
  16. }
  17. public void Reset()
  18. {
  19. progressBar.Value = 0;
  20. }
  21. public void Done()
  22. {
  23. progressBar.Value = 100;
  24. this.Hide();
  25. }
  26. public void UpdateProgress()
  27. {
  28. if (progressBar.Value < 80)
  29. {
  30. progressBar.Value += 20;
  31. }
  32. }
  33. }
  34. }