QS_Control.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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.Threading.Tasks;
  9. using System.Windows.Forms;
  10. namespace IntelligentControlForsx.MyControls.kz
  11. {
  12. public partial class QS_Control : UserControl
  13. {
  14. //期次
  15. private string project = "SBQ01_GC";
  16. //第一次加载
  17. public bool firstLoad = true;
  18. public QS_Control()
  19. {
  20. InitializeComponent();
  21. }
  22. public void Active()
  23. {
  24. timer1.Enabled = true;
  25. }
  26. public void DeActive()
  27. {
  28. timer1.Enabled = false;
  29. }
  30. private void lblProject1_Click(object sender, EventArgs e)
  31. {
  32. project = "SBQ01_GC";
  33. firstLoad = true;
  34. //ThreadInfo();
  35. lblProject1.BackColor = Color.FromArgb(15, 141, 106);
  36. lblProject2.BackColor = Color.FromArgb(3, 24, 48);
  37. }
  38. private void lblProject2_Click(object sender, EventArgs e)
  39. {
  40. project = "SBQ02_GC";
  41. firstLoad = true;
  42. //ThreadInfo();
  43. lblProject1.BackColor = Color.FromArgb(3, 24, 48);
  44. lblProject2.BackColor = Color.FromArgb(15, 141, 106);
  45. }
  46. private void timer1_Tick(object sender, EventArgs e)
  47. {
  48. }
  49. }
  50. }