Example #1
0
 void InitToolWindow()
 {
     _toolWin = new LevelMeterTool();
     _toolWin.Show();
     _toolWin.Visible   = false;
     OnLevelUpdateEvent = new OnLevelUpdate(_toolWin.OnLevelUpdate);
 }
        public LevelMeterPanel(ISharpControl control)
        {
            InitializeComponent();

            _controlInterface = control;

            ToolWin = new LevelMeterTool();
            ToolWin = new LevelMeterTool();
            ToolWin.Show();
            ToolWin.Visible    = false;
            OnLevelUpdateEvent = new OnLevelUpdate(ToolWin.OnLevelUpdate);

            _fft_buffer = new byte[_controlInterface.FFTResolution];

            _smaTunedFrequecy           = new Simova(_SIMPLE_AVERAGE_SAMPLE_CNT, _SIMPLE_AVERAGE_MIN);
            _smaTunedBandwidth          = new Simova(_SIMPLE_AVERAGE_SAMPLE_CNT, _SIMPLE_AVERAGE_MIN);
            _smaTunedPeakPowerBandwidth = new Simova(_SIMPLE_AVERAGE_SAMPLE_CNT, _SIMPLE_AVERAGE_MIN);

            trackBar1.Value = 100;


            UpdateTimer          = new Timer();
            UpdateTimer.Interval = _UPDATE_TIMER_INTERVALL;
            UpdateTimer.Tick    += new EventHandler(UpdateTimer_Tick);


            MeasureTimer          = new Timer();
            MeasureTimer.Interval = _MEASURE_TIMER_INTERVALL;
            MeasureTimer.Tick    += new EventHandler(MeasureTimer_Tick);

            Init();
        }
        public LevelMeterPanel(ISharpControl control)
        {
            InitializeComponent();

            _controlInterface = control;

            ToolWin = new LevelMeterTool();
            ToolWin = new LevelMeterTool();
            ToolWin.Show();
            ToolWin.Visible = false;
            OnLevelUpdateEvent = new OnLevelUpdate(ToolWin.OnLevelUpdate);

            _fft_buffer = new byte[_controlInterface.FFTResolution];

               _smaTunedFrequecy = new Simova(_SIMPLE_AVERAGE_SAMPLE_CNT, _SIMPLE_AVERAGE_MIN);
               _smaTunedBandwidth = new Simova(_SIMPLE_AVERAGE_SAMPLE_CNT, _SIMPLE_AVERAGE_MIN);
               _smaTunedPeakPowerBandwidth  = new Simova(_SIMPLE_AVERAGE_SAMPLE_CNT, _SIMPLE_AVERAGE_MIN);

               trackBar1.Value = 100;

            UpdateTimer = new Timer();
            UpdateTimer.Interval = _UPDATE_TIMER_INTERVALL;
            UpdateTimer.Tick += new EventHandler(UpdateTimer_Tick);

            MeasureTimer = new Timer();
            MeasureTimer.Interval = _MEASURE_TIMER_INTERVALL;
            MeasureTimer.Tick += new EventHandler(MeasureTimer_Tick);

            Init();
        }
 void InitToolWindow()
 {
     _toolWin = new LevelMeterTool();
       _toolWin.Show();
       _toolWin.Visible = false;
       OnLevelUpdateEvent = new OnLevelUpdate(_toolWin.OnLevelUpdate);
 }