Esempio n. 1
0
        private void tmsiFreq_Click(object sender, EventArgs e)
        {
            PointsEdit frmPointsEdit = new PointsEdit();

            frmPointsEdit.Set("Частота", "МГц");
            float freq = 0;

            if (frmPointsEdit.ShowDialog() == DialogResult.OK)
            {
                float.TryParse(frmPointsEdit.Value, out freq);
                MeasConfigurator.EditPoint(DGV.SelectedRows[0].Index,
                                           (long)Converter.Transform(freq, UnitsFrequency.MHz, UnitsFrequency.Hz), int.MaxValue,
                                           int.MaxValue, InstrBands.Null);
            }

            SetDGV(MeasConfigurator.GetTable());
        }
Esempio n. 2
0
        private void ToolStripMenuItem_SetNewAmpl_Click(object sender, EventArgs e)
        {
            PointsEdit frmPointEdit = new PointsEdit();

            frmPointEdit.Set("Амплитуда", "dBm");
            int ampl = 0;

            if (frmPointEdit.ShowDialog() == DialogResult.OK)
            {
                int.TryParse(frmPointEdit.Value, out ampl);
                foreach (DataGridViewRow row in DGV.SelectedRows)
                {
                    MeasConfigurator.EditPoint(row.Index, long.MaxValue, ampl, int.MaxValue, InstrBands.Null);
                }
            }

            SetDGV(MeasConfigurator.GetTable());
        }
Esempio n. 3
0
        private void ToolStripMenuItem_SetNewTime_Click(object sender, EventArgs e)
        {
            PointsEdit frmPointEdit = new PointsEdit();

            frmPointEdit.Set("Время измерения", "с");
            int   val  = 1;
            float fval = 1;

            if (frmPointEdit.ShowDialog() == DialogResult.OK)
            {
                float.TryParse(frmPointEdit.Value, out fval);
                val = (int)(fval * 1000);
                foreach (var index in GetSelectedRows())
                {
                    MeasConfigurator.EditPoint(index, long.MaxValue, int.MaxValue, val, InstrBands.Null);
                }
            }
            SetDGV(MeasConfigurator.GetTable());
        }