diff options
author | emkael <emkael@tlen.pl> | 2017-09-27 13:40:15 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2017-09-27 13:40:15 +0200 |
commit | d881985658c2df2f10ed855c71f67c4b993845f0 (patch) | |
tree | fef884c13603a8b8b578f642f917618118b8b62c /Aktywator/MainForm.cs | |
parent | 625fec8496401e2a9b02139d8e4c59967bfb0851 (diff) |
Preview hand records present in BWS
Fixes #2
Diffstat (limited to 'Aktywator/MainForm.cs')
-rw-r--r-- | Aktywator/MainForm.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Aktywator/MainForm.cs b/Aktywator/MainForm.cs index 10fa819..602a260 100644 --- a/Aktywator/MainForm.cs +++ b/Aktywator/MainForm.cs @@ -595,5 +595,24 @@ namespace Aktywator tabControl1.Enabled = true; this.Cursor = Cursors.Default; } + + private void gwSections_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.RowIndex > -1 && e.ColumnIndex > 0 && gwSections.Rows[e.RowIndex].Cells[e.ColumnIndex].Tag != null) + { + HandRecordPreview preview = new HandRecordPreview((HandRecord)gwSections.Rows[e.RowIndex].Cells[e.ColumnIndex].Tag, gwSections.Rows[e.RowIndex].HeaderCell.Value + "-" + gwSections.Columns[e.ColumnIndex].HeaderCell.Value); + preview.ShowDialog(); + } + } + + private void gwSections_CurrentCellDirtyStateChanged(object sender, EventArgs e) + { + DataGridView grid = (DataGridView)sender; + if (grid.IsCurrentCellDirty) + { + grid.CommitEdit(DataGridViewDataErrorContexts.Commit); + } + } + } } |