private void OnMenuEditFile(object sender, RoutedEventArgs e) { if (!BtnAdd.IsEnabled) { return; } if (null == PointItem) { NotifyMessageEx.ShowNotify(Tool.MainWindow.This, "请选择需要编辑的车辆", "提示"); return; } if (((Tool.RobotsHome.RobotInfo)(PointItem)).NetState) { NotifyMessageEx.ShowNotify(Tool.MainWindow.This, "该车已经连接无法编辑", "提示"); return; } CarEditWin.Show(Tool.MainWindow.This, ((Tool.RobotsHome.RobotInfo)PointItem)); }
private void OnClickManageRobotList(object sender, MouseButtonEventArgs e) { if (!BtnAdd.IsEnabled) { return; } var SelectedItem = RobotManageListView.SelectedItem; if (null == SelectedItem) { return; } RobotInfo info = SelectedItem as Tool.RobotsHome.RobotInfo; if (info.NetState) { NotifyMessageEx.ShowNotify(Tool.MainWindow.This, "该车已经连接无法编辑", "提示"); return; } CarEditWin.Show(Tool.MainWindow.This, info); }