Esempio n. 1
0
        public GridChangeCommentUndoUnit(ResXStringGridRow sourceRow, AbstractResXEditorGrid grid, string key, string oldComment, string newComment)
        {
            if (sourceRow == null)
            {
                throw new ArgumentNullException("sourceRow");
            }
            if (grid == null)
            {
                throw new ArgumentNullException("grid");
            }

            this.SourceRow  = sourceRow;
            this.Grid       = grid;
            this.Key        = key;
            this.OldComment = oldComment;
            this.NewComment = newComment;
        }
        private void ChangeColumnValue(string from, string to)
        {
            AbstractResXEditorGrid grid = (AbstractResXEditorGrid)SourceRow.DataGridView;

            SourceRow.Cells[grid.KeyColumnName].Tag   = from;
            SourceRow.Cells[grid.KeyColumnName].Value = to;
            grid.ValidateRow(SourceRow);
            grid.NotifyDataChanged();
            grid.SetContainingTabPageSelected();

            if (SourceRow.ErrorMessages.Count > 0)
            {
                SourceRow.Status = KEY_STATUS.ERROR;
            }
            else
            {
                SourceRow.Status = KEY_STATUS.OK;
                SourceRow.DataSourceItem.Name = SourceRow.Key;
                SourceRow.LastValidKey        = SourceRow.Key;
            }
        }
Esempio n. 3
0
        public GridRowAddUndoUnit(ResXEditorControl control, List <ResXStringGridRow> rows, AbstractResXEditorGrid grid, KeyValueIdentifierConflictResolver conflictResolver)
        {
            if (control == null)
            {
                throw new ArgumentNullException("control");
            }
            if (grid == null)
            {
                throw new ArgumentNullException("grid");
            }
            if (rows == null)
            {
                throw new ArgumentNullException("rows");
            }
            if (conflictResolver == null)
            {
                throw new ArgumentNullException("conflictResolver");
            }

            this.Rows             = rows;
            this.Grid             = grid;
            this.ConflictResolver = conflictResolver;
            this.Control          = control;
        }
        public RemoveStringsUndoUnit(ResXEditorControl control, List <ResXStringGridRow> elements, AbstractResXEditorGrid grid, KeyValueIdentifierConflictResolver conflictResolver)
        {
            if (control == null)
            {
                throw new ArgumentNullException("control");
            }
            if (elements == null)
            {
                throw new ArgumentNullException("elements");
            }
            if (grid == null)
            {
                throw new ArgumentNullException("grid");
            }
            if (conflictResolver == null)
            {
                throw new ArgumentNullException("conflictResolver");
            }

            this.Elements         = elements;
            this.Grid             = grid;
            this.ConflictResolver = conflictResolver;
            this.Control          = control;
        }