private void monitorEquipmentListControl_DoubleClickEvent(Data.MonitorStationEquInfo obj) { if (obj == null) { return; } MonitorStationEquDialog dialog = new MonitorStationEquDialog(obj); dialog.Title = "设备信息"; dialog.IsShowDetail = true; dialog.ShowDialog(this); }
private void dataGridMonitorEquipment_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (e.ChangedButton == MouseButton.Left) { DataGridRow dgr = DataGridRow.GetRowContainingElement(e.OriginalSource as FrameworkElement); if (dgr != null) { var monitorEquipnent = dgr.DataContext as MonitorStationEquInfo; if (monitorEquipnent != null) { MonitorStationEquDialog dialog = new MonitorStationEquDialog(monitorEquipnent); dialog.Title = "便携式设备信息"; dialog.IsShowDetail = true; dialog.ShowDialog(this); } } } }
/// <summary> /// 修改设备 /// </summary> /// <param name="obj"></param> private void equipmentListControl_DoubleClickEvent(MonitorStationEquInfo obj) { if (SelectedMonitorStation == null) { MessageBox.Show("请选择要查看的设备监测站信息!"); return; } if (equipmentListControl.EquipmentSelected == null) { MessageBox.Show("请选择要查看的设备信息!"); return; } MonitorStationEquDialog dialog = new MonitorStationEquDialog(equipmentListControl.EquipmentSelected); dialog.Title = "查看设备信息"; dialog.IsShowDetail = true; dialog.ShowDialog(this); }