Esempio n. 1
0
        private void InitBandwidth()
        {
            var color0  = Colors.OrangeRed;
            var config0 = new CursorLinePackConfig
            {
                LineWidth = 1.0f,
                BandColor = new Color
                {
                    A = 20,
                    R = color0.R,
                    G = color0.G,
                    B = color0.B,
                },
                Color            = color0,
                BandwidthMaximum = _stopFrequency,
                BandwidthMinimum = _startFrequency,
                ValueMaximum     = _stopFrequency,
                ValueMinimum     = _startFrequency,
                //BandwidthMaximum = TransformToChartSamples(_startFrequency),
                //BandwidthMinimum = TransformToChartSamples(_stopFrequncy),
                //ValueMaximum = TransformToChartSamples(_startFrequency),
                //ValueMinimum = TransformToChartSamples(_stopFrequncy),
            };

            _bandwidth = _waveform.AddPairCursors(config0);
            _bandwidth.ValueChanged += OnBandwidthChanged;
            //_bandwidth.SetValue(TransformToChartSamples(-7500), TransformToChartSamples(7500));
            _bandwidth.SetValue(CenterFrequency, CenterFrequency);
        }
Esempio n. 2
0
        public CursorLinePack AddPairCursors(CursorLinePackConfig config)
        {
            var pack = new CursorLinePack(config);

            pack.AddToChart(ContainerChart);

            _packs.Add(pack);

            return(pack);
        }
Esempio n. 3
0
        private void InitNotch()
        {
            var color1  = Colors.White;
            var config1 = new CursorLinePackConfig
            {
                LineWidth = 1.0f,
                BandColor = new Color
                {
                    A = 128,
                    R = color1.R,
                    G = color1.G,
                    B = color1.B,
                },
                Color            = color1,
                BandwidthMaximum = TransformToChartSamples(1500),
                BandwidthMinimum = TransformToChartSamples(-1500),
                ValueMaximum     = TransformToChartSamples(12000),
                ValueMinimum     = TransformToChartSamples(-12000),
            };

            _notch = _waveform.AddPairCursors(config1);
            _notch.ValueChanged += OnNotchChanged;
            _notch.SetValue(TransformToChartSamples(-1500), TransformToChartSamples(1500));
        }