コード例 #1
0
        public void IsZeroDegreeAcrossingAngleAreaTest()
        {
            AngleArea area = new AngleArea(359.9f, 10);
            bool      ret  = AngleArea.IsZeroDegreeAcrossingAngleArea(area);

            Assert.AreEqual(ret, true);
            //Assert.Fail();
        }
コード例 #2
0
        public ISweepSectionView(AngleArea sweepSection, GraphicTrackDisplayer displayer)
        {
            _sweepAngleArea = sweepSection;
            _displayer      = displayer;

            _antennaRangeAreaBrush            = displayer.Canvas.CreateSolidColorBrush(new ColorF(1, 0, 0));
            _antennaRangeAreaBrush.Opacity    = 0.25f;
            _antennaRangeBorlderBrush         = displayer.Canvas.CreateSolidColorBrush(new ColorF(1, 0, 0));
            _antennaRangeBorlderBrush.Opacity = 1;

            _beginLinePoint = displayer.coordinateSystem.CalIntersectionPoint(sweepSection.BeginAngle);
            //gs.AddLine(_beginLinePoint);

            _endLinePoint = displayer.coordinateSystem.CalIntersectionPoint(sweepSection.EndAngle);
        }
コード例 #3
0
        public OverSweepSectionView(AngleArea sweepSection, GraphicTrackDisplayer displayer) : base(sweepSection, displayer)
        {
            _sweepSectionGraphic = displayer.Factory.CreatePathGeometry();
            GeometrySink gs = _sweepSectionGraphic.Open();

            gs.BeginFigure(displayer.coordinateSystem.OriginalPoint, FigureBegin.Filled);
            gs.AddLine(_beginLinePoint);
            //扇形的X轴Y轴半径是矩形框width的一半
            SizeF size = new SizeF((float)displayer.coordinateSystem.CoordinateArea.Width / 2, (float)displayer.coordinateSystem.CoordinateArea.Height / 2);

            //添加弧线
            ArcSegment arc = new ArcSegment(_endLinePoint, size, 0, SweepDirection.Clockwise, ArcSize.Small);

            gs.AddArc(arc);

            //添加第二条线
            gs.AddLine(displayer.coordinateSystem.OriginalPoint);
            gs.EndFigure(FigureEnd.Closed);
            gs.Close();

            _centerSectorBorder = displayer.Canvas.CreateSolidColorBrush(new ColorF(1, 1, 0));
        }
コード例 #4
0
 internal abstract ISweepSectionView CreateSweepSwctionView(AngleArea sweepSection);
コード例 #5
0
 public AntennaSetSectionSweepModeCommand(float beginAngle, float endAngle)
 {
     _angleArea = new AngleArea(beginAngle, endAngle);
 }
コード例 #6
0
 public AntennaSetSectionSweepModeCommand(AngleArea area)
 {
     _angleArea = area;
 }
コード例 #7
0
 public SideViewSweepView(AngleArea sweepSection, GraphicTrackDisplayer displayer) : base(sweepSection, displayer)
 {
 }
コード例 #8
0
 internal override ISweepSectionView CreateSweepSwctionView(AngleArea sweepSection)
 {
     return(null);
 }
コード例 #9
0
 private void OnNewSweepSection(AngleArea area) => new AntennaSetSectionSweepModeCommand(area).Execute();