private void btnAdd_Click(object sender, EventArgs e) { using (FormEditDevice form = new FormEditDevice(null, mListDevice)) { if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { DoRefresh(); } } }
private void mListViewData_MouseDoubleClick(object sender, MouseEventArgs e) { Device data = mListViewData.SelectedObject as Device; if (data != null && data.DeviceID > 0) { using (FormEditDevice form = new FormEditDevice(data, mListDevice)) { if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { DoRefresh(); } } } }