コード例 #1
0
ファイル: MainForm.cs プロジェクト: PaulStovell/presentations
 private void ContactsGrid_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex > 0 && e.RowIndex < contactDataGridView.Rows.Count)
     {
         DataGridViewRow row = contactDataGridView.Rows[e.RowIndex];
         Contact selectedContact = row.DataBoundItem as Contact;
         if (selectedContact != null)
         {
             ContactEditDialog dialog = new ContactEditDialog(
                 new EditableContact(selectedContact));
             dialog.ShowDialog();
         }
     }
 }
コード例 #2
0
 private void ContactsGrid_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex > 0 && e.RowIndex < contactDataGridView.Rows.Count)
     {
         DataGridViewRow row             = contactDataGridView.Rows[e.RowIndex];
         Contact         selectedContact = row.DataBoundItem as Contact;
         if (selectedContact != null)
         {
             ContactEditDialog dialog = new ContactEditDialog(
                 new EditableContact(selectedContact));
             dialog.ShowDialog();
         }
     }
 }