const int dashStyleTimes = 10; //显示边界风格切换的次数,到达10次之后切换边界风格,DashDot->Dash或Dash->DashDot

        public GraphicWaveGateView(WaveGate waveGate, OverViewDisplayer ovd)
        {
            displayer = ovd;
            canvas    = displayer.Canvas;

            this.waveGate = waveGate;

            waveGateBrush = canvas.CreateSolidColorBrush(waveGate.IsSemiAuto ?
                                                         Tools.GetColorFFromRgb(255, 255, 0) :
                                                         Tools.GetColorFFromRgb(245, 222, 179));

            coodinateSystem = displayer.coordinateSystem;

            //Selected = false;

            PolarCoordinate c = new PolarCoordinate
            {
                Az = waveGate.BeginAngle,
                //ProjectedDis = waveGate.BeginDistance;    //之前版本将距离赋给ProjectedDis
                Dis = waveGate.BeginDistance
            };

            innerLeft = coodinateSystem.CoordinateToPoint(c);

            c.Az = waveGate.EndAngle;
            //c.ProjectedDis = waveGate.EndDistance;  //之前版本将距离赋给projectedDis
            c.Dis       = waveGate.EndDistance;
            outterRight = coodinateSystem.CoordinateToPoint(c);

            geometry = coodinateSystem.BuildWaveGateGeometry(innerLeft, outterRight);
        }
Пример #2
0
        float sweepAngleMinimum = 1; //扫描方位的最小值

        public OverViewDisplayer_AntennaControl(OverViewDisplayer displayer) : base(displayer)
        {
            beginLinePoint                = displayer.coordinateSystem.OriginalPoint;
            dragLinePoint                 = displayer.coordinateSystem.OriginalPoint;
            antennaRangeAreaBrush         = displayer.Canvas.CreateSolidColorBrush(new ColorF(255, 0, 0));
            antennaRangeAreaBrush.Opacity = 0.5f;
            dragLinePoint                 = new Point2F();
        }
Пример #3
0
 public OverViewDisplayerAntennaContrlAttach(OverViewDisplayer displayer) : base(displayer)
 {
     _sectiorCount      = GetSectorCount();
     _sectorCenter      = CalSectorCenter();
     FixedSweepAngle    = _sectorCoverage * 5;
     _sectorBorderBrush = displayer.Canvas.CreateSolidColorBrush(new ColorF(1.0f, 0.0f, 0.0f));
     //_sectorBorderBrush.Opacity = 0.7f;
 }
        protected bool isSemiAutoWaveGate;    //true表示半自动波门,false表示自动波门

        protected OverViewDisplayer_WaveGate(OverViewDisplayer displayer) : base(displayer)
        {
            StrokeStyleProperties ssp = new StrokeStyleProperties {
                DashStyle = DashStyle.Dash
            };

            borderStyle = displayer.Factory.CreateStrokeStyle(ssp);
        }
Пример #5
0
        protected OverViewDisplayerState(OverViewDisplayer displayer)
        {
            this.displayer = displayer;
            drawer         = displayer.DisplayControl.CreateGraphics();

            //挂接代理
            displayer.DisplayControl.MouseDown += MouseDown;
            displayer.DisplayControl.MouseUp   += MouseUp;
            displayer.DisplayControl.MouseMove += MouseMove;
        }
        public OverViewDisplayerAntennaControlFixed60(OverViewDisplayer displayer) : base(displayer)
        {
            BeginLinePoint                 = displayer.coordinateSystem.OriginalPoint;
            DragLinePoint                  = displayer.coordinateSystem.OriginalPoint;
            _antennaRangeAreaBrush         = displayer.Canvas.CreateSolidColorBrush(new ColorF(1, 0, 0));
            _antennaRangeAreaBrush.Opacity = 0.6f;
            Brush dragLineBrush = displayer.Canvas.CreateSolidColorBrush(new ColorF(0, 0, 1));

            dragLineBrush.Opacity = 0.7f;
            DragLinePoint         = new Point2F();
        }
        public OverViewDisplayer_Zoom(OverViewDisplayer displayer) : base(displayer)
        {
            //this.displayer = displayer;

            //zoom模式下要响应鼠标双击事件,偏心显示
            displayer.DisplayControl.MouseDoubleClick += DisplayControl_MouseDoubleClick;

            isMouseDown             = false;
            zoomCircle              = new Ellipse();
            zoomCircleBrush         = displayer.Canvas.CreateSolidColorBrush(new ColorF(0, 0, 255));
            zoomCircleBrush.Opacity = 0.5f;
        }
Пример #8
0
        public MouseCoordinateDisplayer(OverViewDisplayer ovd)
        {
            displayer = ovd;
            displayer.DisplayControl.MouseMove += MoveMoveHandler;
            //mouseLocationCoordinateBitmap = displayer.Canvas.CreateCompatibleRenderTarget();
            coordinateBoardBrush         = displayer.Canvas.CreateSolidColorBrush(new ColorF(1, 1, 1));
            coordinateBoardBrush.Opacity = 0.5f;
            textBrush = displayer.Canvas.CreateSolidColorBrush(new ColorF(0, 1, 1));
            DWriteFactory dw = DWriteFactory.CreateFactory();

            idFormation = dw.CreateTextFormat("Berlin Sans FB Demi", 25);
        }
