コード例 #1
0
        /// <summary>
        /// 切换功能区按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FuncationToggleButton_Checked(object sender, RoutedEventArgs e)
        {
            ClearMainWindow();
            ToggleButton tb = sender as ToggleButton;

            tb.IsEnabled = false;
            tb.IsChecked = true;
            switch (tb.Tag.ToString())
            {
            case "0":
                ChannelManagePolyline.Visibility = Visibility.Visible;
                FuncationArea.Content            = _CM;
                break;

            case "1":
                CompOfRecordsPolyline.Visibility = Visibility.Visible;
                _COR.RefreshChannelComboBox();
                FuncationArea.Content = _COR;
                break;

            case "2":
                CaptureRecordQueryPolyline.Visibility = Visibility.Visible;
                _CRQ.RefreshChannelComboBox();
                FuncationArea.Content = _CRQ;
                break;

            case "3":
                TemplateManagerPolyline.Visibility = Visibility.Visible;
                _TM.QueryTemplateCmpDelegate       = TMQueryTemplateCmp;
                FuncationArea.Content = _TM;
                break;
            }
        }
コード例 #2
0
        /// <summary>
        /// 切换功能区按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void FuncationToggleButton_Checked(object sender, RoutedEventArgs e)
        {
            ClearMainWindow();
            ToggleButton tb = sender as ToggleButton;

            tb.IsEnabled = false;
            tb.IsChecked = true;
            switch (tb.Tag.ToString())
            {
            case "0":
                ChannelManagePolyline.Visibility = Visibility.Visible;

                _CM.MainMap.Points =
                    BrushAnchor.BrushCameraForChannel(
                        channel: GlobalCache.ChannelList,
                        blueCamera: "pack://application:,,,/Images/home-icon-bluecamera.png",
                        redCamera: "pack://application:,,,/Images/home-icon-redcamera.png");

                if (_CM.MainMap.Points.Count > 0)
                {
                    _CM.MainMap.CurrentPosition = _CM.MainMap.Points[_CM.MainMap.Points.Count - 1].Point;
                }
                else
                {
                    _CM.MainMap.CurrentPosition = new GMap.NET.PointLatLng(GlobalCache.Latitude, GlobalCache.Longitude);
                }


                FuncationArea.Content = _CM;
                //增加地图锚点显示功能
                break;

            case "1":
                CompOfRecordsPolyline.Visibility = Visibility.Visible;
                _COR.RefreshChannelComboBox();
                FuncationArea.Content = _COR;
                break;

            case "2":
                CaptureRecordQueryPolyline.Visibility = Visibility.Visible;
                _CRQ.RefreshChannelComboBox();
                FuncationArea.Content = _CRQ;
                break;

            case "3":
                TemplateManagerPolyline.Visibility = Visibility.Visible;
                //_CRQ.RefreshChannelComboBox();
                _TM.QueryTemplateCmpDelegate = TMQueryTemplateCmp;
                FuncationArea.Content        = _TM;
                break;

            case "4":
                StaticComparePolyline.Visibility = Visibility.Visible;
                sc.MainControl staticAnalysis = new sc.MainControl();
                FuncationArea.Content = staticAnalysis;
                break;

            case "5":
                LocusAnalyzePolyline.Visibility = Visibility.Visible;
                tr.MainTraceAnalysisView traceAnalysis = new tr.MainTraceAnalysisView();
                if (!(e.Source is ToggleButton))
                {
                    //MyMessage.Show("MainWindow ToggleBtn Click to TR");
                    traceAnalysis.GetPersonInfo(e.Source);
                }
                FuncationArea.Content = traceAnalysis;
                break;

            case "6":
                BusinessIntelligentPolyline.Visibility = Visibility.Visible;
                bi.MainControl businessIntelligate = new bi.MainControl();
                if (!(e.Source is ToggleButton))
                {
                    //MyMessage.Show("MainWindow ToggleBtn Click to BI");
                    biviewmodel.MainControlViewModel.ReceivedObj = e.Source;
                }
                FuncationArea.Content = businessIntelligate;
                break;
            }
        }
コード例 #3
0
        /// <summary>
        /// 切换功能区按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void FuncationToggleButton_Checked(object sender, RoutedEventArgs e)
        {
            ClearMainWindow();
            ToggleButton tb = sender as ToggleButton;

            tb.IsEnabled = false;
            tb.IsChecked = true;
            switch (tb.Tag.ToString())
            {
            case "0":
                ChannelManagePolyline.Visibility = Visibility.Visible;

                moduleChannel.MainMap.Points =
                    BrushAnchor.BrushCameraForChannel(
                        channel: GlobalCache.ChannelList,
                        blueCamera: PathOfImage.BlueCamera,
                        redCamera: PathOfImage.RedCamere);

                if (moduleChannel.MainMap.Points.Count > 0)
                {
                    moduleChannel.MainMap.CurrentPosition = moduleChannel.MainMap.Points[moduleChannel.MainMap.Points.Count - 1].Point;
                }
                else
                {
                    moduleChannel.MainMap.CurrentPosition = new GMap.NET.PointLatLng(GlobalCache.Latitude, GlobalCache.Longitude);
                }

                FuncationArea.Content = moduleChannel;
                //增加地图锚点显示功能
                break;

            case "1":
                CompOfRecordsPolyline.Visibility = Visibility.Visible;
                moduleCompare.RefreshChannelComboBox();
                FuncationArea.Content = moduleCompare;
                break;

            case "2":
                CaptureRecordQueryPolyline.Visibility = Visibility.Visible;
                moduleSnap.RefreshChannelComboBox();
                FuncationArea.Content = moduleSnap;
                break;

            case "3":
                TemplateManagerPolyline.Visibility      = Visibility.Visible;
                moduleTemplate.QueryTemplateCmpDelegate = TMQueryTemplateCmp;
                FuncationArea.Content = moduleTemplate;
                break;

            case "4":
                StaticComparePolyline.Visibility = Visibility.Visible;
                sc.MainControl staticAnalysis = new sc.MainControl();
                FuncationArea.Content = staticAnalysis;
                break;

            case "5":
                LocusAnalyzePolyline.Visibility = Visibility.Visible;
                tr.MainTraceAnalysisView traceAnalysis = new tr.MainTraceAnalysisView();
                if (!(e.Source is ToggleButton))
                {
                    traceAnalysis.GetPersonInfo(e.Source);
                }
                FuncationArea.Content = traceAnalysis;
                break;

            case "6":
                BusinessIntelligentPolyline.Visibility = Visibility.Visible;
                bi.MainControl businessIntelligate = new bi.MainControl();
                if (!(e.Source is ToggleButton))
                {
                    biviewmodel.MainControlViewModel.ReceivedObj = e.Source;
                }
                FuncationArea.Content = businessIntelligate;
                break;
            }
        }