private void OnKeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Return) { Finish(); } else if (e.KeyCode == Keys.Space) { var addition = Modules.Any(module => module.Install) && !Modules.All(module => module.Install); foreach (var selectedRow in gridView.GetSelectedRows()) { if (!gridView.IsGroupRow(selectedRow)) { if (gridView.GetRow(selectedRow) is XpandModule xpandModule) { xpandModule.Install = addition || !xpandModule.Install; } } } gridView.RefreshData(); } else if (e.KeyCode == Keys.A && e.Modifiers == Keys.Control) { for (int i = 0; i < gridView.RowCount; i++) { gridView.SelectRow(i); } } }
public bool DoAllModulesHaveLibraries() => Modules.All(m => m == SystemModule || m.Libraries.Count > 0);