Loading.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. namespace DataUpload
  10. {
  11. public partial class Loading : UserControl
  12. {
  13. private CNPOPSOFT.Controls.LoadingCircle loadingCircle = new CNPOPSOFT.Controls.LoadingCircle();
  14. public Loading()
  15. {
  16. InitializeComponent();
  17. }
  18. private void Loading_Load(object sender, EventArgs e)
  19. {
  20. loadingCircle.BackColor = System.Drawing.Color.White;
  21. loadingCircle.Color = System.Drawing.Color.DarkOrange;
  22. loadingCircle.Location = new System.Drawing.Point(0, 0);
  23. loadingCircle.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
  24. loadingCircle.Name = "loadingCircle";
  25. loadingCircle.Size = new System.Drawing.Size(135, 136);
  26. loadingCircle.StylePreset = CNPOPSOFT.Controls.LoadingCircle.StylePresets.Custom;
  27. loadingCircle.Text = "loadingCircle";
  28. this.Controls.Add(loadingCircle);
  29. loadingCircle.SpokeThickness = 4;
  30. loadingCircle.InnerCircleRadius = 66;
  31. loadingCircle.NumberSpoke = 32;
  32. loadingCircle.OuterCircleRadius = 52;
  33. loadingCircle.RotationSpeed = 91;
  34. SetStyle(ControlStyles.SupportsTransparentBackColor, true);
  35. }
  36. public void Start() {
  37. loadingCircle.Active = true;
  38. }
  39. public void Stop()
  40. {
  41. loadingCircle.Active = false;
  42. }
  43. }
  44. }