internal override bool Perform() { if (_treeAcronyms.FocusedNode == null || !AcronymManager.IsAcronymNode(_treeAcronyms.FocusedNode)) { return(false); } VarConfig.AcronymRow acronymRow = _treeAcronyms.FocusedNode.Tag as VarConfig.AcronymRow; categStateChanged = acronymRow.GetCategoryRows().Count() == 0; _varConfigFacade.AddCategoryRow(acronymRow); _acronymManager.FillCategoriesList(_treeAcronyms.FocusedNode); return(true); }
internal override bool Perform() { if (_dgvCategories.SelectedRows.Count == 0) { return(false); } categStateChanged = _dgvCategories.Rows.Count == _dgvCategories.SelectedRows.Count; foreach (DataGridViewRow row in _dgvCategories.SelectedRows) { VarConfig.CategoryRow categoryRow = row.Tag as VarConfig.CategoryRow; categoryRow.Delete(); } _acronymManager.FillCategoriesList(_treeAcronyms.FocusedNode); return(true); }
void treeAcronyms_FocusedNodeChanged(object sender, FocusedNodeChangedEventArgs e) { _acronymManager.FillCategoriesList(e.Node); SetButtonGreyState(); }