private void AddAction_Click(object sender, EventArgs e) { ActionDialog d = new ActionDialog(Board, "Create Action"); if (d.ShowDialog() == DialogResult.OK) { BoardActions.Add(d.Action); } }
private void ActionsGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0 && ActionsGridView.Columns[e.ColumnIndex].Name == ActionsColumnAction.Name) { BoardAction action = BoardActions[e.RowIndex]; ActionDialog d = new ActionDialog(Board, "Edit Action", action); if (d.ShowDialog() == DialogResult.OK) { if (d.Action == null) { BoardActions.RemoveAt(e.RowIndex); } else { BoardActions[e.RowIndex] = d.Action; } } } }