/// <summary> /// Handles the Click event of the test columnizer <see cref="ToolStripButton"/>. /// </summary> private void TsbTestColumnizerClick(object sender, System.EventArgs e) { // Create a new temporary columnizer object for testing. Columnizer tmpColumnizer = new Columnizer(txtName.Text); foreach (DataGridViewRow dgvRow in dgvColumns.Rows) { bool optional = dgvRow.Cells[2].Value != null; LogColumnType columnType = (LogColumnType)System.Enum.Parse( typeof(LogColumnType) , (string)dgvRow.Cells[3].Value); tmpColumnizer.Columns.Add(new LogColumn( (string)dgvRow.Cells[0].Value , (string)dgvRow.Cells[1].Value , optional , columnType)); } using (FrmColumnizerTest testColumnizerDlg = new FrmColumnizerTest(tmpColumnizer)) { testColumnizerDlg.ShowDialog(this); } }
/// <summary> /// Handles the Click event of the testr columnizer <see cref="ToolStripButton"/>. /// </summary> private void TsbTestColumnizerClick(object sender, System.EventArgs e) { // Create a new temporary columnizer object for testing. Columnizer tmpColumnizer = new Columnizer(txtName.Text); foreach (DataGridViewRow dgvRow in dgvColumns.Rows) { tmpColumnizer.Columns.Add(new LogColumn( (string)dgvRow.Cells[0].Value , (string)dgvRow.Cells[1].Value)); } using (FrmColumnizerTest testColumnizerDlg = new FrmColumnizerTest(tmpColumnizer)) { testColumnizerDlg.ShowDialog(this); } }