Esempio n. 1
0
        /// <summary>
        /// настраиваем технологический параметр
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tune_btn_Click(object sender, EventArgs e)
        {
            if (listView1.SelectedItems != null && listView1.SelectedItems.Count > 0)
            {
                TParameter sel_par = listView1.SelectedItems[0].Tag as TParameter;
                if (sel_par != null)
                {
                    SelectParameterForm frm = new SelectParameterForm();
                    if (frm.ShowDialog(this) == DialogResult.OK)
                    {
                        Parameter selected = frm.SelectedParameter;
                        if (selected != null)
                        {
                            if (selected.Channel != null)
                            {
                                sel_par.Identifier = selected.Identifier;
                                //sel_par.PNumber = selected.Channel.Number;

                                listView1.SelectedItems[0].SubItems[1].Text = selected.Name;
                            }
                            else
                            {
                                MessageBox.Show(this, "Выбранный параметр не настроен.", "Предупреждение",
                                                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                            }
                        }
                    }
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// настраиваем график
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            if (listViewGraphics.SelectedItems != null && listViewGraphics.SelectedItems.Count > 0)
            {
                VPanelGraphic sel_gr = listViewGraphics.SelectedItems[0].Tag as VPanelGraphic;
                if (sel_gr != null)
                {
                    SelectParameterForm frm = new SelectParameterForm();
                    if (frm.ShowDialog(this) == DialogResult.OK)
                    {
                        Parameter sel_par = frm.SelectedParameter;
                        if (sel_par != null)
                        {
                            sel_gr.Identifier  = sel_par.Identifier;
                            sel_gr.Description = sel_par.Description;

                            //sel_gr.Min = sel_par.Range.Min;
                            //sel_gr.Max = sel_par.Range.Max;

                            sel_gr.Units = sel_par.Units;

                            listViewGraphics.SelectedItems[0].SubItems[1].Text = sel_par.Name;
                        }
                    }
                }
            }
        }
Esempio n. 3
0
        /// <summary>
        /// изменяем параметр
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonEditParameter_Click(object sender, EventArgs e)
        {
            try
            {
                if (listView1.SelectedItems != null && listView1.SelectedItems.Count > 0)
                {
                    VPanelParameter sel_parameter = listView1.SelectedItems[0].Tag as VPanelParameter;
                    if (sel_parameter != null)
                    {
                        SelectParameterForm frm = new SelectParameterForm();
                        if (frm.ShowDialog(this) == DialogResult.OK)
                        {
                            Parameter sel_par = frm.SelectedParameter;
                            if (sel_par != null && sel_par.Channel != null)
                            {
                                //sel_parameter.PNumber = sel_par.Channel.Number;
                                sel_parameter.Identifier = sel_par.Identifier;

                                listView1.SelectedItems[0].SubItems[1].Text = sel_par.Name;
                            }
                        }
                    }
                }
            }
            catch { }
        }
Esempio n. 4
0
        /// <summary>
        /// добавляем новый цифровой параметр
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonNewParameter_Click(object sender, EventArgs e)
        {
            try
            {
                SelectParameterForm frm = new SelectParameterForm();
                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    Parameter sel_parameter = frm.SelectedParameter;
                    if (sel_parameter != null && sel_parameter.Channel != null)
                    {
                        VPanelParameter vp_parameter = new VPanelParameter();
                        //vp_parameter.PNumber = sel_parameter.Channel.Number;
                        vp_parameter.Identifier = sel_parameter.Identifier;
                        n_panel.Items.Add(vp_parameter);

                        InsertNumericParameter(vp_parameter);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.Message, "Ошибка",
                                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
Esempio n. 5
0
 /// <summary>
 /// усиление в ключе КМБ
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void button2_Click(object sender, EventArgs e)
 {
     SelectParameterForm frm = new SelectParameterForm();
     if (frm.ShowDialog(this) == DialogResult.OK)
     {
         Parameter sel_par = frm.SelectedParameter;
         if (sel_par != null)
         {
             textBox1.Text = sel_par.Name;
             _app.DrillingPanel.KMB.Identifier = sel_par.Identifier;
         }
     }
 }
Esempio n. 6
0
 /// <summary>
 /// плотность емкости отс2
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void button3_Click(object sender, EventArgs e)
 {
     SelectParameterForm frm = new SelectParameterForm();
     if (frm.ShowDialog(this) == DialogResult.OK)
     {
         Parameter sel_par = frm.SelectedParameter;
         if (sel_par != null)
         {
             textBoxOts2.Text = sel_par.Name;
             _app.SolutionPanel.PlEmkOts2.Identifier = sel_par.Identifier;
         }
     }
 }
Esempio n. 7
0
        /// <summary>
        /// усиление в ключе КМБ
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button2_Click(object sender, EventArgs e)
        {
            SelectParameterForm frm = new SelectParameterForm();

            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                Parameter sel_par = frm.SelectedParameter;
                if (sel_par != null)
                {
                    textBox1.Text = sel_par.Name;
                    _app.DrillingPanel.KMB.Identifier = sel_par.Identifier;
                }
            }
        }
Esempio n. 8
0
        /// <summary>
        /// температура на выходе
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button4_Click(object sender, EventArgs e)
        {
            SelectParameterForm frm = new SelectParameterForm();

            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                Parameter sel_par = frm.SelectedParameter;
                if (sel_par != null)
                {
                    textBoxTemVihod.Text = sel_par.Name;
                    _app.SolutionPanel.TempVihod.Identifier = sel_par.Identifier;
                }
            }
        }
Esempio n. 9
0
        /// <summary>
        /// настраиваем сброс объема
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonResetVes_Click(object sender, EventArgs e)
        {
            SelectParameterForm frm = new SelectParameterForm();

            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                Parameter channel = frm.SelectedParameter;
                if (channel != null)
                {
                    if (channel.Channel != null)
                    {
                        id_re = channel.Identifier;
                        //re = channel.Channel.Number;

                        textBoxResetVes.Text = channel.Name;
                    }
                }
            }
        }
Esempio n. 10
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonNewParameter_Click(object sender, EventArgs e)
        {
            try
            {
                SelectParameterForm frm = new SelectParameterForm();
                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    Parameter sel_parameter = frm.SelectedParameter;
                    if (sel_parameter != null && sel_parameter.Channel != null)
                    {
                        VPanelParameter vp_parameter = new VPanelParameter();
                        vp_parameter.Identifier = sel_parameter.Identifier;

                        area.Items.Add(vp_parameter);
                        InsertNumericParameter(vp_parameter);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.Message, "Ошибка",
                    MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
Esempio n. 11
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonEditParameter_Click(object sender, EventArgs e)
        {
            try
            {
                if (listView1.SelectedItems != null && listView1.SelectedItems.Count > 0)
                {
                    VPanelParameter sel_parameter = listView1.SelectedItems[0].Tag as VPanelParameter;
                    if (sel_parameter != null)
                    {
                        SelectParameterForm frm = new SelectParameterForm();
                        if (frm.ShowDialog(this) == DialogResult.OK)
                        {
                            Parameter sel_par = frm.SelectedParameter;
                            if (sel_par != null && sel_par.Channel != null)
                            {
                                sel_parameter.Identifier = sel_par.Identifier;

                                listView1.SelectedItems[0].SubItems[1].Text = sel_par.Name;
                                listView1.SelectedItems[0].SubItems[2].Text = string.Format("{0};{1} pt", sel_parameter.Font.Name, sel_parameter.Font.SizeInPoints);
                            }
                        }
                    }
                }
            }
            catch { }
        }
Esempio n. 12
0
        private void настроитьГрафикToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (listViewGraphics.SelectedItems != null && listViewGraphics.SelectedItems.Count > 0)
            {
                VPanelGraphic sel_gr = listViewGraphics.SelectedItems[0].Tag as VPanelGraphic;
                if (sel_gr != null)
                {
                    SelectParameterForm frm = new SelectParameterForm();
                    if (frm.ShowDialog(this) == DialogResult.OK)
                    {
                        Parameter sel_par = frm.SelectedParameter;
                        if (sel_par != null)
                        {
                            sel_gr.Identifier = sel_par.Identifier;
                            sel_gr.Description = sel_par.Description;

                            sel_gr.Units = sel_par.Units;
                            listViewGraphics.SelectedItems[0].SubItems[1].Text = sel_par.Name;
                        }
                    }
                }
            }
        }
Esempio n. 13
0
        /// <summary>
        /// настраиваем команду пульт бурильщика
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonPult_Click(object sender, EventArgs e)
        {
            SelectParameterForm frm = new SelectParameterForm();
            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                Parameter channel = frm.SelectedParameter;
                if (channel != null)
                {
                    if (channel.Channel != null)
                    {
                        id_dr = channel.Identifier;
                        //dr = channel.Channel.Number;

                        textBoxPult.Text = channel.Name;
                    }
                }
            }
        }
Esempio n. 14
0
        /// <summary>
        /// настраиваем технологический параметр
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tune_btn_Click(object sender, EventArgs e)
        {
            if (listView1.SelectedItems != null && listView1.SelectedItems.Count > 0)
            {
                TParameter sel_par = listView1.SelectedItems[0].Tag as TParameter;
                if (sel_par != null)
                {
                    SelectParameterForm frm = new SelectParameterForm();
                    if (frm.ShowDialog(this) == DialogResult.OK)
                    {
                        Parameter selected = frm.SelectedParameter;
                        if (selected != null)
                        {
                            if (selected.Channel != null)
                            {
                                sel_par.Identifier = selected.Identifier;
                                //sel_par.PNumber = selected.Channel.Number;

                                listView1.SelectedItems[0].SubItems[1].Text = selected.Name;
                            }
                            else
                                MessageBox.Show(this, "Выбранный параметр не настроен.", "Предупреждение",
                                    MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        }
                    }
                }
            }
        }
Esempio n. 15
0
        /// <summary>
        /// изменяем параметр
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonEditParameter_Click(object sender, EventArgs e)
        {
            try
            {
                if (listView1.SelectedItems != null && listView1.SelectedItems.Count > 0)
                {
                    VPanelParameter sel_parameter = listView1.SelectedItems[0].Tag as VPanelParameter;
                    if (sel_parameter != null)
                    {
                        SelectParameterForm frm = new SelectParameterForm();
                        if (frm.ShowDialog(this) == DialogResult.OK)
                        {
                            Parameter sel_par = frm.SelectedParameter;
                            if (sel_par != null && sel_par.Channel != null)
                            {
                                //sel_parameter.PNumber = sel_par.Channel.Number;
                                sel_parameter.Identifier = sel_par.Identifier;

                                listView1.SelectedItems[0].SubItems[1].Text = sel_par.Name;
                            }
                        }
                    }
                }
            }
            catch { }
        }
Esempio n. 16
0
        /// <summary>
        /// настроить технологический параметр
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button_tun_Click(object sender, EventArgs e)
        {
            if (listView1.SelectedItems != null && listView1.SelectedItems.Count > 0)
            {
                TParameter s_tpar = listView1.SelectedItems[0].Tag as TParameter;
                if (s_tpar != null && !s_tpar.IsSimple)
                {
                    SelectParameterForm frm = new SelectParameterForm();
                    if (frm.ShowDialog(this) == DialogResult.OK)
                    {
                        Parameter selected = frm.SelectedParameter;
                        if (selected != null)
                        {
                            if (selected.Channel != null)
                            {
                                //s_tpar.SNumber = selected.Channel.Number;
                                s_tpar.Identifier = selected.Identifier;

                                listView1.SelectedItems[0].SubItems[1].Text = selected.Name;
                            }
                        }
                    }
                }
                else
                {
                    MessageBox.Show(this, "Данный параметр не может быть настроен", "Предупреждение",
                        MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
            }
        }