using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Windows.Forms; namespace Core.StlMes.Client.Mcp.Control.Base { public partial class ContorlPlanStatus : UserControl { public string[] statusArr = new string[5] { "", "", "", "" ,""};//状态 public ContorlPlanStatus() { InitializeComponent(); if (chcStatus1.Checked) { statusArr[0] = "00"; } if (chcStatus2.Checked) { statusArr[1] = "10"; } if (chcStatus3.Checked) { statusArr[2] = "20"; } if (chcStatus4.Checked) { statusArr[2] = "30"; } if (chcStatus5.Checked) { statusArr[2] = "40"; } } private void chc_CheckedChanged(object sender, EventArgs e) { if (chcStatus1.Checked) { statusArr[0] = "00"; } else { statusArr[0] = ""; } if (chcStatus2.Checked) { statusArr[1] = "10"; } else { statusArr[1] = ""; } if (chcStatus3.Checked) { statusArr[2] = "20"; } else { statusArr[2] = ""; } if (chcStatus4.Checked) { statusArr[3] = "30"; } else { statusArr[3] = ""; } if (chcStatus5.Checked) { statusArr[4] = "40"; } else { statusArr[4] = ""; } } public bool Status1 { get { return chcStatus1.Checked; } set { chcStatus1.Checked = value; } } public bool Status2 { get { return chcStatus2.Checked; } set { chcStatus2.Checked = value; } } public bool Status3 { get { return chcStatus3.Checked; } set { chcStatus3.Checked = value; } } public bool Status4 { get { return chcStatus4.Checked; } set { chcStatus4.Checked = value; } } public bool Status5 { get { return chcStatus5.Checked; } set { chcStatus5.Checked = value; } } } }