private static void InitCheckBox(ref SharpDXCheckBox control, string text, object tag, bool bChecked) { control = new SharpDXCheckBox(); control.Text = text; control.Tag = tag; control.Checked = bChecked; control.CheckedChangedEvent += checkBox_CheckedChanged; }
private static void InitCheckBox(ref SharpDXCheckBox control, string text, object tag, bool bChecked) { control = new SharpDXCheckBox(); control.Text = text; control.Tag = tag; control.Checked = bChecked; control.CheckedChangedEvent += checkBox_CheckedChanged; control.MouseClickEventUp += (sender, e) => { if (e.Wheel) { ((SharpDXCheckBox)sender).Checked = !((SharpDXCheckBox)sender).Checked; } }; }
static void checkBox_CheckedChanged(object sender, EventArgs e) { SharpDXCheckBox control = (SharpDXCheckBox)sender; ConfigUtils.SetValue(control.Tag.ToString(), control.Checked); }
static void checkBox_CheckedChanged(object sender, EventArgs e) { SharpDXCheckBox control = (SharpDXCheckBox)sender; }