Пример #9
0
        public SystemController(OverViewDisplayer ovd)
        {
            //目标显示器命令初始化
            antennaControlStateCmd = new OverViewDisplayerAntennaControlCommand(ovd);
            autoWaveGateStateCmd   = new OverViewDisplayerAutoWaveGateCommand(ovd);
            semiAutoWaveGateCmd    = new OverViewDisplayerSemiAutoWaveGateCommand(ovd);
            zoomStateCmd           = new OverViewDisplayerZoomStateCommand(ovd);
            ResetDisplayerCmd      = new OverViewDisplayerResetCommand(ovd);

            delAvtiveTarget = new TargetManagerDeleteActiveTargetCommand();

            dataSourceController = TargetManagerFactory.CreateDataSourceController();

            deleteActiveWaveGatesCmd = new WaveGateDeleteActiveCommand();
        }
        IWaveGateDataProvider gateManager;   //波门管理对象

        public GraphicWaveGateViewManager(OverViewDisplayer dispalyer)
        {
            this.dispalyer = dispalyer;

            views = new List <GraphicWaveGateView>();

            //相应说表点击事件,该事件处理波门的选择
            dispalyer.DisplayControl.MouseClick += DisplayControl_MouseClick;

            //获取波门管理对象
            gateManager = TargetManagerFactory.CreateWaveGateDataProvider();
            gateManager.RegisterObserver(this); //注册监听

            //获取所有波门数据
            ReloadWaveGates();
        }
 protected OverViewDispalerScroll(OverViewDisplayer displayer)
 {
     Displayer             = displayer;
     HorizontalStep        = displayer.coordinateSystem.CoordinateArea.Width / StepCoff;
     VerticalStep          = displayer.coordinateSystem.CoordinateArea.Height / StepCoff;
     BorderBrush           = displayer.Canvas.CreateSolidColorBrush(Tools.GetColorFFromRgb(255, 255, 0));
     FillBrush             = displayer.Canvas.CreateSolidColorBrush(Tools.GetColorFFromRgb(255, 255, 0));
     FillBrush.Opacity     = 0.3f;
     TriangleBrush         = displayer.Canvas.CreateSolidColorBrush(Tools.GetColorFFromRgb(255, 255, 255));
     TriangleBrush.Opacity = 0.5f;
     BorderWidth           = 2;
     Displayer.DisplayControl.MouseMove  += DisplayControl_MouseMove;
     Displayer.DisplayControl.MouseLeave += DisplayControl_MouseLeave;
     Displayer.DisplayControl.MouseDown  += DisplayControl_MouseDown;
     Displayer.DisplayControl.MouseUp    += DisplayControl_MouseUp;
 }
Пример #12
0
 public OverViewDisplayerZoomStateCommand(OverViewDisplayer ovd) : base(ovd)
 {
 }
 public OverViewDisplayer_SemiAutoWaveGate(OverViewDisplayer o) : base(o)
 {
     isSemiAutoWaveGate    = true;
     waveGateBrush         = displayer.Canvas.CreateSolidColorBrush(Tools.GetColorFFromRgb(255, 255, 0)); //黄色
     waveGateBrush.Opacity = 0.5f;                                                                        //透明度
 }
Пример #14
0
 public UpScroller(OverViewDisplayer displayer) : base(displayer)
 {
     DisplayArea = new Rect(0, 0, displayer.DisplayControl.Size.Width, ScrollerWidth);
 }
 public OverViewDisplayer_AutoWaveGate(OverViewDisplayer o) : base(o)
 {
     isSemiAutoWaveGate    = false;
     waveGateBrush         = displayer.Canvas.CreateSolidColorBrush(Tools.GetColorFFromRgb(245, 222, 179)); //淡黄色
     waveGateBrush.Opacity = 0.5f;                                                                          //透明度
 }
 public OverViewDisplayerZoomCommand(OverViewDisplayer ovd, Rect zoomRect) : base(ovd)
 {
     rect = zoomRect;
 }
Пример #17
0
 public OverViewDisplayerCommand(OverViewDisplayer ovd)
 {
     this.ovd = ovd;
 }
Пример #18
0
        public DownScroller(OverViewDisplayer displayer) : base(displayer)
        {
            Size s = displayer.DisplayControl.Size;

            DisplayArea = new Rect(0, s.Height - ScrollerWidth, s.Width, s.Height);
        }
 public OverViewDisplayerOffsetCommand(OverViewDisplayer ovd, Point p) : base(ovd)
 {
     mouseDoubleClickPos = Tools.PointToPoint2F(p);
 }
Пример #20
0
 public OverViewDisplayerAntennaControlCommand(OverViewDisplayer ovd) : base(ovd)
 {
 }
Пример #21
0
 public OverViewDisplayerSemiAutoWaveGateCommand(OverViewDisplayer ovd) : base(ovd)
 {
 }
Пример #22
0
 public RightScroller(OverViewDisplayer displayer) : base(displayer)
 {
     DisplayArea = new Rect(displayer.DisplayControl.Size.Width - ScrollerWidth, 0, displayer.DisplayControl.Size.Width, displayer.DisplayControl.Size.Height);
 }
Пример #23
0
 public OverViewDisplayerResetCommand(OverViewDisplayer ovd) : base(ovd)
 {
 }