Beispiel #1
0
        /// <summary>
        /// редактируем четвертый параметр
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonEditP4_Click(object sender, EventArgs e)
        {
            if (selectedPanel != null && selectedPanel.Parameter4.Parameter != null)
            {
                EditParameterPanelForm frm = new EditParameterPanelForm();
                if (selectedPanel.Parameter4.Parameter != null)
                {
                    frm.ParameterDescription = selectedPanel.Parameter4.Parameter.Name;

                    frm.ParameterMin = selectedPanel.Parameter4.Min;
                    frm.ParameterMax = selectedPanel.Parameter4.Max;

                    frm.ParameterColor = selectedPanel.Parameter4.Color;

                    if (frm.ShowDialog(this) == DialogResult.OK)
                    {
                        selectedPanel.Parameter4.Min = frm.ParameterMin;
                        selectedPanel.Parameter4.Max = frm.ParameterMax;

                        selectedPanel.Parameter4.Color = frm.ParameterColor;
                    }
                }
            }
            else
            {
                GraphicPanelParameter selPar = textBoxP4.Tag as GraphicPanelParameter;
                if (selPar != null && selPar.Parameter != null)
                {
                    EditParameterPanelForm frm = new EditParameterPanelForm();

                    frm.ParameterDescription = selPar.Parameter.Name;

                    frm.ParameterMin = selPar.Min;
                    frm.ParameterMax = selPar.Max;

                    frm.ParameterColor = selPar.Color;

                    if (frm.ShowDialog(this) == DialogResult.OK)
                    {
                        selPar.Min = frm.ParameterMin;
                        selPar.Max = frm.ParameterMax;

                        selPar.Color = frm.ParameterColor;
                    }
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// редактируем пятый параметр
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonEditP5_Click(object sender, EventArgs e)
        {
            if (selectedPanel != null && selectedPanel.Parameter5.Parameter != null)
            {
                EditParameterPanelForm frm = new EditParameterPanelForm();

                frm.ParameterDescription = selectedPanel.Parameter5.Parameter.Name;

                frm.ParameterMin = selectedPanel.Parameter5.Min;
                frm.ParameterMax = selectedPanel.Parameter5.Max;

                frm.ParameterColor = selectedPanel.Parameter5.Color;

                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    selectedPanel.Parameter5.Min = frm.ParameterMin;
                    selectedPanel.Parameter5.Max = frm.ParameterMax;

                    selectedPanel.Parameter5.Color = frm.ParameterColor;
                }
            }
            else
            {
                GraphicPanelParameter selPar = textBoxP5.Tag as GraphicPanelParameter;
                if (selPar != null && selPar.Parameter != null)
                {
                    EditParameterPanelForm frm = new EditParameterPanelForm();

                    frm.ParameterDescription = selPar.Parameter.Name;

                    frm.ParameterMin = selPar.Min;
                    frm.ParameterMax = selPar.Max;

                    frm.ParameterColor = selPar.Color;

                    if (frm.ShowDialog(this) == DialogResult.OK)
                    {
                        selPar.Min = frm.ParameterMin;
                        selPar.Max = frm.ParameterMax;

                        selPar.Color = frm.ParameterColor;
                    }
                }
            }
        }