private void ButtonClearAllClick(object sender, EventArgs e) { for (int i = 0; i < 32; i++) { CheckListBoxModes.SetItemChecked(i, false); } }
public ApplicationModesForm(uint appModes) : this() { _appModes = appModes; for (int i = 0; i < 32; i++) { CheckListBoxModes.SetItemChecked(i, (_appModes & (1 << i)) != 0); } }
private void FormClose(object sender, FormClosingEventArgs e) { if (DialogResult == DialogResult.OK) { _appModes = 0; for (int i = 0; i < 32; i++) { if (CheckListBoxModes.GetItemChecked(i)) { _appModes = _appModes | (uint)(1 << i); } } if (_appModes == 0) { _appModes = 0xFFFFFFFF; } } }
public ApplicationModesForm() { #if Core this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25f); #endif InitializeComponent(); //#if SegoeFont //this.Font = SystemFonts.MessageBoxFont; //#endif CheckListBoxModes.ClientSize = new Size(CheckListBoxModes.ClientSize.Width, CheckListBoxModes.GetItemRectangle(0).Height * 8); ButtonCheckAll.Click += ButtonCheckAllClick; ButtonClearAll.Click += ButtonClearAllClick; this.Load += ApplicationModesForm_Load; this.FormClosing += FormClose; }