Пример #1
0
        private void menuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NoveMeranieWindow noveMeranieWindow = new NoveMeranieWindow();
            DialogResult res = noveMeranieWindow.ShowDialog();
            if (res == DialogResult.OK)
            {
                sidebar.Enabled = true;
                stopButton.Enabled = true;
                stopAfterCycle.Enabled = true;
                menuToolStripMenuItem.Enabled = false;
                //hodnota setMerania.parametreMerania obsahuje instanciu triedy measurementsparameters
                //ktora obsahuje vsetky informacie na zacatie merania.
                MeasurementControl = new MeasurementControl(noveMeranieWindow.parametreMerania, this);
                MeasurementControl.Graf = bufferedChart;
                estTimeLabel.Text = DateTime.Now.AddSeconds(noveMeranieWindow.parametreMerania.StepTime * noveMeranieWindow.parametreMerania.NumberOfCycles * noveMeranieWindow.parametreMerania.NumberOfSteps).ToString("hh:mm tt");
                //energyScanStepTimeLabel.Text = noveMeranieWindow.parametreMerania.EnergyScan.StepTime.ToString();
                resolutionLabel.Text = noveMeranieWindow.parametreMerania.Resolution.ToString();
                MeasurementControl.start();

                //bufferedChart.setParameters(setmerania.parametreMerania.StartPoint,
                //    setmerania.parametreMerania.EndPoint,
                //    setmerania.parametreMerania.PocetBodov,
                //    setmerania.parametreMerania.PocetCyklov);
                //bufferedChart.init();

            }
        }