private void itemTrack_Click(object sender, RoutedEventArgs e) { if (tv_PersonPlan.SelectedItem != null) { PP_OrgInfo orgInfo = tv_PersonPlan.SelectedItem as PP_OrgInfo; if (orgInfo != null) { //先查有没有车,或者车牌 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>(this); conTrack.Show(); } else { MessageBox.Show("没有查询到车辆信息!"); } } } }
/// <summary> /// 放大和缩小 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void GroupBox_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { Image img = sender as Image; var groupBox = VisualTreeHelperExtension.GetParentObject <DevExpress.Xpf.LayoutControl.GroupBox>(img); groupBox.State = groupBox.State == GroupBoxState.Normal ? GroupBoxState.Maximized : GroupBoxState.Normal; }
private void SelectImg_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { Image img = sender as Image; var groupBox = VisualTreeHelperExtension.GetParentObject <DevExpress.Xpf.LayoutControl.GroupBox>(img); ActivityPlaceLocationImageView gpv = groupBox.DataContext as ActivityPlaceLocationImageView; if (gpv.GUID == "add") { LocationImageDialog imgDialog = new LocationImageDialog(); if (imgDialog.ShowDialog(this) == true) { imgDialog.EditView.ACTIVITY_PLACE_LOCATION_GUID = locationGuid; viewList.Insert(viewList.Count - 1, imgDialog.EditView); ActivityPlaceLocationImage newitem = new ActivityPlaceLocationImage(); newitem.GUID = imgDialog.EditView.GUID; newitem.ImageName = imgDialog.EditView.ImageName; newitem.TYPE = imgDialog.EditView.TYPE; newitem.Image = imgDialog.EditView.Image; newitem.ACTIVITY_PLACE_LOCATION_GUID = imgDialog.EditView.ACTIVITY_PLACE_LOCATION_GUID; ActivityPlaceLocationImageList.Add(newitem); RefreshList(); } } }
/// <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 ListBoxItem_MouseDoubleClick(object sender, MouseEventArgs e) { if (e.LeftButton == MouseButtonState.Pressed) { ListBoxItem item = e.Source as ListBoxItem; if (item != null && item.DataContext is ActivityPlace) { ActivityPlace place = item.DataContext as ActivityPlace; var listBox = VisualTreeHelperExtension.GetParentObject <ListBox>(item); if (listBox != null && place != null) { ActivityExt activity = listBox.DataContext as ActivityExt; var userInfo = PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA_PersonSchedule, PP_OrgInfo>(channel => { return(channel.GetPP_OrgInfoByPersonID(RiasPortal.Current.UserSetting.UserID, activity.Guid)); }); if (userInfo != null && !string.IsNullOrEmpty(userInfo.GUID)) { //SystemLoginService.UserOrgInfo = userInfo; //SystemLoginService.CurrentActivity = activity; //SystemLoginService.CurrentActivityPlace = place; this.OpenActivityPlace(activity, place, userInfo); } else { MessageBox.Show("无法打开活动,未能加载当前用户在该活动中的信息"); } } } } }
private void Img_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { //var groupBox = (DevExpress.Xpf.LayoutControl.GroupBox)sender; Image img = sender as Image; var groupBox = VisualTreeHelperExtension.GetParentObject <DevExpress.Xpf.LayoutControl.GroupBox>(img); ActivityPlaceLocationImageView gpv = groupBox.DataContext as ActivityPlaceLocationImageView; groupBox.State = groupBox.State == GroupBoxState.Normal ? GroupBoxState.Maximized : GroupBoxState.Normal; }
/// <summary> /// 周围监测设施 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void itemArroundSation_Click(object sender, RoutedEventArgs e) { MenuItem item = sender as MenuItem; if (item != null && item.Tag != null) { string AreaId = item.Tag.ToString(); Dialog.SurroundStationDialog stationDialog = new Dialog.SurroundStationDialog(AreaId); stationDialog.Owner = VisualTreeHelperExtension.GetParentObject <System.Windows.Window>(this); stationDialog.Show(); } }
private void itemInfo_Click(object sender, RoutedEventArgs e) { MenuItem item = sender as MenuItem; ContextMenu menu = item.Parent as ContextMenu; var target = menu.PlacementTarget as MonitorStation; if (target != null) { FixedStationInfo stationInfo = target.StationInfo; Dialog.FixedStationDetailDialog detail = new Dialog.FixedStationDetailDialog(stationInfo); detail.Owner = VisualTreeHelperExtension.GetParentObject <System.Windows.Window>(Element); detail.Show(); } }
private void btnAreaSelect_Click(object sender, RoutedEventArgs e) { var dataGridRow = VisualTreeHelperExtension.GetParentObject <DataGridRow>(sender as UIElement); while (dataGridRow != null) { if (dataGridRow is DataGridRow && (dataGridRow.DataContext.GetType() == typeof(FreqPlanActivity))) { _selFreqPlan = (FreqPlanActivity)dataGridRow.DataContext; break; } } DialogExtendDistance dialog = new DialogExtendDistance(); dialog.OnSetDistance += dialog_OnSetDistance; dialog.ShowDialog(this); }
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(); } }
//private void Image_MouseEnter(object sender, MouseEventArgs e) //{ // Image img = sender as Image; // img.Opacity = 1; //} //private void Image_MouseLeave(object sender, MouseEventArgs e) //{ // Image img = sender as Image; // img.Opacity = 0.4; //} private void Image_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { Image img = sender as Image; if (img.Opacity != 1) { return; } if (img.Tag != null) { if (img.Tag.ToString() == "参保单位") { } if (img.Tag.ToString() == "监测站") { Dialog.FixedStationDetailDialog detail = new Dialog.FixedStationDetailDialog(null); detail.Owner = VisualTreeHelperExtension.GetParentObject <System.Windows.Window>(this); detail.Show(); } } }