/// <summary> /// 双击事件 /// </summary> protected void get_devInfo(object sender, MouseButtonEventArgs e) { if (DevEnable) { if (e.ClickCount == 2) { if (this.DevType == devType.normal) { DlgDevicePropertyManage devAttrDlg = new DlgDevicePropertyManage(ref this.instrument, this.dev.Source); devAttrDlg.ShowDialog(); e.Handled = true; } else if (this.DevType == devType.list) { //DCPowerDisplay dcPowerDlg = new DCPowerDisplay(); //dcPowerDlg.ShowDialog(); //e.Handled = true; } } } if (e.ChangedButton == MouseButton.Right) { if (this.instrument == null) { this.conMenu.Visibility = Visibility.Hidden; } else { this.conMenu.Visibility = Visibility.Visible; } } }
/// <summary> /// 设置设备属性 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void devAtr_Click(object sender, RoutedEventArgs e) { if (instrument.InstrumentTypeID == InstrumentType.TemperatureMonitor) { //new DlgVIDXJDeviceProperty(ref this.instrument, this.dev.Source).ShowDialog(); } else { DlgDevicePropertyManage devAttrDlg = new DlgDevicePropertyManage(ref this.instrument, this.dev.Source); devAttrDlg.ShowDialog(); } }
private void btnSet_Click(object sender, RoutedEventArgs e) { DlgDevicePropertyManage DlgDev = new DlgDevicePropertyManage(ref DutInfo, null); DlgDev.ShowDialog(); }