Пример #1
0
        public SpectrumForm()
        {
            InitializeComponent();
            VisualisationMode    = "green";
            InputDataScaleFactor = 1;

            controlForm              = new ControlForm();
            GeneratedDataWidth       = 600;
            GeneratedDataHeightDepth = 768;


            Data_init();
            tmr_DataGenerating.Stop();
            //timer1.Start();
        }
Пример #2
0
        public mainForm()
        {
            InitializeComponent();
            serialCom    = new ByteArrayCom();
            graphForm    = new GraphForm();
            loadDataForm = new LoadDataForm();
            spectrumForm = new SpectrumForm();
            controlForm  = new ControlForm();
            filterClass  = new FilterClass();


            spectrumForm.addDataToGraphFormControl += new GeoradarGui.SpectrumForm.AddDataToGraphFormControl(AddGraphToSpectrum);
            spectrumForm.DockStateChanged          += new EventHandler(dockState_Changed);

            serialCom.startDataProcessing += new GeoradarGui.ByteArrayCom.StartDataProcessing(startDataProcessing);

            // Data-Read button handler from Graphform:
            graphForm.DockStateChanged += new EventHandler(dockState_Changed);

            loadDataForm.DockStateChanged       += new EventHandler(dockState_Changed);
            loadDataForm.loadDataToTextBoxEvent += new GeoradarGui.LoadDataForm.LoadDataToTextBoxDelegat(writeDataToGraph);

            controlForm.controlSendPacketToBoard += new GeoradarGui.ControlForm.ControlSendPacketToBoard(sendPacketToBoard);

            controlForm.updateControlVariables += new GeoradarGui.ControlForm.UpdateControlVariables(updateControlVariables);
            controlForm.savePictureToFile      += new GeoradarGui.ControlForm.SavePictureToFile(saveSpectrumPictureToFile);
            controlForm.DockStateChanged       += new EventHandler(dockState_Changed);

            // Create read data one time timer :
            threadTimerReadData          = new System.Timers.Timer(Constants.readDataRate);
            threadTimerReadData.Elapsed += threadTimerReadData_Tick;

            /* Update controls based on the app's current state.*/
            UpdateControls(true);
            updateControlVariables();
        }