Example #1
0
 void dataGridView1_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     if (!inUndoRedo)
     {
         SchemaDialogNewRow cmd = new SchemaDialogNewRow(this.dataGridView1, this.items, this.dataGridView1.Rows[e.RowIndex]);
         Push(cmd);
     }
     return;
 }
Example #2
0
 void dataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 2)
     {
         DataGridViewRow  row      = this.dataGridView1.Rows[e.RowIndex];
         DataGridViewCell cell     = row.Cells[2];
         string           filename = cell.Value as string;
         if (!inUndoRedo)
         {
             SchemaDialogNewRow      newRow = this.undoManager.Peek() as SchemaDialogNewRow;
             SchemaDialogEditCommand cmd    = new SchemaDialogEditCommand(this.dataGridView1, this.items, row, filename);
             if (newRow != null)
             {
                 this.undoManager.Pop(); // merge new row command with this edit command.
                 cmd.IsNewRow = true;
             }
             Push(cmd);
         }
     }
 }
 void dataGridView1_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     if (!inUndoRedo) {
         SchemaDialogNewRow cmd = new SchemaDialogNewRow(this.dataGridView1, this.items, this.dataGridView1.Rows[e.RowIndex]);
         Push(cmd);
     }
     return;
 }