Example #1
0
        /// <summary>
        /// определяем первый параметр
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonP1_Click(object sender, EventArgs e)
        {
            ParametersListForm frm = new ParametersListForm();

            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                Parameter selected = frm.SelectedParameter;
                if (selected != null)
                {
                    if (selectedPanel != null)
                    {
                        selectedPanel.Parameter1.Parameter = selected;
                    }
                    else
                    {
                        GraphicPanelParameter par = new GraphicPanelParameter(selected);

                        textBoxP1.Text = selected.Name;
                        textBoxP1.Tag  = par;
                    }

                    ShowSelectedPanel();
                }
            }
        }
Example #2
0
        /// <summary>
        /// определяем плотность
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonTechDensity_Click(object sender, EventArgs e)
        {
            ParametersListForm frm = new ParametersListForm();
            if (frm.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
            {
                Parameter parameter = frm.SelectedParameter;
                if (parameter != null)
                {
                    textBoxTechDensity.Text = parameter.Name;
                    _app.Commutator.Technology.Density.Index = parameter.SelfIndex;

                    _app.Graphic_density.Description = parameter.Description;
                }
            }
        }
Example #3
0
        /// <summary>
        /// определяем плотность
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonTechDensity_Click(object sender, EventArgs e)
        {
            ParametersListForm frm = new ParametersListForm();

            if (frm.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
            {
                Parameter parameter = frm.SelectedParameter;
                if (parameter != null)
                {
                    textBoxTechDensity.Text = parameter.Name;
                    _app.Commutator.Technology.Density.Index = parameter.SelfIndex;

                    _app.Graphic_density.Description = parameter.Description;
                }
            }
        }
Example #4
0
        /// <summary>
        /// определяем температуру
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonTechTemperature_Click(object sender, EventArgs e)
        {
            ParametersListForm frm = new ParametersListForm();

            if (frm.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
            {
                Parameter parameter = frm.SelectedParameter;
                if (parameter != null)
                {
                    textBoxTechTemperature.Text = parameter.Name;
                    _app.Commutator.Technology.Temperature.Index = parameter.SelfIndex;

                    _app.Graphic_temperature.Description = parameter.Description;
                    _app.Graphic_temperature.Units       = string.Format("[{0}]", parameter.Units);
                }
            }
        }
Example #5
0
        /// <summary>
        /// настраиваем объем первого расходомера
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonSetVolume_Click(object sender, EventArgs e)
        {
            int rgr_ind = tabControl1.SelectedIndex;

            if (rgr_ind > -1 && rgr_ind < _app.Commutator.Technology.Rgrs.Count)
            {
                ParametersListForm frm = new ParametersListForm();
                if (frm.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
                {
                    Parameter parameter = frm.SelectedParameter;
                    if (parameter != null)
                    {
                        SetVolume(parameter.Name, rgr_ind);
                        _app.Commutator.Technology.Rgrs[rgr_ind].Volume.Index = parameter.SelfIndex;
                    }
                }
            }
        }
Example #6
0
 /// <summary>
 /// настраиваем объем первого расходомера
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void buttonSetVolume_Click(object sender, EventArgs e)
 {
     int rgr_ind = tabControl1.SelectedIndex;
     if (rgr_ind > -1 && rgr_ind < _app.Commutator.Technology.Rgrs.Count)
     {
         ParametersListForm frm = new ParametersListForm();
         if (frm.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
         {
             Parameter parameter = frm.SelectedParameter;
             if (parameter != null)
             {
                 SetVolume(parameter.Name, rgr_ind);
                 _app.Commutator.Technology.Rgrs[rgr_ind].Volume.Index = parameter.SelfIndex;
             }
         }
     }
 }
Example #7
0
        /// <summary>
        /// определяем температуру
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonTechTemperature_Click(object sender, EventArgs e)
        {
            ParametersListForm frm = new ParametersListForm();
            if (frm.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
            {
                Parameter parameter = frm.SelectedParameter;
                if (parameter != null)
                {
                    textBoxTechTemperature.Text = parameter.Name;
                    _app.Commutator.Technology.Temperature.Index = parameter.SelfIndex;

                    _app.Graphic_temperature.Description = parameter.Description;
                    _app.Graphic_temperature.Units = string.Format("[{0}]", parameter.Units);
                }
            }
        }
Example #8
0
        /// <summary>
        /// определяем пятый параметр
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonP5_Click(object sender, EventArgs e)
        {
            ParametersListForm frm = new ParametersListForm();
            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                Parameter selected = frm.SelectedParameter;
                if (selected != null)
                {
                    if (selectedPanel != null)
                    {
                        selectedPanel.Parameter5.Parameter = selected;
                    }
                    else
                    {
                        GraphicPanelParameter par = new GraphicPanelParameter(selected);
                        textBoxP5.Text = selected.Name;
                        textBoxP5.Tag = par;
                    }

                    ShowSelectedPanel();
                }
            }
        }