Forex_Strategy_Builder.Account_Settings.Account_Settings C# (CSharp) Метод

Account_Settings() публичный Метод

Constructor
public Account_Settings ( ) : System
Результат System
        public Account_Settings()
        {
            pnlBase = new Fancy_Panel();

            lblAccountCurrency  = new Label();
            lblInitialAccount   = new Label();
            lblLeverage         = new Label();
            lblExchangeRate     = new Label();
            lblExchangeRateInfo = new Label();

            cbxAccountCurrency = new ComboBox();
            nudInitialAccount  = new NumericUpDown();
            cbxLeverage        = new ComboBox();
            nudExchangeRate    = new NumericUpDown();
            tbxExchangeRate    = new TextBox();

            btnDefault = new Button();
            btnCancel  = new Button();
            btnAccept  = new Button();

            font      = this.Font;
            colorText = LayoutColors.ColorControlText;

            MaximizeBox     = false;
            MinimizeBox     = false;
            ShowInTaskbar   = false;
            Icon            = Data.Icon;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            AcceptButton    = btnAccept;
            Text            = Language.T("Account Settings");

            // pnlBase
            pnlBase.Parent = this;

            // Label Account Currency
            lblAccountCurrency.Parent    = pnlBase;
            lblAccountCurrency.ForeColor = colorText;
            lblAccountCurrency.BackColor = Color.Transparent;
            lblAccountCurrency.Text      = Language.T("Account currency");
            lblAccountCurrency.AutoSize  = true;

            // Label Initial Account
            lblInitialAccount.Parent    = pnlBase;
            lblInitialAccount.ForeColor = colorText;
            lblInitialAccount.BackColor = Color.Transparent;
            lblInitialAccount.Text      = Language.T("Initial account");
            lblInitialAccount.AutoSize  = true;

            // Label Leverage
            lblLeverage.Parent    = pnlBase;
            lblLeverage.ForeColor = colorText;
            lblLeverage.BackColor = Color.Transparent;
            lblLeverage.Text      = Language.T("Leverage");
            lblLeverage.AutoSize  = true;

            // Label Exchange Rate
            lblExchangeRate.Parent    = pnlBase;
            lblExchangeRate.ForeColor = colorText;
            lblExchangeRate.BackColor = Color.Transparent;
            lblExchangeRate.Text      = Language.T("Account exchange rate");
            lblExchangeRate.AutoSize  = true;

            // Label Exchange Rate Info
            lblExchangeRateInfo.Parent    = pnlBase;
            lblExchangeRateInfo.ForeColor = colorText;
            lblExchangeRateInfo.BackColor = Color.Transparent;
            lblExchangeRateInfo.Text      =
                Language.T("Forex Strategy Builder uses the account exchange rate to calculate the trading statistics in your account currency.") + " " +
                Language.T("When your account currency does not take part in the trading couple the account exchange rate is a fixed figure.");

            // ComboBox Account Currency
            cbxAccountCurrency.Parent = pnlBase;
            cbxAccountCurrency.Name   = "cbxAccountCurrency";
            cbxAccountCurrency.DropDownStyle = ComboBoxStyle.DropDownList;
            cbxAccountCurrency.Items.AddRange(new string[] { "USD", "EUR" });
            cbxAccountCurrency.SelectedIndex = 0;

            // NumericUpDown Initial Account
            nudInitialAccount.Parent    = pnlBase;
            nudInitialAccount.Name      = "nudInitialAccount";
            nudInitialAccount.BeginInit();
            nudInitialAccount.Minimum   = 100;
            nudInitialAccount.Maximum   = 100000;
            nudInitialAccount.Increment = 1000;
            nudInitialAccount.Value     = initialAccount;
            nudInitialAccount.EndInit();

            // ComboBox Leverage
            cbxLeverage.Parent        = pnlBase;
            cbxLeverage.Name          = "cbxLeverage";
            cbxLeverage.DropDownStyle = ComboBoxStyle.DropDownList;
            cbxLeverage.Items.AddRange(new string[] { "1/1", "1/10", "1/20", "1/30", "1/50", "1/100", "1/200", "1/300", "1/400", "1/500" });
            cbxLeverage.SelectedIndex = 5;

            // tbxExchangeRate
            tbxExchangeRate.Parent    = pnlBase;
            tbxExchangeRate.BackColor = LayoutColors.ColorControlBack;
            tbxExchangeRate.ForeColor = colorText;
            tbxExchangeRate.ReadOnly  = true;
            tbxExchangeRate.Visible   = false;
            tbxExchangeRate.Text      = Language.T("Deal price");

            // NumericUpDown Exchange Rate
            nudExchangeRate.BeginInit();
            nudExchangeRate.Parent        = pnlBase;
            nudExchangeRate.Name          = "nudExchangeRate";
            nudExchangeRate.Minimum       = 0;
            nudExchangeRate.Maximum       = 100000;
            nudExchangeRate.Increment     = 0.0001M;
            nudExchangeRate.DecimalPlaces = 4;
            nudExchangeRate.Value         = 1;
            nudExchangeRate.EndInit();

            //Button Default
            btnDefault.Parent = this;
            btnDefault.Name   = "Default";
            btnDefault.Text   = Language.T("Default");
            btnDefault.Click += new EventHandler(BtnDefault_Click);
            btnDefault.UseVisualStyleBackColor = true;

            //Button Cancel
            btnCancel.Parent       = this;
            btnCancel.Text         = Language.T("Cancel");
            btnCancel.DialogResult = DialogResult.Cancel;
            btnCancel.UseVisualStyleBackColor = true;

            //Button Accept
            btnAccept.Parent       = this;
            btnAccept.Name         = "Accept";
            btnAccept.Text         = Language.T("Accept");
            btnAccept.DialogResult = DialogResult.OK;
            btnAccept.UseVisualStyleBackColor = true;
        }