Beispiel #1
0
        /// <summary>
        /// Выбрать калибруемый параметр
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void selectParameter_Click(object sender, EventArgs e)
        {
            ResultsForm r_frm = new ResultsForm(app);

            if (_parameter != null)
            {
                r_frm.Position = _parameter.Identifier;
            }

            if (r_frm.ShowDialog(this) == DialogResult.OK)
            {
                textBoxSelectedParameter.Tag  = r_frm.SelectedParameter;
                textBoxSelectedParameter.Text = r_frm.SelectedParameter.Name;

                _parameter = r_frm.SelectedParameter;
                checkBoxDoScale.Checked = false;

                transformation.Clear();
                foreach (Transformation.TCondition val in _parameter.Transformation.Table)
                {
                    Transformation.TCondition _v = new Transformation.TCondition();

                    _v.Multy  = val.Multy;
                    _v.Result = val.Result;

                    _v.Shift  = val.Shift;
                    _v.Signal = val.Signal;

                    transformation.Insert(_v);
                }
                //transformation.Arg[0].Index = first.Index;
            }
        }
Beispiel #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            try
            {
                transformation.Clear();

                Transformation.TCondition t1 = new Transformation.TCondition();
                Transformation.TCondition t2 = new Transformation.TCondition();

                t1.Result = 0;
                t1.Signal = 0;

                t2.Result = 65535;
                t2.Signal = 65535;

                transformation.Insert(t1);
                transformation.Insert(t2);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }