/// <summary> /// Preview door's geometry when user select one door family in customizeDoorOpeningDataGridView. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void customizeDoorOpeningDataGridView_RowEnter(object sender, DataGridViewCellEventArgs e) { DoorFamily selectedDoorFamily = customizeDoorOpeningDataGridView.Rows[e.RowIndex].DataBoundItem as DoorFamily; m_currentGraphic = selectedDoorFamily.Geometry; // update the dialog box's display. previewPictureBox.Refresh(); }