コード例 #1
0
        /// <summary>
        /// Настройка внешнего вида формы в соответствии с параметрами конфигурации
        /// </summary>
        private void SetImageForm()
        {
            int top = this.checkBox1.Top;

            for (int j = 0; j < this.boxArray.Length; j++)
            {
                if (par.isValidBO(j + 1))
                {
                    this.boxArray[j].Location = new Point(this.boxArray[j].Location.X, top);
                    top = top + ParametrConstants.TopStep;
                    this.boxArray[j].Text    = par.getNameBO(j + 1);
                    this.boxArray[j].Checked = par.getFlagBO(j + 1);
                    this.boxArray[j].Visible = true;
                    this.boxArray[j].Enabled = true;
                }
                else
                {
                    this.boxArray[j].Text    = ParametrConstants.NoValidBO;
                    this.boxArray[j].Checked = false;
                    this.boxArray[j].Visible = false;
                    this.boxArray[j].Enabled = false;
                }
            }
            if (top < (this.button4.Location.Y + this.button4.Size.Height))
            {
                top = (this.button4.Location.Y + this.button4.Size.Height + ParametrConstants.TopStep2);
            }
            top = top + ParametrConstants.TopStep + this.button3.Size.Height + ParametrConstants.TopStep;

            this.Size = new Size(this.Size.Width, top);
        }
コード例 #2
0
ファイル: Form2.cs プロジェクト: slawer/service
        /// <summary>
        /// Конструктор
        /// </summary>
        /// <param name="parameters">Параметры настройки программы</param>
        public Form2(SetTimeParameters parameters)
        {
            int j;

            InitializeComponent();
            par = parameters;
            j = par.getAdrBO(1);
            textBox1.Text = j.ToString();
            j = par.getAdrBO(2);
            textBox2.Text = j.ToString();
            j = par.getAdrBO(3);
            textBox3.Text = j.ToString();
            j = par.getAdrBO(4);
            textBox4.Text = j.ToString();
            j = par.getAdrBO(5);
            textBox5.Text = j.ToString();
            j = par.getAdrBO(6);
            textBox6.Text = j.ToString();
            j = par.getAdrBO(7);
            textBox7.Text = j.ToString();

            textBox8.Text = par.getNameBO(1);
            textBox9.Text = par.getNameBO(2);
            textBox10.Text = par.getNameBO(3);
            textBox11.Text = par.getNameBO(4);
            textBox12.Text = par.getNameBO(5);
            textBox13.Text = par.getNameBO(6);
            textBox14.Text = par.getNameBO(7);

            checkBox1.Checked = par.OldFormatCMD;
            checkBox2.Checked = par.ResetBOAfterSet;

            par.CodeExit = false;
        }
コード例 #3
0
ファイル: Form2.cs プロジェクト: slawer/service
        /// <summary>
        /// Конструктор
        /// </summary>
        /// <param name="parameters">Параметры настройки программы</param>
        public Form2(SetTimeParameters parameters)
        {
            int j;

            InitializeComponent();
            par           = parameters;
            j             = par.getAdrBO(1);
            textBox1.Text = j.ToString();
            j             = par.getAdrBO(2);
            textBox2.Text = j.ToString();
            j             = par.getAdrBO(3);
            textBox3.Text = j.ToString();
            j             = par.getAdrBO(4);
            textBox4.Text = j.ToString();
            j             = par.getAdrBO(5);
            textBox5.Text = j.ToString();
            j             = par.getAdrBO(6);
            textBox6.Text = j.ToString();
            j             = par.getAdrBO(7);
            textBox7.Text = j.ToString();

            textBox8.Text  = par.getNameBO(1);
            textBox9.Text  = par.getNameBO(2);
            textBox10.Text = par.getNameBO(3);
            textBox11.Text = par.getNameBO(4);
            textBox12.Text = par.getNameBO(5);
            textBox13.Text = par.getNameBO(6);
            textBox14.Text = par.getNameBO(7);

            checkBox1.Checked = par.OldFormatCMD;
            checkBox2.Checked = par.ResetBOAfterSet;

            par.CodeExit = false;
        }