private void simpleButton3_Click_1(object sender, EventArgs e) { frmDevicetemplateSelect dlg = new frmDevicetemplateSelect(); dlg.InitDeviceType("03"); if (dlg.ShowDialog() == DialogResult.OK) { object obj = dlg.GetSelectedDevice()["device"]; if (obj != null && obj is Template_PSPDEV) { DeviceHelper.CopyTemplate(obj as Template_PSPDEV, dev); DeviceMx = dev; } } }
private void simpleButton5_Click(object sender, EventArgs e) { frmDevicetemplateSelect dlg = new frmDevicetemplateSelect(); dlg.InitDeviceType("02"); if (dlg.ShowDialog() == DialogResult.OK) { object obj= dlg.GetSelectedDevice()["device"]; if (obj!=null&&obj is Template_PSPDEV ) { DeviceHelper.CopyTemplate(obj as Template_PSPDEV, dev); DeviceMx = dev; } } }