Esempio n. 1
0
        private bool CanDelete([CanBeNull] DataGrid dataGrid)
        {
            if (dataGrid == null)
            {
                return(false);
            }

            return((dataGrid.SelectionUnit == DataGridSelectionUnit.CellOrRowHeader) && dataGrid.SelectedCells.Any(cellInfo => cellInfo.IsOfColumnType(ColumnType.Comment, ColumnType.Language)) ||
                   SelectedTableEntries.Any());
        }
        private bool CanDelete([CanBeNull] DataGrid dataGrid)
        {
            if (dataGrid == null)
            {
                return(false);
            }

            if (dataGrid.GetIsEditing())
            {
                return(false);
            }

            if (Settings.IsCellSelectionEnabled)
            {
                return(dataGrid.GetSelectedVisibleCells().All(cellInfo => cellInfo.IsOfColumnType(ColumnType.Comment, ColumnType.Language)));
            }

            return(SelectedTableEntries.Any());
        }
 private bool CanToggleConsistencyCheck(string ruleId)
 {
     return(SelectedTableEntries.Any() && _configuration.Rules.IsEnabled(ruleId));
 }