using System; using System.Drawing; using System.Windows.Forms; namespace SHARP_CLAS_UI { public partial class uc_Output_Vlaue : UserControl { public delegate void ClickEvent(object sender, EventArgs e); public bool status; public readonly string name; public readonly string description; public OutputAxis Axis { get; private set; } public int Row { get; private set; } public uc_Output_Vlaue(string name, string description, OutputAxis Axis, int Row, bool status = false) { InitializeComponent(); this.name = name; this.description = description; lb_Name.Text = name; lb_Description.Text = description; this.Axis = Axis; this.Row = Row; this.status = status; lb_State.BackColor = status ? Color.Lime : Color.Green; } public void Change_Status(bool status) { this.status = status; lb_State.BackColor = status ? Color.Lime : Color.Green; } public void Add_Click_Event(ClickEvent clicked) { lb_State.Click += new EventHandler(clicked); } } }