ContorlPlanStatus.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 Core.StlMes.Client.Mcp.Control.Base
  10. {
  11. public partial class ContorlPlanStatus : UserControl
  12. {
  13. public string[] statusArr = new string[5] { "", "", "", "" ,""};//状态
  14. public ContorlPlanStatus()
  15. {
  16. InitializeComponent();
  17. if (chcStatus1.Checked) { statusArr[0] = "00"; }
  18. if (chcStatus2.Checked) { statusArr[1] = "10"; }
  19. if (chcStatus3.Checked) { statusArr[2] = "20"; }
  20. if (chcStatus4.Checked) { statusArr[2] = "30"; }
  21. if (chcStatus5.Checked) { statusArr[2] = "40"; }
  22. }
  23. private void chc_CheckedChanged(object sender, EventArgs e)
  24. {
  25. if (chcStatus1.Checked) { statusArr[0] = "00"; } else { statusArr[0] = ""; }
  26. if (chcStatus2.Checked) { statusArr[1] = "10"; } else { statusArr[1] = ""; }
  27. if (chcStatus3.Checked) { statusArr[2] = "20"; } else { statusArr[2] = ""; }
  28. if (chcStatus4.Checked) { statusArr[3] = "30"; } else { statusArr[3] = ""; }
  29. if (chcStatus5.Checked) { statusArr[4] = "40"; } else { statusArr[4] = ""; }
  30. }
  31. public bool Status1
  32. {
  33. get { return chcStatus1.Checked; }
  34. set { chcStatus1.Checked = value; }
  35. }
  36. public bool Status2
  37. {
  38. get { return chcStatus2.Checked; }
  39. set { chcStatus2.Checked = value; }
  40. }
  41. public bool Status3
  42. {
  43. get { return chcStatus3.Checked; }
  44. set { chcStatus3.Checked = value; }
  45. }
  46. public bool Status4
  47. {
  48. get { return chcStatus4.Checked; }
  49. set { chcStatus4.Checked = value; }
  50. }
  51. public bool Status5
  52. {
  53. get { return chcStatus5.Checked; }
  54. set { chcStatus5.Checked = value; }
  55. }
  56. }
  57. }