/// <summary> /// 查看移动轨迹 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void itemTrack_Click(object sender, RoutedEventArgs e) { MenuItem item = sender as MenuItem; ContextMenu menu = item.Parent as ContextMenu; var target = menu.PlacementTarget as OrgToMapStyle; if (target != null) { PP_OrgInfo orgInfo = target.OrgInfo; //先查有没有车,或者车牌 PP_VehicleInfo itemVehicle = null; PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel => { //更新当前节点 itemVehicle = channel.GetPP_VehicleInfo(orgInfo.GUID); }); if (itemVehicle != null && !string.IsNullOrEmpty(itemVehicle.VEHICLE_NUMB)) { OrgToMapStyle group = new OrgToMapStyle(orgInfo); Track.TrackCondition conTrack = new Track.TrackCondition(group); conTrack.VehicleNum = itemVehicle.VEHICLE_NUMB; conTrack.Owner = VisualTreeHelperExtension.GetParentObject <System.Windows.Window>(Element); conTrack.Show(); } else { MessageBox.Show("没有查询到车辆信息!"); } } }
private void itemTrack_Click(object sender, RoutedEventArgs e) { MenuItem item = sender as MenuItem; ContextMenu menu = item.Parent as ContextMenu; var target = menu.PlacementTarget as PersonPoint; if (target != null) { PP_OrgInfo orgInfo = target.OrgInfo; PP_PersonInfo personInfo = target.PersonInfo; PersonPoint group = new PersonPoint(orgInfo, personInfo); Track.TrackCondition conTrack = new Track.TrackCondition(group); conTrack.VehicleNum = personInfo.GUID; conTrack.Owner = VisualTreeHelperExtension.GetParentObject <System.Windows.Window>(Element); conTrack.Show(); } }