public SDReporting() { InitializeComponent(); _sDReporting = this; myDeleate = new SetEnable(SetEnableMethod); myDeleate2 = new SetGroupEnable(SetGroupEnableMethod); }
private void SetFunEnable(PictureBox pb, string fun_id) { if (pb.InvokeRequired) { SetEnable se = new SetEnable(this.SetFunEnable); this.Invoke(se, pb, fun_id); } else { pb.Enabled = this.HasFunction(fun_id); } }
private void SetButtomEnabled(bool enabled, Button button) { if (button.InvokeRequired) { var call = new SetEnable(SetButtomEnabled); Invoke(call, enabled, button); } else { button.Enabled = enabled; } }
private void SetStateButton(bool state, Control option) { if (option.InvokeRequired) { var d = new SetEnable(this.SetStateButton); option.Invoke(d, state, option); } else { option.Enabled = state; } }
private void SetFunEnable(PictureBox pb, string fun_id) { if (pb.InvokeRequired) { SetEnable se = new SetEnable(this.SetFunEnable); this.Invoke(se, pb, fun_id); } else { pb.Enabled = this.HasFunction(fun_id); } }
private void SetControl(Control ctl,bool b) { if (ctl.InvokeRequired) { SetEnable c = new SetEnable(SetControl); this.Invoke(c, new object[] { ctl, b }); } else { ctl.Enabled = b; } }
public IoBus(SetEnable setEnable, BusMessage <T> startState) : base(startState) { _setEnable = setEnable; }