private void ItemsListView_MouseDoubleClick(object sender, MouseEventArgs e) { if (SelectedItem != null && doubleClickEnable) { if (SelectedItem.RecordType == RecordTypesCollection.Instance.TransferType) { TransferRecordForm form = new TransferRecordForm(currentDetail, (TransferRecord)SelectedItem); if (form.ShowDialog() == DialogResult.OK) { UpdateItems(); } } else if (SelectedItem.RecordType == RecordTypesCollection.Instance.ActualStateRecordType) { ActualStateRecordForm form = new ActualStateRecordForm((ActualStateRecord)SelectedItem); if (form.ShowDialog() == DialogResult.OK) { UpdateItems(); } } else { ComplianceForm form = new ComplianceForm((DirectiveRecord)SelectedItem); if (form.ShowDialog() == DialogResult.OK) { UpdateItems(); } } } }
private void ItemsListView_MouseDoubleClick(object sender, MouseEventArgs e) { if (SelectedItem != null && doubleClickEnable) { ComplianceForm form = new ComplianceForm(SelectedItem); form.RecordChanged += form_RecordChanged; form.ShowDialog(); } }