BeginInit() public méthode

public BeginInit ( ) : void
Résultat void
		public void Maximum ()
		{
			Form f = new Form ();
			NumericUpDown nud = new NumericUpDown ();
			nud.BeginInit ();
			nud.Value = 1000;
			nud.Minimum = 2;
			nud.Maximum = 4;
			nud.EndInit ();
			f.Controls.Add (nud);
			f.Show ();

			Assert.AreEqual (4, nud.Value, "#A1");
			nud.Maximum = 3;
			Assert.AreEqual (3, nud.Value, "#A2");
			f.Dispose ();
		}
        /// <summary>
        /// Constructor
        /// </summary>
        public Optimizer()
        {
            pnlParamsBase     = new Panel();
            pnlParamsBase2    = new Panel();
            pnlCaptions       = new Panel();
            pnlParams         = new Panel();
            pnlLimitations    = new Fancy_Panel(Language.T("Limitations"));
            scrollBar         = new VScrollBar();
            smallBalanceChart = new Small_Balance_Chart();
            progressBar       = new ProgressBar();
            btnOptimize       = new Button();
            btnAccept         = new Button();
            btnCancel         = new Button();

            btnShowLimitations = new Button();
            btnShowSettings    = new Button();

            font          = this.Font;
            fontIndicator = new Font(Font.FontFamily, 11);
            colorText     = LayoutColors.ColorControlText;

            MaximizeBox     = false;
            MinimizeBox     = false;
            ShowInTaskbar   = false;
            Icon            = Data.Icon;
            BackColor       = LayoutColors.ColorFormBack;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            AcceptButton    = btnAccept;
            CancelButton    = btnCancel;
            Text            = Language.T("Optimizer");
            FormClosing    += new FormClosingEventHandler(Optimizer_FormClosing);

            // pnlParamsBase
            pnlParamsBase.Parent    = this;
            pnlParamsBase.BackColor = LayoutColors.ColorControlBack;
            pnlParamsBase.Paint    += new PaintEventHandler(PnlParamsBase_Paint);

            // pnlCaptions
            pnlCaptions.Parent    = pnlParamsBase;
            pnlCaptions.Dock      = DockStyle.Top;
            pnlCaptions.BackColor = LayoutColors.ColorCaptionBack;
            pnlCaptions.ForeColor = LayoutColors.ColorCaptionText;
            pnlCaptions.Paint    += new PaintEventHandler(PnlCaptions_Paint);

            // pnlParamsBase2
            pnlParamsBase2.Parent    = pnlParamsBase;
            pnlParamsBase2.BackColor = LayoutColors.ColorControlBack;
            pnlParamsBase2.Resize   += new EventHandler(PnlParamsBase2_Resize);

            // VScrollBar
            scrollBar.Parent        = pnlParamsBase2;
            scrollBar.Dock          = DockStyle.Right;
            scrollBar.TabStop       = true;
            scrollBar.ValueChanged += new EventHandler(ScrollBar_ValueChanged);
            scrollBar.MouseWheel   += new MouseEventHandler(ScrollBar_MouseWheel);

            // pnlParams
            pnlParams.Parent    = pnlParamsBase2;
            pnlParams.BackColor = LayoutColors.ColorControlBack;

            // Panel Limitations
            pnlLimitations.Parent  = this;
            pnlLimitations.Visible = false;

            // smallBalanceChart
            smallBalanceChart.Parent    = this;
            smallBalanceChart.BackColor = LayoutColors.ColorControlBack;

            // ProgressBar
            progressBar.Parent  = this;
            progressBar.Minimum = 1;
            progressBar.Maximum = 100;
            progressBar.Step    = 1;

            //Button Optimize
            btnOptimize.Parent   = this;
            btnOptimize.Name     = "btnOptimize";
            btnOptimize.Text     = Language.T("Optimize");
            btnOptimize.TabIndex = 0;
            btnOptimize.Click   += new EventHandler(BtnOptimize_Click);
            btnOptimize.UseVisualStyleBackColor = true;

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

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

            chbOutOfSample = new CheckBox();
            chbOutOfSample.Parent    = this;
            chbOutOfSample.ForeColor = colorText;
            chbOutOfSample.BackColor = Color.Transparent;
            chbOutOfSample.Text      = Language.T("OOS");
            chbOutOfSample.Checked   = false;
            chbOutOfSample.AutoSize  = true;
            chbOutOfSample.CheckedChanged += new EventHandler(ChbOutOfSample_CheckedChanged);

            nudOutOfSample = new NumericUpDown();
            nudOutOfSample.Parent    = this;
            nudOutOfSample.TextAlign = HorizontalAlignment.Center;
            nudOutOfSample.BeginInit();
            nudOutOfSample.Minimum   = 10;
            nudOutOfSample.Maximum   = 60;
            nudOutOfSample.Increment = 1;
            nudOutOfSample.Value     = 30;
            nudOutOfSample.EndInit();
            nudOutOfSample.ValueChanged += new EventHandler(NudOutOfSample_ValueChanged);

            // BackGroundWorker
            bgWorker = new BackgroundWorker();
            bgWorker.WorkerReportsProgress      = true;
            bgWorker.WorkerSupportsCancellation = true;
            bgWorker.DoWork             += new DoWorkEventHandler(BgWorker_DoWork);
            bgWorker.ProgressChanged    += new ProgressChangedEventHandler(BgWorker_ProgressChanged);
            bgWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(BgWorker_RunWorkerCompleted);

            isOptimizing = false;
            SetPanelLimitations();

            return;
        }
        /// <summary>
        /// Constructor
        /// </summary>
        public JForexImport()
        {
            LblIntro = new Label();
            TxbDataDirectory = new TextBox();
            BtnBrowse = new Button();
            PnlSettings = new FancyPanel();
            PnlInfoBase = new FancyPanel(Language.T("Imported Files"));
            TbxInfo = new TextBox();
            BtnHelp = new Button();
            BtnClose = new Button();
            BtnImport = new Button();
            ProgressBar = new ProgressBar();

            LblMarketClose = new Label();
            LblMarketOpen = new Label();
            NUDMarketClose = new NumericUpDown();
            NUDMarketOpen = new NumericUpDown();

            _colorText = LayoutColors.ColorControlText;

            MaximizeBox = false;
            MinimizeBox = false;
            ShowInTaskbar = false;
            Icon = Data.Icon;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            AcceptButton = BtnImport;
            CancelButton = BtnClose;
            Text = Language.T("JForex Import");

            // Label Intro
            LblIntro.Parent = PnlSettings;
            LblIntro.ForeColor = _colorText;
            LblIntro.BackColor = Color.Transparent;
            LblIntro.AutoSize = true;
            LblIntro.Text = Language.T("Directory containing JForex data files:");

            // Data Directory
            TxbDataDirectory.Parent = PnlSettings;
            TxbDataDirectory.BackColor = LayoutColors.ColorControlBack;
            TxbDataDirectory.ForeColor = _colorText;
            TxbDataDirectory.Text = Configs.JForexDataPath;

            // Button Browse
            BtnBrowse.Parent = PnlSettings;
            BtnBrowse.Name = "Browse";
            BtnBrowse.Text = Language.T("Browse");
            BtnBrowse.Click += BtnBrowseClick;
            BtnBrowse.UseVisualStyleBackColor = true;

            // Label Market Close
            LblMarketClose.Parent = PnlSettings;
            LblMarketClose.ForeColor = _colorText;
            LblMarketClose.BackColor = Color.Transparent;
            LblMarketClose.AutoSize = true;
            LblMarketClose.Text = Language.T("Market closing hour on Friday:");

            // Label Market Open
            LblMarketOpen.Parent = PnlSettings;
            LblMarketOpen.ForeColor = _colorText;
            LblMarketOpen.BackColor = Color.Transparent;
            LblMarketOpen.AutoSize = true;
            LblMarketOpen.Text = Language.T("Market opening hour on Sunday:");

            // NUDMarketClose
            NUDMarketClose.BeginInit();
            NUDMarketClose.Parent = PnlSettings;
            NUDMarketClose.TextAlign = HorizontalAlignment.Center;
            NUDMarketClose.Minimum = 0;
            NUDMarketClose.Maximum = 24;
            NUDMarketClose.Increment = 1;
            NUDMarketClose.Value = Configs.MarketClosingHour;
            NUDMarketClose.EndInit();

            // NUDMarketOpen
            NUDMarketOpen.BeginInit();
            NUDMarketOpen.Parent = PnlSettings;
            NUDMarketOpen.TextAlign = HorizontalAlignment.Center;
            NUDMarketOpen.Minimum = 0;
            NUDMarketOpen.Maximum = 24;
            NUDMarketOpen.Increment = 1;
            NUDMarketOpen.Value = Configs.MarketOpeningHour;
            NUDMarketOpen.EndInit();

            // pnlSettings
            PnlSettings.Parent = this;

            // PnlInfoBase
            PnlInfoBase.Parent = this;
            PnlInfoBase.Padding = new Padding(4, (int) PnlInfoBase.CaptionHeight, 2, 2);

            // TbxInfo
            TbxInfo.Parent = PnlInfoBase;
            TbxInfo.BorderStyle = BorderStyle.None;
            TbxInfo.Dock = DockStyle.Fill;
            TbxInfo.BackColor = LayoutColors.ColorControlBack;
            TbxInfo.ForeColor = LayoutColors.ColorControlText;
            TbxInfo.Multiline = true;
            TbxInfo.AcceptsReturn = true;
            TbxInfo.AcceptsTab = true;
            TbxInfo.ScrollBars = ScrollBars.Vertical;

            // ProgressBar
            ProgressBar.Parent = this;

            // Button Help
            BtnHelp.Parent = this;
            BtnHelp.Name = "Help";
            BtnHelp.Text = Language.T("Help");
            BtnHelp.Click += BtnHelpClick;
            BtnHelp.UseVisualStyleBackColor = true;

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

            // Button Import
            BtnImport.Parent = this;
            BtnImport.Name = "Import";
            BtnImport.Text = Language.T("Import");
            BtnImport.Click += BtnImportClick;
            BtnImport.UseVisualStyleBackColor = true;

            // BackGroundWorker
            _bgWorker = new BackgroundWorker {WorkerReportsProgress = true, WorkerSupportsCancellation = true};
            _bgWorker.DoWork += BgWorkerDoWork;
            _bgWorker.RunWorkerCompleted += BgWorkerRunWorkerCompleted;
        }
        /// <summary>
        ///     Sets controls in panel Settings
        /// </summary>
        private void SetPanelSettings()
        {
            //chbWorkingMinutes
            chbWorkingMinutes.Parent = pnlSettings;
            chbWorkingMinutes.Text = Language.T("Working time limit in minutes");
            chbWorkingMinutes.AutoSize = true;
            chbWorkingMinutes.Checked = true;
            chbWorkingMinutes.ForeColor = LayoutColors.ColorControlText;
            chbWorkingMinutes.BackColor = Color.Transparent;

            // numUpDownWorkingTime
            nudWorkingMinutes.Parent = pnlSettings;
            nudWorkingMinutes.Value = 5;
            nudWorkingMinutes.Minimum = 1;
            nudWorkingMinutes.Maximum = 10000;
            nudWorkingMinutes.TextAlign = HorizontalAlignment.Center;

            // chbGenerateNewStrategy
            chbGenerateNewStrategy.Parent = pnlSettings;
            chbGenerateNewStrategy.Text = Language.T("Generate from zero profit at every start");
            chbGenerateNewStrategy.AutoSize = true;
            chbGenerateNewStrategy.Checked = true;
            chbGenerateNewStrategy.ForeColor = LayoutColors.ColorControlText;
            chbGenerateNewStrategy.BackColor = Color.Transparent;

            // chbPseudoOpt
            chbInitialOptimization.Parent = pnlSettings;
            chbInitialOptimization.Text = Language.T("Perform an initial optimization");
            chbInitialOptimization.AutoSize = true;
            chbInitialOptimization.Checked = true;
            chbInitialOptimization.ForeColor = LayoutColors.ColorControlText;
            chbInitialOptimization.BackColor = Color.Transparent;

            chbOutOfSample = new CheckBox
                {
                    Parent = pnlSettings,
                    ForeColor = colorText,
                    BackColor = Color.Transparent,
                    Text = Language.T("Out of sample testing, percent of OOS bars"),
                    Checked = false,
                    AutoSize = true
                };
            chbOutOfSample.CheckedChanged += ChbOutOfSampleCheckedChanged;

            nudOutOfSample = new NumericUpDown {Parent = pnlSettings, TextAlign = HorizontalAlignment.Center};
            nudOutOfSample.BeginInit();
            nudOutOfSample.Minimum = 10;
            nudOutOfSample.Maximum = 60;
            nudOutOfSample.Increment = 1;
            nudOutOfSample.Value = 30;
            nudOutOfSample.EndInit();
            nudOutOfSample.ValueChanged += NudOutOfSampleValueChanged;

            chbUseDefaultIndicatorValues = new CheckBox
                {
                    Parent = pnlSettings,
                    ForeColor = colorText,
                    BackColor = Color.Transparent,
                    Text = Language.T("Only use default numeric indicator values"),
                    Checked = false,
                    AutoSize = true
                };

            chbSaveStrategySlotStatus = new CheckBox
                {
                    Parent = pnlSettings,
                    ForeColor = colorText,
                    BackColor = Color.Transparent,
                    Text = Language.T("Save strategy slots Lock status"),
                    Checked = false,
                    AutoSize = true
                };

            chbHideFsb = new CheckBox
                {
                    Parent = pnlSettings,
                    ForeColor = colorText,
                    BackColor = Color.Transparent,
                    Text = Language.T("Hide FSB when Generator starts"),
                    Checked = true,
                    AutoSize = true,
                    Cursor = Cursors.Default
                };

            btnReset = new Button
                {
                    Parent = pnlSettings,
                    UseVisualStyleBackColor = true,
                    Text = Language.T("Reset all parameters and settings")
                };
            btnReset.Click += BtnResetClick;
        }
        /// <summary>
        /// Constructor
        /// </summary>
        public StrategyProperties()
        {
            PermanentTP = 100;
            PermanentTPType = PermanentProtectionType.Relative;
            UsePermanentTP = false;
            BreakEven = 100;
            UseBreakEven = false;
            PermanentSL = 100;
            PermanentSLType = PermanentProtectionType.Relative;
            UsePermanentSL = false;
            PnlAveraging = new FancyPanel(Language.T("Handling of Additional Entry Signals"),
                                           LayoutColors.ColorSlotCaptionBackAveraging, LayoutColors.ColorSlotCaptionText);
            PnlAmounts = new FancyPanel(Language.T("Trading Size"), LayoutColors.ColorSlotCaptionBackAveraging,
                                         LayoutColors.ColorSlotCaptionText);
            PnlProtection = new FancyPanel(Language.T("Permanent Protection"),
                                            LayoutColors.ColorSlotCaptionBackAveraging,
                                            LayoutColors.ColorSlotCaptionText);

            LblPercent1 = new Label();
            LblPercent2 = new Label();
            LblPercent3 = new Label();

            LblAveragingSameDir = new Label();
            LblAveragingOppDir = new Label();

            CbxSameDirAction = new ComboBox();
            CbxOppDirAction = new ComboBox();
            NUDMaxOpenLots = new NumericUpDown();
            RbConstantUnits = new RadioButton();
            RbVariableUnits = new RadioButton();
            NUDEntryLots = new NumericUpDown();
            NUDAddingLots = new NumericUpDown();
            NUDReducingLots = new NumericUpDown();
            LblMaxOpenLots = new Label();
            LblEntryLots = new Label();
            LblAddingLots = new Label();
            LblReducingLots = new Label();

            ChbPermaSL = new CheckBox();
            CbxPermaSLType = new ComboBox();
            NUDPermaSL = new NumericUpDown();
            ChbPermaTP = new CheckBox();
            CbxPermaTPType = new ComboBox();
            NUDPermaTP = new NumericUpDown();
            ChbBreakEven = new CheckBox();
            NUDBreakEven = new NumericUpDown();
            CbxUseMartingale = new CheckBox();
            NUDMartingaleMultiplier = new NumericUpDown();

            BtnDefault = new Button();
            BtnCancel = new Button();
            BtnAccept = new Button();

            MaximizeBox = false;
            MinimizeBox = false;
            ShowInTaskbar = false;
            Icon = Data.Icon;
            BackColor = LayoutColors.ColorFormBack;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            AcceptButton = BtnAccept;
            Text = Language.T("Strategy Properties");

            // pnlAveraging
            PnlAveraging.Parent = this;

            // pnlAmounts
            PnlAmounts.Parent = this;

            // pnlProtection
            PnlProtection.Parent = this;

            // Label Same dir action
            LblAveragingSameDir.Parent = PnlAveraging;
            LblAveragingSameDir.ForeColor = LayoutColors.ColorControlText;
            LblAveragingSameDir.BackColor = Color.Transparent;
            LblAveragingSameDir.AutoSize = true;
            LblAveragingSameDir.Text = Language.T("Next same direction signal behaviour");

            // Label Opposite dir action
            LblAveragingOppDir.Parent = PnlAveraging;
            LblAveragingOppDir.ForeColor = LayoutColors.ColorControlText;
            LblAveragingOppDir.BackColor = Color.Transparent;
            LblAveragingOppDir.AutoSize = true;
            LblAveragingOppDir.Text = Language.T("Next opposite direction signal behaviour");

            // ComboBox SameDirAction
            CbxSameDirAction.Parent = PnlAveraging;
            CbxSameDirAction.Name = "cbxSameDirAction";
            CbxSameDirAction.DropDownStyle = ComboBoxStyle.DropDownList;
            CbxSameDirAction.Items.AddRange(new object[]
                                                {Language.T("Nothing"), Language.T("Winner"), Language.T("Add")});
            CbxSameDirAction.SelectedIndex = 0;
            _toolTip.SetToolTip(CbxSameDirAction,
                                Language.T("Nothing - cancels the additional orders.") + Environment.NewLine +
                                Language.T("Winner - adds to a winning position.") + Environment.NewLine +
                                Language.T("Add - adds to all positions."));

            // ComboBox OppDirAction
            CbxOppDirAction.Parent = PnlAveraging;
            CbxOppDirAction.Name = "cbxOppDirAction";
            CbxOppDirAction.DropDownStyle = ComboBoxStyle.DropDownList;
            CbxOppDirAction.Items.AddRange(new object[]
                                               {
                                                   Language.T("Nothing"), Language.T("Reduce"), Language.T("Close"),
                                                   Language.T("Reverse")
                                               });
            CbxOppDirAction.SelectedIndex = 0;
            _toolTip.SetToolTip(CbxOppDirAction,
                                Language.T("Nothing - cancels the additional orders.") + Environment.NewLine +
                                Language.T("Reduce - reduces or closes a position.") + Environment.NewLine +
                                Language.T("Close - closes the position.") + Environment.NewLine +
                                Language.T("Reverse - reverses the position."));

            // Label MaxOpen Lots
            LblMaxOpenLots.Parent = PnlAmounts;
            LblMaxOpenLots.ForeColor = LayoutColors.ColorControlText;
            LblMaxOpenLots.BackColor = Color.Transparent;
            LblMaxOpenLots.AutoSize = true;
            LblMaxOpenLots.Text = Language.T("Maximum number of open lots");

            // NumericUpDown MaxOpen Lots
            NUDMaxOpenLots.Parent = PnlAmounts;
            NUDMaxOpenLots.Name = "nudMaxOpenLots";
            NUDMaxOpenLots.BeginInit();
            NUDMaxOpenLots.Minimum = 0.01M;
            NUDMaxOpenLots.Maximum = 100;
            NUDMaxOpenLots.Increment = 0.01M;
            NUDMaxOpenLots.Value = (decimal) MaxOpenLots;
            NUDMaxOpenLots.DecimalPlaces = 2;
            NUDMaxOpenLots.TextAlign = HorizontalAlignment.Center;
            NUDMaxOpenLots.EndInit();

            // Radio Button Constant Units
            RbConstantUnits.Parent = PnlAmounts;
            RbConstantUnits.ForeColor = LayoutColors.ColorControlText;
            RbConstantUnits.BackColor = Color.Transparent;
            RbConstantUnits.Checked = !UseAccountPercentEntry;
            RbConstantUnits.AutoSize = true;
            RbConstantUnits.Name = "rbConstantUnits";
            RbConstantUnits.Text = Language.T("Trade a constant number of lots");

            // Radio Button Variable Units
            RbVariableUnits.Parent = PnlAmounts;
            RbVariableUnits.ForeColor = LayoutColors.ColorControlText;
            RbVariableUnits.BackColor = Color.Transparent;
            RbVariableUnits.Checked = UseAccountPercentEntry;
            RbVariableUnits.AutoSize = false;
            RbVariableUnits.Name = "rbVariableUnits";
            RbVariableUnits.Text = Language.T("Trade a variable number of lots depending on your current account equity. The percentage values show the part of the account equity used to cover the required margin.");

            // Label Entry Lots
            LblEntryLots.Parent = PnlAmounts;
            LblEntryLots.ForeColor = LayoutColors.ColorControlText;
            LblEntryLots.BackColor = Color.Transparent;
            LblEntryLots.AutoSize = true;
            LblEntryLots.Text = Language.T("Number of entry lots for a new position");

            // NumericUpDown Entry Lots
            NUDEntryLots.Parent = PnlAmounts;
            NUDEntryLots.Name = "nudEntryLots";
            NUDEntryLots.BeginInit();
            NUDEntryLots.Minimum = 0.01M;
            NUDEntryLots.Maximum = 100;
            NUDEntryLots.Increment = 0.01M;
            NUDEntryLots.Value = (decimal) EntryLots;
            NUDEntryLots.DecimalPlaces = 2;
            NUDEntryLots.TextAlign = HorizontalAlignment.Center;
            NUDEntryLots.EndInit();

            // Label Entry Lots %
            LblPercent1.Parent = PnlAmounts;
            LblPercent1.ForeColor = LayoutColors.ColorControlText;
            LblPercent1.BackColor = Color.Transparent;
            LblPercent1.AutoSize = true;
            LblPercent1.Text = "%";

            // Label Adding Lots
            LblAddingLots.Parent = PnlAmounts;
            LblAddingLots.ForeColor = LayoutColors.ColorControlText;
            LblAddingLots.BackColor = Color.Transparent;
            LblAddingLots.AutoSize = true;
            LblAddingLots.Text = Language.T("In case of addition - number of lots to add");

            // NumericUpDown Adding Lots
            NUDAddingLots.Parent = PnlAmounts;
            NUDAddingLots.Name = "nudAddingLots";
            NUDAddingLots.BeginInit();
            NUDAddingLots.Minimum = 0.01M;
            NUDAddingLots.Maximum = 100;
            NUDAddingLots.Increment = 0.01M;
            NUDAddingLots.Value = (decimal) AddingLots;
            NUDAddingLots.DecimalPlaces = 2;
            NUDAddingLots.TextAlign = HorizontalAlignment.Center;
            NUDAddingLots.EndInit();

            // Label Adding Lots %
            LblPercent2.Parent = PnlAmounts;
            LblPercent2.ForeColor = LayoutColors.ColorControlText;
            LblPercent2.BackColor = Color.Transparent;
            LblPercent2.AutoSize = true;
            LblPercent2.Text = "%";

            // Label Reducing Lots
            LblReducingLots.Parent = PnlAmounts;
            LblReducingLots.ForeColor = LayoutColors.ColorControlText;
            LblReducingLots.BackColor = Color.Transparent;
            LblReducingLots.AutoSize = true;
            LblReducingLots.Text = Language.T("In case of reduction - number of lots to close");

            // NumericUpDown Reducing Lots
            NUDReducingLots.Parent = PnlAmounts;
            NUDReducingLots.Name = "nudReducingLots";
            NUDReducingLots.BeginInit();
            NUDReducingLots.Minimum = 0.01M;
            NUDReducingLots.Maximum = 100;
            NUDReducingLots.Increment = 0.01M;
            NUDReducingLots.Value = (decimal) ReducingLots;
            NUDReducingLots.DecimalPlaces = 2;
            NUDReducingLots.TextAlign = HorizontalAlignment.Center;
            NUDReducingLots.EndInit();

            // Label Reducing Lots %
            LblPercent3.Parent = PnlAmounts;
            LblPercent3.ForeColor = LayoutColors.ColorControlText;
            LblPercent3.BackColor = Color.Transparent;
            LblPercent3.AutoSize = true;
            LblPercent3.Text = "%";

            // CheckBox Use Martingale
            CbxUseMartingale.Name = "cbxUseMartingale";
            CbxUseMartingale.Parent = PnlAmounts;
            CbxUseMartingale.ForeColor = LayoutColors.ColorControlText;
            CbxUseMartingale.BackColor = Color.Transparent;
            CbxUseMartingale.AutoCheck = true;
            CbxUseMartingale.AutoSize = true;
            CbxUseMartingale.Checked = false;
            CbxUseMartingale.Text = Language.T("Martingale money management multiplier");

            // NumericUpDown Martingale Multiplier
            NUDMartingaleMultiplier.Parent = PnlAmounts;
            NUDMartingaleMultiplier.Name = "nudMartingaleMultiplier";
            NUDMartingaleMultiplier.BeginInit();
            NUDMartingaleMultiplier.Minimum = 0.01M;
            NUDMartingaleMultiplier.Maximum = 10;
            NUDMartingaleMultiplier.Increment = 0.01m;
            NUDMartingaleMultiplier.DecimalPlaces = 2;
            NUDMartingaleMultiplier.Value = 2;
            NUDMartingaleMultiplier.TextAlign = HorizontalAlignment.Center;
            NUDMartingaleMultiplier.EndInit();

            // CheckBox Permanent Stop Loss
            ChbPermaSL.Parent = PnlProtection;
            ChbPermaSL.ForeColor = LayoutColors.ColorControlText;
            ChbPermaSL.BackColor = Color.Transparent;
            ChbPermaSL.AutoCheck = true;
            ChbPermaSL.AutoSize = true;
            ChbPermaSL.Name = "chbPermaSL";
            ChbPermaSL.Text = Language.T("Permanent Stop Loss");

            // ComboBox cbxPermaSLType
            CbxPermaSLType.Parent = PnlProtection;
            CbxPermaSLType.Name = "cbxPermaSLType";
            CbxPermaSLType.Visible = false;
            CbxPermaSLType.DropDownStyle = ComboBoxStyle.DropDownList;
            CbxPermaSLType.Items.AddRange(new object[] {Language.T("Relative"), Language.T("Absolute")});
            CbxPermaSLType.SelectedIndex = 0;

            // NumericUpDown Permanent S/L
            NUDPermaSL.Parent = PnlProtection;
            NUDPermaSL.Name = "nudPermaSL";
            NUDPermaSL.BeginInit();
            NUDPermaSL.Minimum = 5;
            NUDPermaSL.Maximum = 5000;
            NUDPermaSL.Increment = 1;
            NUDPermaSL.Value = PermanentSL;
            NUDPermaSL.TextAlign = HorizontalAlignment.Center;
            NUDPermaSL.EndInit();

            // CheckBox Permanent Take Profit
            ChbPermaTP.Parent = PnlProtection;
            ChbPermaTP.ForeColor = LayoutColors.ColorControlText;
            ChbPermaTP.BackColor = Color.Transparent;
            ChbPermaTP.AutoCheck = true;
            ChbPermaTP.AutoSize = true;
            ChbPermaTP.Name = "chbPermaTP";
            ChbPermaTP.Text = Language.T("Permanent Take Profit");

            // ComboBox cbxPermaTPType
            CbxPermaTPType.Parent = PnlProtection;
            CbxPermaTPType.Name = "cbxPermaTPType";
            CbxPermaTPType.Visible = false;
            CbxPermaTPType.DropDownStyle = ComboBoxStyle.DropDownList;
            CbxPermaTPType.Items.AddRange(new object[] {Language.T("Relative"), Language.T("Absolute")});
            CbxPermaTPType.SelectedIndex = 0;

            // NumericUpDown Permanent Take Profit
            NUDPermaTP.Parent = PnlProtection;
            NUDPermaTP.Name = "nudPermaTP";
            NUDPermaTP.BeginInit();
            NUDPermaTP.Minimum = 5;
            NUDPermaTP.Maximum = 5000;
            NUDPermaTP.Increment = 1;
            NUDPermaTP.Value = PermanentTP;
            NUDPermaTP.TextAlign = HorizontalAlignment.Center;
            NUDPermaTP.EndInit();

            // CheckBox Break Even
            ChbBreakEven.Parent = PnlProtection;
            ChbBreakEven.ForeColor = LayoutColors.ColorControlText;
            ChbBreakEven.BackColor = Color.Transparent;
            ChbBreakEven.AutoCheck = true;
            ChbBreakEven.AutoSize = true;
            ChbBreakEven.Name = "chbBreakEven";
            ChbBreakEven.Text = Language.T("Break Even") + " [" + Language.T("pips") + "]";

            // NumericUpDown Break Even
            NUDBreakEven.Parent = PnlProtection;
            NUDBreakEven.Name = "nudBreakEven";
            NUDBreakEven.BeginInit();
            NUDBreakEven.Minimum = 5;
            NUDBreakEven.Maximum = 5000;
            NUDBreakEven.Increment = 1;
            NUDBreakEven.Value = BreakEven;
            NUDBreakEven.TextAlign = HorizontalAlignment.Center;
            NUDBreakEven.EndInit();

            //Button Default
            BtnDefault.Parent = this;
            BtnDefault.Name = "Default";
            BtnDefault.Text = Language.T("Default");
            BtnDefault.Click += BtnDefaultClick;
            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;
        }
        /// <summary>
        /// Constructor
        /// </summary>
        public Instrument_Editor()
        {
            pnlInstruments   = new Fancy_Panel(Language.T("Instruments"));
            pnlProperties    = new Fancy_Panel(Language.T("Instrument Properties"));
            pnlAddInstrument = new Fancy_Panel(Language.T("Add an Instrument"));

            // Instruments' controls
            lbxInstruments = new ListBox();
            btnDelete      = new Button();
            btnUp          = new Button();
            btnDown        = new Button();

            // Properties' controls
            lblPropSymbol      = new Label();
            lblPropType        = new Label();
            lblPropComment     = new Label();
            lblPropDigits      = new Label();
            lblPropPoint       = new Label();
            lblPropLots        = new Label();
            lblPropSpread      = new Label();
            lblPropSwap        = new Label();
            lblPropCommission  = new Label();
            lblPropSlippage    = new Label();
            lblPropPriceIn     = new Label();
            lblPropAccountIn   = new Label();
            lblPropAccountRate = new Label();
            lblPropFileName    = new Label();
            lblPropDataFiles   = new Label();

            tbxPropSymbol      = new TextBox();
            tbxPropType        = new TextBox();
            tbxPropComment     = new TextBox();
            tbxPropPoint       = new TextBox();
            tbxPropSpread      = new TextBox();
            tbxPropSlippage    = new TextBox();
            tbxPropPriceIn     = new TextBox();
            tbxPropAccountIn   = new TextBox();
            tbxPropAccountRate = new TextBox();
            tbxPropFileName    = new TextBox();

            cbxPropSwap       = new ComboBox();
            cbxPropCommission = new ComboBox();
            cbxPropCommScope  = new ComboBox();
            cbxPropCommTime   = new ComboBox();

            nudPropDigits      = new NumericUpDown();
            nudPropLotSize     = new NumericUpDown();
            nudPropSpread      = new NumericUpDown();
            nudPropSwapLong    = new NumericUpDown();
            nudPropSwapShort   = new NumericUpDown();
            nudPropCommission  = new NumericUpDown();
            nudPropSlippage    = new NumericUpDown();
            nudPropAccountRate = new NumericUpDown();

            btnAccept = new Button();

            // Add an Instrument's controls
            lblAddInstrSymbol = new Label();
            lblAddInstrType   = new Label();
            tbxAddInstrSymbol = new TextBox();
            cbxAddInstrType   = new ComboBox();
            btnAddInstrAdd    = new Button();

            btnClose = new Button();

            font           = this.Font;
            fontCaption    = new Font(Font.FontFamily, 9);
            captionHeight = (float)Math.Max(fontCaption.Height, 18);
            colorText      = LayoutColors.ColorControlText;
            bNeedReset     = false;

            MaximizeBox     = false;
            MinimizeBox     = false;
            ShowInTaskbar   = false;
            Icon            = Data.Icon;
            BackColor       = LayoutColors.ColorFormBack;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            AcceptButton    = btnAccept;
            Text            = Language.T("Instrument Editor");
            FormClosing    += new FormClosingEventHandler(Instrument_Editor_FormClosing);

            // pnlInstruments
            pnlInstruments.Parent = this;

            // pnlProperties
            pnlProperties.Parent = this;

            // pnlAddInstrument
            pnlAddInstrument.Parent = this;

            // lbxInstruments
            lbxInstruments.Parent = pnlInstruments;
            lbxInstruments.BackColor = LayoutColors.ColorControlBack;
            //lbxInstruments.BorderStyle = BorderStyle.None;
            lbxInstruments.ForeColor = colorText;
            lbxInstruments.Items.AddRange(Instruments.SymbolList);

            // Button UP
            btnUp.Parent = pnlInstruments;
            btnUp.Text   = Language.T("Up");
            btnUp.UseVisualStyleBackColor = true;
            btnUp.Click += new EventHandler(BtnUp_Click);

            // Button Down
            btnDown.Parent = pnlInstruments;
            btnDown.Text   = Language.T("Down");
            btnDown.UseVisualStyleBackColor = true;
            btnDown.Click += new EventHandler(BtnDown_Click);

            // Button Delete
            btnDelete.Parent = pnlInstruments;
            btnDelete.Text   = Language.T("Delete");
            btnDelete.UseVisualStyleBackColor = true;
            btnDelete.Click += new EventHandler(BtnDelete_Click);

            // lblAddInstrSymbol
            lblAddInstrSymbol.Parent    = pnlAddInstrument;
            lblAddInstrSymbol.ForeColor = colorText;
            lblAddInstrSymbol.BackColor = Color.Transparent;
            lblAddInstrSymbol.AutoSize  = false;
            lblAddInstrSymbol.TextAlign = ContentAlignment.MiddleRight;
            lblAddInstrSymbol.Text      = Language.T("Symbol");

            // tbxAddInstrSymbol
            tbxAddInstrSymbol.Parent    = pnlAddInstrument;
            tbxAddInstrSymbol.ForeColor = colorText;

            // lblAddInstrType
            lblAddInstrType.Parent    = pnlAddInstrument;
            lblAddInstrType.ForeColor = colorText;
            lblAddInstrType.BackColor = Color.Transparent;
            lblAddInstrType.AutoSize  = false;
            lblAddInstrType.TextAlign = ContentAlignment.MiddleRight;
            lblAddInstrType.Text      = Language.T("Type");

            // cbxAddInstrType
            cbxAddInstrType.Parent        = pnlAddInstrument;
            cbxAddInstrType.Name          = "cbxAddInstrType";
            cbxAddInstrType.DropDownStyle = ComboBoxStyle.DropDownList;
            cbxAddInstrType.Items.AddRange(Enum.GetNames(typeof(Instrumet_Type)));
            cbxAddInstrType.SelectedIndex = 0;

            // btnAddInstrAdd
            btnAddInstrAdd.Parent = pnlAddInstrument;
            btnAddInstrAdd.Name   = "btnAddInstrAdd";
            btnAddInstrAdd.Text   = Language.T("Add");
            btnAddInstrAdd.UseVisualStyleBackColor = true;
            btnAddInstrAdd.Click += new EventHandler(BtnAddInstrAdd_Click);

            // pnlProperties
            lblPropSymbol.Parent    = pnlProperties;
            lblPropSymbol.ForeColor = colorText;
            lblPropSymbol.BackColor = Color.Transparent;
            lblPropSymbol.AutoSize  = false;
            lblPropSymbol.TextAlign = ContentAlignment.MiddleRight;
            lblPropSymbol.Text      = Language.T("Symbol");

            // lblPropType
            lblPropType.Parent    = pnlProperties;
            lblPropType.ForeColor = colorText;
            lblPropType.BackColor = Color.Transparent;
            lblPropType.AutoSize  = false;
            lblPropType.TextAlign = ContentAlignment.MiddleRight;
            lblPropType.Text      = Language.T("Type");

            // lblPropComment
            lblPropComment.Parent    = pnlProperties;
            lblPropComment.ForeColor = colorText;
            lblPropComment.BackColor = Color.Transparent;
            lblPropComment.AutoSize  = false;
            lblPropComment.TextAlign = ContentAlignment.MiddleRight;
            lblPropComment.Text      = Language.T("Comment");

            // lblPropDigits
            lblPropDigits.Parent    = pnlProperties;
            lblPropDigits.ForeColor = colorText;
            lblPropDigits.BackColor = Color.Transparent;
            lblPropDigits.AutoSize  = false;
            lblPropDigits.TextAlign = ContentAlignment.MiddleRight;
            lblPropDigits.Text      = Language.T("Digits");

            // lblPropPoint
            lblPropPoint.Parent    = pnlProperties;
            lblPropPoint.ForeColor = colorText;
            lblPropPoint.BackColor = Color.Transparent;
            lblPropPoint.AutoSize  = false;
            lblPropPoint.TextAlign = ContentAlignment.MiddleRight;
            lblPropPoint.Text      = Language.T("Point value");

            // lblPropLots
            lblPropLots.Parent    = pnlProperties;
            lblPropLots.ForeColor = colorText;
            lblPropLots.BackColor = Color.Transparent;
            lblPropLots.AutoSize  = false;
            lblPropLots.TextAlign = ContentAlignment.MiddleRight;
            lblPropLots.Text      = Language.T("Lot size");

            // lblPropSpread
            lblPropSpread.Parent    = pnlProperties;
            lblPropSpread.ForeColor = colorText;
            lblPropSpread.BackColor = Color.Transparent;
            lblPropSpread.AutoSize  = false;
            lblPropSpread.TextAlign = ContentAlignment.MiddleRight;
            lblPropSpread.Text      = Language.T("Spread in");

            // lblPropSwap
            lblPropSwap.Parent    = pnlProperties;
            lblPropSwap.ForeColor = colorText;
            lblPropSwap.BackColor = Color.Transparent;
            lblPropSwap.AutoSize  = false;
            lblPropSwap.TextAlign = ContentAlignment.MiddleRight;
            lblPropSwap.Text      = Language.T("Swap in");

            // lblPropCommission
            lblPropCommission.Parent    = pnlProperties;
            lblPropCommission.ForeColor = colorText;
            lblPropCommission.BackColor = Color.Transparent;
            lblPropCommission.AutoSize  = false;
            lblPropCommission.TextAlign = ContentAlignment.MiddleRight;
            lblPropCommission.Text      = Language.T("Commission in");

            // lblPropSlippage
            lblPropSlippage.Parent    = pnlProperties;
            lblPropSlippage.ForeColor = colorText;
            lblPropSlippage.BackColor = Color.Transparent;
            lblPropSlippage.AutoSize  = false;
            lblPropSlippage.TextAlign = ContentAlignment.MiddleRight;
            lblPropSlippage.Text      = Language.T("Slippage in");

            // lblPropPriceIn
            lblPropPriceIn.Parent    = pnlProperties;
            lblPropPriceIn.ForeColor = colorText;
            lblPropPriceIn.BackColor = Color.Transparent;
            lblPropPriceIn.AutoSize  = false;
            lblPropPriceIn.TextAlign = ContentAlignment.MiddleRight;
            lblPropPriceIn.Text      = Language.T("Price in");

            // lblPropAccountIn
            lblPropAccountIn.Parent    = pnlProperties;
            lblPropAccountIn.ForeColor = colorText;
            lblPropAccountIn.BackColor = Color.Transparent;
            lblPropAccountIn.AutoSize  = false;
            lblPropAccountIn.TextAlign = ContentAlignment.MiddleRight;
            lblPropAccountIn.Text      = Language.T("Account in");

            // lblPropAccountRate
            lblPropAccountRate.Parent    = pnlProperties;
            lblPropAccountRate.ForeColor = colorText;
            lblPropAccountRate.BackColor = Color.Transparent;
            lblPropAccountRate.AutoSize  = false;
            lblPropAccountRate.TextAlign = ContentAlignment.MiddleRight;
            lblPropAccountRate.Text      = Language.T("Account exchange rate");

            // lblPropFileName
            lblPropFileName.Parent    = pnlProperties;
            lblPropFileName.BackColor = Color.Transparent;
            lblPropFileName.ForeColor = colorText;
            lblPropFileName.AutoSize  = false;
            lblPropFileName.TextAlign = ContentAlignment.MiddleRight;
            lblPropFileName.Text      = Language.T("Base name of the data files");

            // lblPropDataFiles
            lblPropDataFiles.Parent    = pnlProperties;
            lblPropDataFiles.BackColor = Color.Transparent;
            lblPropDataFiles.ForeColor = colorText;
            lblPropDataFiles.AutoSize  = false;
            lblPropDataFiles.TextAlign = ContentAlignment.TopLeft;
            lblPropDataFiles.Text      = "";

            // tbxPropSymbol
            tbxPropSymbol.Parent    = pnlProperties;
            tbxPropSymbol.BackColor = LayoutColors.ColorControlBack;
            tbxPropSymbol.ForeColor = colorText;
            tbxPropSymbol.Enabled   = false;

            // tbxPropType
            tbxPropType.Parent    = pnlProperties;
            tbxPropType.BackColor = LayoutColors.ColorControlBack;
            tbxPropType.ForeColor = colorText;
            tbxPropType.Enabled   = false;

            // tbxPropComment
            tbxPropComment.Parent    = pnlProperties;
            tbxPropComment.BackColor = LayoutColors.ColorControlBack;
            tbxPropComment.ForeColor = colorText;

            // tbxPropPoint
            tbxPropPoint.Parent    = pnlProperties;
            tbxPropPoint.BackColor = LayoutColors.ColorControlBack;
            tbxPropPoint.ForeColor = colorText;
            tbxPropPoint.Enabled   = false;

            // tbxPropSpread
            tbxPropSpread.Parent    = pnlProperties;
            tbxPropSpread.BackColor = LayoutColors.ColorControlBack;
            tbxPropSpread.ForeColor = colorText;
            tbxPropSpread.Enabled   = false;
            tbxPropSpread.Text      = Language.T("pips");

            // tbxPropSlippage
            tbxPropSlippage.Parent    = pnlProperties;
            tbxPropSlippage.BackColor = LayoutColors.ColorControlBack;
            tbxPropSlippage.ForeColor = colorText;
            tbxPropSlippage.Enabled   = false;
            tbxPropSlippage.Text      = Language.T("pips");

            // tbxPropPriceIn
            tbxPropPriceIn.Parent       = pnlProperties;
            tbxPropPriceIn.BackColor    = LayoutColors.ColorControlBack;
            tbxPropPriceIn.ForeColor    = colorText;
            tbxPropPriceIn.TextChanged += new EventHandler(TbxPropPriceIn_TextChanged);

            // tbxPropAccountIn
            tbxPropAccountIn.Parent    = pnlProperties;
            tbxPropAccountIn.BackColor = LayoutColors.ColorControlBack;
            tbxPropAccountIn.ForeColor = colorText;
            tbxPropAccountIn.Enabled   = false;
            tbxPropAccountIn.Text      = Configs.AccountCurrency;

            // tbxPropAccountRate
            tbxPropAccountRate.Parent    = pnlProperties;
            tbxPropAccountRate.BackColor = LayoutColors.ColorControlBack;
            tbxPropAccountRate.ForeColor = colorText;
            tbxPropAccountRate.Enabled   = false;
            tbxPropAccountRate.Text      = "Deal price";

            // tbxPropFileName
            tbxPropFileName.Parent       = pnlProperties;
            tbxPropFileName.BackColor    = LayoutColors.ColorControlBack;
            tbxPropFileName.ForeColor    = colorText;
            tbxPropFileName.TextChanged += new EventHandler(TbxPropFileName_TextChanged);

            // cbxPropSwap
            cbxPropSwap.Parent        = pnlProperties;
            cbxPropSwap.Name          = "cbxPropSwap";
            cbxPropSwap.DropDownStyle = ComboBoxStyle.DropDownList;
            cbxPropSwap.Items.AddRange(new string[] { Language.T("pips"), Language.T("percents"), Language.T("money") });
            cbxPropSwap.SelectedIndex = 0;

            // cbxPropCommission
            cbxPropCommission.Parent        = pnlProperties;
            cbxPropCommission.Name          = "cbxPropCommission";
            cbxPropCommission.DropDownStyle = ComboBoxStyle.DropDownList;
            cbxPropCommission.Items.AddRange(new string[] { Language.T("pips"), Language.T("percents"), Language.T("money") });
            cbxPropCommission.SelectedIndex = 0;
            cbxPropCommission.SelectedIndexChanged += new EventHandler(CbxPropCommission_SelectedIndexChanged);

            // cbxPropCommScope
            cbxPropCommScope.Parent        = pnlProperties;
            cbxPropCommScope.Name          = "cbxPropCommScope";
            cbxPropCommScope.DropDownStyle = ComboBoxStyle.DropDownList;
            cbxPropCommScope.Items.AddRange(new string[] { Language.T("per lot"), Language.T("per deal") });
            cbxPropCommScope.SelectedIndex = 0;

            // cbxPropCommTime
            cbxPropCommTime.Parent        = pnlProperties;
            cbxPropCommTime.Name          = "cbxPropCommTime";
            cbxPropCommTime.DropDownStyle = ComboBoxStyle.DropDownList;
            cbxPropCommTime.Items.AddRange(new string[] { Language.T("at opening"), Language.T("at open/close")});
            cbxPropCommTime.SelectedIndex = 0;

            // NumericUpDown Digits
            nudPropDigits.BeginInit();
            nudPropDigits.Parent    = pnlProperties;
            nudPropDigits.Name      = "nudPropDigits";
            nudPropDigits.Minimum   = 0;
            nudPropDigits.Maximum   = 5;
            nudPropDigits.Increment = 1;
            nudPropDigits.Value     = 4;
            nudPropDigits.TextAlign = HorizontalAlignment.Center;
            nudPropDigits.ValueChanged += new EventHandler(NudPropDigits_ValueChanged);
            nudPropDigits.EndInit();

            // nudPropLotSize
            nudPropLotSize.BeginInit();
            nudPropLotSize.Parent    = pnlProperties;
            nudPropLotSize.Name      = "nudPropLotSize";
            nudPropLotSize.Minimum   = 0;
            nudPropLotSize.Maximum   = 100000;
            nudPropLotSize.Increment = 1;
            nudPropLotSize.Value     = 10000;
            nudPropLotSize.TextAlign = HorizontalAlignment.Center;
            nudPropLotSize.EndInit();

            // nudPropSpread
            nudPropSpread.BeginInit();
            nudPropSpread.Parent        = pnlProperties;
            nudPropSpread.Name          = "nudPropSpread";
            nudPropSpread.TextAlign     = HorizontalAlignment.Center;
            nudPropSpread.Minimum       = 0;
            nudPropSpread.Maximum       = 500;
            nudPropSpread.Increment     = 0.01M;
            nudPropSpread.DecimalPlaces = 2;
            nudPropSpread.Value         = 4;
            nudPropSpread.EndInit();
            toolTip.SetToolTip(nudPropSpread, Language.T("Difference between Bid and Ask prices."));

            // NumericUpDown Swap Long
            nudPropSwapLong.BeginInit();
            nudPropSwapLong.Parent        = pnlProperties;
            nudPropSwapLong.Name          = "nudPropSwapLong";
            nudPropSwapLong.TextAlign     = HorizontalAlignment.Center;
            nudPropSwapLong.Minimum       = -500;
            nudPropSwapLong.Maximum       = 500;
            nudPropSwapLong.Increment     = 0.01M;
            nudPropSwapLong.DecimalPlaces = 2;
            nudPropSwapLong.Value         = 1;
            nudPropSwapLong.EndInit();
            toolTip.SetToolTip(nudPropSwapLong, Language.T("Swap number for a long position rollover") + Environment.NewLine + Language.T("A positive value decreases your profit."));

            // NumericUpDown Swap Short
            nudPropSwapShort.BeginInit();
            nudPropSwapShort.Parent        = pnlProperties;
            nudPropSwapShort.Name          = "nudPropSwapShort";
            nudPropSwapShort.TextAlign     = HorizontalAlignment.Center;
            nudPropSwapShort.Minimum       = -500;
            nudPropSwapShort.Maximum       = 500;
            nudPropSwapShort.Increment     = 0.01M;
            nudPropSwapShort.DecimalPlaces = 2;
            nudPropSwapShort.Value         = -1;
            nudPropSwapShort.EndInit();
            toolTip.SetToolTip(nudPropSwapShort, Language.T("Swap number for a short position rollover") + Environment.NewLine + Language.T("A negative value decreases your profit."));

            // NumericUpDown nudPropCommission
            nudPropCommission.BeginInit();
            nudPropCommission.Parent        = pnlProperties;
            nudPropCommission.Name          = "nudPropCommission";
            nudPropCommission.TextAlign     = HorizontalAlignment.Center;
            nudPropCommission.Minimum       = -500;
            nudPropCommission.Maximum       = 500;
            nudPropCommission.Increment     = 0.01M;
            nudPropCommission.DecimalPlaces = 2;
            nudPropCommission.Value         = 0;
            nudPropCommission.EndInit();

            // NumericUpDown nudPropSlippage
            nudPropSlippage.BeginInit();
            nudPropSlippage.Parent        = pnlProperties;
            nudPropSlippage.Name          = "nudPropSlippage";
            nudPropSlippage.TextAlign     = HorizontalAlignment.Center;
            nudPropSlippage.Minimum       = 0;
            nudPropSlippage.Maximum       = 200;
            nudPropSlippage.Increment     = 1;
            nudPropSlippage.DecimalPlaces = 0;
            nudPropSlippage.Value         = 0;
            nudPropSlippage.EndInit();
            toolTip.SetToolTip(nudPropSlippage, Language.T("Number of pips you lose due to an inaccurate order execution."));

            // NumericUpDown nudPropAccountRate
            nudPropAccountRate.BeginInit();
            nudPropAccountRate.Parent        = pnlProperties;
            nudPropAccountRate.Name          = "nudPropAccountRate";
            nudPropAccountRate.TextAlign     = HorizontalAlignment.Center;
            nudPropAccountRate.Minimum       = 0;
            nudPropAccountRate.Maximum       = 100000;
            nudPropAccountRate.Increment     = 0.0001M;
            nudPropAccountRate.DecimalPlaces = 4;
            nudPropAccountRate.Value         = 1;
            nudPropAccountRate.ValueChanged += new EventHandler(nudPropAccountRate_ValueChanged);
            nudPropAccountRate.EndInit();

            // Button Accept
            btnAccept.Parent = pnlProperties;
            btnAccept.Name   = "btnAccept";
            btnAccept.Text   = Language.T("Accept");
            btnAccept.Click += new EventHandler(BtnAccept_Click);
            btnAccept.UseVisualStyleBackColor = true;

            //Button Close
            btnClose.Parent       = this;
            btnClose.Text         = Language.T("Close");
            btnClose.DialogResult = DialogResult.Cancel;
            btnClose.UseVisualStyleBackColor = true;
        }
		private void InitializeComponent()
		{
			components = new Container();
			errorProvider = new ErrorProvider(components);
			label4 = new Label();
			lblAGC = new Label();
			panel3 = new Panel();
			rBtnLnaZin200 = new RadioButton();
			rBtnLnaZin50 = new RadioButton();
			panel4 = new Panel();
			rBtnLnaLowPowerOff = new RadioButton();
			rBtnLnaLowPowerOn = new RadioButton();
			label7 = new Label();
			lblSensitivityBoost = new Label();
			pnlSensitivityBoost = new Panel();
			rBtnSensitivityBoostOff = new RadioButton();
			rBtnSensitivityBoostOn = new RadioButton();
			gBoxLnaSensitivity = new GroupBoxEx();
			gBoxAgc = new GroupBoxEx();
			panel2 = new Panel();
			rBtnAgcAutoRefOff = new RadioButton();
			rBtnAgcAutoRefOn = new RadioButton();
			label5 = new Label();
			label8 = new Label();
			label24 = new Label();
			label25 = new Label();
			label26 = new Label();
			label27 = new Label();
			label28 = new Label();
			label1 = new Label();
			label2 = new Label();
			label3 = new Label();
			label29 = new Label();
			label30 = new Label();
			label31 = new Label();
			label32 = new Label();
			label33 = new Label();
			nudAgcStep5 = new NumericUpDown();
			nudAgcSnrMargin = new NumericUpDownEx();
			nudAgcStep4 = new NumericUpDown();
			nudAgcRefLevel = new NumericUpDownEx();
			nudAgcStep3 = new NumericUpDown();
			nudAgcStep1 = new NumericUpDown();
			nudAgcStep2 = new NumericUpDown();
			gBoxRssi = new GroupBoxEx();
			pnlRssiPhase = new Panel();
			rBtnRssiPhaseManual = new RadioButton();
			rBtnRssiPhaseAuto = new RadioButton();
			label23 = new Label();
			btnRestartRx = new Button();
			panel7 = new Panel();
			rBtnFastRxOff = new RadioButton();
			rBtnFastRxOn = new RadioButton();
			label21 = new Label();
			btnRssiRead = new Button();
			label17 = new Label();
			label54 = new Label();
			label55 = new Label();
			label56 = new Label();
			lblRssiValue = new Label();
			nudRssiThresh = new NumericUpDownEx();
			ledRssiDone = new Led();
			panel1 = new Panel();
			rBtnRssiAutoThreshOff = new RadioButton();
			rBtnRssiAutoThreshOn = new RadioButton();
			label6 = new Label();
			nudTimeoutRxStart = new NumericUpDownEx();
			label9 = new Label();
			label14 = new Label();
			label11 = new Label();
			label15 = new Label();
			nudTimeoutRssiThresh = new NumericUpDownEx();
			gBoxAfcFei = new GroupBoxEx();
			nudLowBetaAfcOffset = new NumericUpDownEx();
			lblLowBetaAfcOffset = new Label();
			lblAfcLowBeta = new Label();
			label19 = new Label();
			lblLowBetaAfcOfssetUnit = new Label();
			label20 = new Label();
			pnlAfcLowBeta = new Panel();
			rBtnAfcLowBetaOff = new RadioButton();
			rBtnAfcLowBetaOn = new RadioButton();
			btnFeiRead = new Button();
			panel8 = new Panel();
			rBtnAfcAutoClearOff = new RadioButton();
			rBtnAfcAutoClearOn = new RadioButton();
			ledFeiDone = new Led();
			panel9 = new Panel();
			rBtnAfcAutoOff = new RadioButton();
			rBtnAfcAutoOn = new RadioButton();
			lblFeiValue = new Label();
			label12 = new Label();
			label18 = new Label();
			label10 = new Label();
			btnAfcClear = new Button();
			btnAfcStart = new Button();
			ledAfcDone = new Led();
			lblAfcValue = new Label();
			label22 = new Label();
			gBoxOok = new GroupBoxEx();
			cBoxOokThreshType = new ComboBox();
			lblOokType = new Label();
			lblOokStep = new Label();
			lblOokDec = new Label();
			lblOokCutoff = new Label();
			lblOokFixed = new Label();
			suffixOOKstep = new Label();
			suffixOOKfixed = new Label();
			nudOokPeakThreshStep = new NumericUpDownEx();
			nudOokFixedThresh = new NumericUpDownEx();
			cBoxOokPeakThreshDec = new ComboBox();
			cBoxOokAverageThreshFilt = new ComboBox();
			gBoxAfcBw = new GroupBoxEx();
			nudAfcDccFreq = new NumericUpDownEx();
			lblAfcDcc = new Label();
			lblAfcRxBw = new Label();
			suffixAFCDCC = new Label();
			suffixAFCRxBw = new Label();
			nudRxFilterBwAfc = new NumericUpDownEx();
			gBoxRxBw = new GroupBoxEx();
			nudDccFreq = new NumericUpDownEx();
			lblDcc = new Label();
			lblRxBw = new Label();
			suffixDCC = new Label();
			suffixRxBw = new Label();
			nudRxFilterBw = new NumericUpDownEx();
			gBoxLna = new GroupBoxEx();
			panel5 = new Panel();
			rBtnLnaGainAutoOff = new RadioButton();
			rBtnLnaGainAutoOn = new RadioButton();
			label13 = new Label();
			label16 = new Label();
			lblAgcReference = new Label();
			label48 = new Label();
			label49 = new Label();
			label50 = new Label();
			label51 = new Label();
			label52 = new Label();
			lblLnaGain1 = new Label();
			label53 = new Label();
			panel6 = new Panel();
			rBtnLnaGain1 = new RadioButton();
			rBtnLnaGain2 = new RadioButton();
			rBtnLnaGain3 = new RadioButton();
			rBtnLnaGain4 = new RadioButton();
			rBtnLnaGain5 = new RadioButton();
			rBtnLnaGain6 = new RadioButton();
			lblLnaGain2 = new Label();
			lblLnaGain3 = new Label();
			lblLnaGain4 = new Label();
			lblLnaGain5 = new Label();
			lblLnaGain6 = new Label();
			lblAgcThresh1 = new Label();
			lblAgcThresh2 = new Label();
			lblAgcThresh3 = new Label();
			lblAgcThresh4 = new Label();
			lblAgcThresh5 = new Label();
			label47 = new Label();
			gBoxDagc = new GroupBoxEx();
			label34 = new Label();
			panel11 = new Panel();
			rBtnDagcOff = new RadioButton();
			rBtnDagcOn = new RadioButton();
			((ISupportInitialize)errorProvider).BeginInit();
			panel3.SuspendLayout();
			panel4.SuspendLayout();
			pnlSensitivityBoost.SuspendLayout();
			gBoxLnaSensitivity.SuspendLayout();
			gBoxAgc.SuspendLayout();
			panel2.SuspendLayout();
			nudAgcStep5.BeginInit();
			nudAgcSnrMargin.BeginInit();
			nudAgcStep4.BeginInit();
			nudAgcRefLevel.BeginInit();
			nudAgcStep3.BeginInit();
			nudAgcStep1.BeginInit();
			nudAgcStep2.BeginInit();
			gBoxRssi.SuspendLayout();
			pnlRssiPhase.SuspendLayout();
			panel7.SuspendLayout();
			nudRssiThresh.BeginInit();
			panel1.SuspendLayout();
			nudTimeoutRxStart.BeginInit();
			nudTimeoutRssiThresh.BeginInit();
			gBoxAfcFei.SuspendLayout();
			nudLowBetaAfcOffset.BeginInit();
			pnlAfcLowBeta.SuspendLayout();
			panel8.SuspendLayout();
			panel9.SuspendLayout();
			gBoxOok.SuspendLayout();
			nudOokPeakThreshStep.BeginInit();
			nudOokFixedThresh.BeginInit();
			gBoxAfcBw.SuspendLayout();
			nudAfcDccFreq.BeginInit();
			nudRxFilterBwAfc.BeginInit();
			gBoxRxBw.SuspendLayout();
			nudDccFreq.BeginInit();
			nudRxFilterBw.BeginInit();
			gBoxLna.SuspendLayout();
			panel5.SuspendLayout();
			panel6.SuspendLayout();
			gBoxDagc.SuspendLayout();
			panel11.SuspendLayout();
			base.SuspendLayout();
			errorProvider.ContainerControl = this;
			label4.AutoSize = true;
			label4.Location = new Point(11, 0x56);
			label4.Name = "label4";
			label4.Size = new Size(0x56, 13);
			label4.TabIndex = 6;
			label4.Text = "Mixer low-power:";
			lblAGC.AutoSize = true;
			lblAGC.Location = new Point(11, 30);
			lblAGC.Name = "lblAGC";
			lblAGC.Size = new Size(0x59, 13);
			lblAGC.TabIndex = 0;
			lblAGC.Text = "Input impedance:";
			panel3.AutoSize = true;
			panel3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			panel3.Controls.Add(rBtnLnaZin200);
			panel3.Controls.Add(rBtnLnaZin50);
			panel3.Location = new Point(0x6a, 0x13);
			panel3.Name = "panel3";
			panel3.Size = new Size(0x31, 0x22);
			panel3.TabIndex = 1;
			rBtnLnaZin200.AutoSize = true;
			rBtnLnaZin200.Location = new Point(3, 0x11);
			rBtnLnaZin200.Margin = new Padding(3, 0, 3, 0);
			rBtnLnaZin200.Name = "rBtnLnaZin200";
			rBtnLnaZin200.Size = new Size(0x2b, 0x11);
			rBtnLnaZin200.TabIndex = 1;
			rBtnLnaZin200.Text = "200";
			rBtnLnaZin200.UseVisualStyleBackColor = true;
			rBtnLnaZin200.CheckedChanged += new EventHandler(rBtnLnaZin_CheckedChanged);
			rBtnLnaZin50.AutoSize = true;
			rBtnLnaZin50.Checked = true;
			rBtnLnaZin50.Location = new Point(3, 0);
			rBtnLnaZin50.Margin = new Padding(3, 0, 3, 0);
			rBtnLnaZin50.Name = "rBtnLnaZin50";
			rBtnLnaZin50.Size = new Size(0x25, 0x11);
			rBtnLnaZin50.TabIndex = 0;
			rBtnLnaZin50.TabStop = true;
			rBtnLnaZin50.Text = "50";
			rBtnLnaZin50.UseVisualStyleBackColor = true;
			rBtnLnaZin50.CheckedChanged += new EventHandler(rBtnLnaZin_CheckedChanged);
			panel4.AutoSize = true;
			panel4.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			panel4.Controls.Add(rBtnLnaLowPowerOff);
			panel4.Controls.Add(rBtnLnaLowPowerOn);
			panel4.Location = new Point(0x6a, 0x54);
			panel4.Name = "panel4";
			panel4.Size = new Size(0x5d, 0x11);
			panel4.TabIndex = 5;
			rBtnLnaLowPowerOff.AutoSize = true;
			rBtnLnaLowPowerOff.BackColor = Color.Transparent;
			rBtnLnaLowPowerOff.Location = new Point(0x2d, 0);
			rBtnLnaLowPowerOff.Margin = new Padding(3, 0, 3, 0);
			rBtnLnaLowPowerOff.Name = "rBtnLnaLowPowerOff";
			rBtnLnaLowPowerOff.Size = new Size(0x2d, 0x11);
			rBtnLnaLowPowerOff.TabIndex = 1;
			rBtnLnaLowPowerOff.Text = "OFF";
			rBtnLnaLowPowerOff.UseVisualStyleBackColor = false;
			rBtnLnaLowPowerOff.CheckedChanged += new EventHandler(rBtnLnaLowPower_CheckedChanged);
			rBtnLnaLowPowerOn.AutoSize = true;
			rBtnLnaLowPowerOn.BackColor = Color.Transparent;
			rBtnLnaLowPowerOn.Checked = true;
			rBtnLnaLowPowerOn.Location = new Point(3, 0);
			rBtnLnaLowPowerOn.Margin = new Padding(3, 0, 3, 0);
			rBtnLnaLowPowerOn.Name = "rBtnLnaLowPowerOn";
			rBtnLnaLowPowerOn.Size = new Size(0x29, 0x11);
			rBtnLnaLowPowerOn.TabIndex = 0;
			rBtnLnaLowPowerOn.TabStop = true;
			rBtnLnaLowPowerOn.Text = "ON";
			rBtnLnaLowPowerOn.UseVisualStyleBackColor = false;
			rBtnLnaLowPowerOn.CheckedChanged += new EventHandler(rBtnLnaLowPower_CheckedChanged);
			label7.AutoSize = true;
			label7.BackColor = Color.Transparent;
			label7.Location = new Point(0xa1, 30);
			label7.Name = "label7";
			label7.Size = new Size(0x20, 13);
			label7.TabIndex = 2;
			label7.Text = "ohms";
			lblSensitivityBoost.AutoSize = true;
			lblSensitivityBoost.Location = new Point(11, 0x3d);
			lblSensitivityBoost.Name = "lblSensitivityBoost";
			lblSensitivityBoost.Size = new Size(0x56, 13);
			lblSensitivityBoost.TabIndex = 3;
			lblSensitivityBoost.Text = "Sensitivity boost:";
			pnlSensitivityBoost.AutoSize = true;
			pnlSensitivityBoost.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			pnlSensitivityBoost.Controls.Add(rBtnSensitivityBoostOff);
			pnlSensitivityBoost.Controls.Add(rBtnSensitivityBoostOn);
			pnlSensitivityBoost.Location = new Point(0x6a, 0x3b);
			pnlSensitivityBoost.Name = "pnlSensitivityBoost";
			pnlSensitivityBoost.Size = new Size(0x5d, 0x11);
			pnlSensitivityBoost.TabIndex = 4;
			rBtnSensitivityBoostOff.AutoSize = true;
			rBtnSensitivityBoostOff.Location = new Point(0x2d, 0);
			rBtnSensitivityBoostOff.Margin = new Padding(3, 0, 3, 0);
			rBtnSensitivityBoostOff.Name = "rBtnSensitivityBoostOff";
			rBtnSensitivityBoostOff.Size = new Size(0x2d, 0x11);
			rBtnSensitivityBoostOff.TabIndex = 1;
			rBtnSensitivityBoostOff.Text = "OFF";
			rBtnSensitivityBoostOff.UseVisualStyleBackColor = true;
			rBtnSensitivityBoostOff.CheckedChanged += new EventHandler(rBtnSensitivityBoost_CheckedChanged);
			rBtnSensitivityBoostOn.AutoSize = true;
			rBtnSensitivityBoostOn.Checked = true;
			rBtnSensitivityBoostOn.Location = new Point(3, 0);
			rBtnSensitivityBoostOn.Margin = new Padding(3, 0, 3, 0);
			rBtnSensitivityBoostOn.Name = "rBtnSensitivityBoostOn";
			rBtnSensitivityBoostOn.Size = new Size(0x29, 0x11);
			rBtnSensitivityBoostOn.TabIndex = 0;
			rBtnSensitivityBoostOn.TabStop = true;
			rBtnSensitivityBoostOn.Text = "ON";
			rBtnSensitivityBoostOn.UseVisualStyleBackColor = true;
			rBtnSensitivityBoostOn.CheckedChanged += new EventHandler(rBtnSensitivityBoost_CheckedChanged);
			gBoxLnaSensitivity.Controls.Add(panel3);
			gBoxLnaSensitivity.Controls.Add(lblSensitivityBoost);
			gBoxLnaSensitivity.Controls.Add(lblAGC);
			gBoxLnaSensitivity.Controls.Add(pnlSensitivityBoost);
			gBoxLnaSensitivity.Controls.Add(label4);
			gBoxLnaSensitivity.Controls.Add(label7);
			gBoxLnaSensitivity.Controls.Add(panel4);
			gBoxLnaSensitivity.Location = new Point(0x249, 3);
			gBoxLnaSensitivity.Name = "gBoxLnaSensitivity";
			gBoxLnaSensitivity.Size = new Size(0xd3, 0x70);
			gBoxLnaSensitivity.TabIndex = 5;
			gBoxLnaSensitivity.TabStop = false;
			gBoxLnaSensitivity.Text = "Lna sensitivity";
			gBoxLnaSensitivity.MouseLeave += new EventHandler(control_MouseLeave);
			gBoxLnaSensitivity.MouseEnter += new EventHandler(control_MouseEnter);
			gBoxAgc.Controls.Add(panel2);
			gBoxAgc.Controls.Add(label5);
			gBoxAgc.Controls.Add(label8);
			gBoxAgc.Controls.Add(label24);
			gBoxAgc.Controls.Add(label25);
			gBoxAgc.Controls.Add(label26);
			gBoxAgc.Controls.Add(label27);
			gBoxAgc.Controls.Add(label28);
			gBoxAgc.Controls.Add(label1);
			gBoxAgc.Controls.Add(label2);
			gBoxAgc.Controls.Add(label3);
			gBoxAgc.Controls.Add(label29);
			gBoxAgc.Controls.Add(label30);
			gBoxAgc.Controls.Add(label31);
			gBoxAgc.Controls.Add(label32);
			gBoxAgc.Controls.Add(label33);
			gBoxAgc.Controls.Add(nudAgcStep5);
			gBoxAgc.Controls.Add(nudAgcSnrMargin);
			gBoxAgc.Controls.Add(nudAgcStep4);
			gBoxAgc.Controls.Add(nudAgcRefLevel);
			gBoxAgc.Controls.Add(nudAgcStep3);
			gBoxAgc.Controls.Add(nudAgcStep1);
			gBoxAgc.Controls.Add(nudAgcStep2);
			gBoxAgc.Location = new Point(0x249, 0x79);
			gBoxAgc.Name = "gBoxAgc";
			gBoxAgc.Size = new Size(0xd3, 0xfb);
			gBoxAgc.TabIndex = 6;
			gBoxAgc.TabStop = false;
			gBoxAgc.Text = "AGC";
			gBoxAgc.MouseLeave += new EventHandler(control_MouseLeave);
			gBoxAgc.MouseEnter += new EventHandler(control_MouseEnter);
			panel2.AutoSize = true;
			panel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			panel2.Controls.Add(rBtnAgcAutoRefOff);
			panel2.Controls.Add(rBtnAgcAutoRefOn);
			panel2.Location = new Point(110, 0x17);
			panel2.Name = "panel2";
			panel2.Size = new Size(0x33, 0x22);
			panel2.TabIndex = 1;
			rBtnAgcAutoRefOff.AutoSize = true;
			rBtnAgcAutoRefOff.Location = new Point(3, 0x11);
			rBtnAgcAutoRefOff.Margin = new Padding(3, 0, 3, 0);
			rBtnAgcAutoRefOff.Name = "rBtnAgcAutoRefOff";
			rBtnAgcAutoRefOff.Size = new Size(0x2d, 0x11);
			rBtnAgcAutoRefOff.TabIndex = 1;
			rBtnAgcAutoRefOff.Text = "OFF";
			rBtnAgcAutoRefOff.UseVisualStyleBackColor = true;
			rBtnAgcAutoRefOff.CheckedChanged += new EventHandler(rBtnAgcAutoRef_CheckedChanged);
			rBtnAgcAutoRefOn.AutoSize = true;
			rBtnAgcAutoRefOn.Checked = true;
			rBtnAgcAutoRefOn.Location = new Point(3, 0);
			rBtnAgcAutoRefOn.Margin = new Padding(3, 0, 3, 0);
			rBtnAgcAutoRefOn.Name = "rBtnAgcAutoRefOn";
			rBtnAgcAutoRefOn.Size = new Size(0x29, 0x11);
			rBtnAgcAutoRefOn.TabIndex = 0;
			rBtnAgcAutoRefOn.TabStop = true;
			rBtnAgcAutoRefOn.Text = "ON";
			rBtnAgcAutoRefOn.UseVisualStyleBackColor = true;
			rBtnAgcAutoRefOn.CheckedChanged += new EventHandler(rBtnAgcAutoRef_CheckedChanged);
			label5.AutoSize = true;
			label5.Location = new Point(15, 0x22);
			label5.Name = "label5";
			label5.Size = new Size(80, 13);
			label5.TabIndex = 0;
			label5.Text = "Auto reference:";
			label8.AutoSize = true;
			label8.BackColor = Color.Transparent;
			label8.Location = new Point(15, 0x41);
			label8.Name = "label8";
			label8.Size = new Size(0x59, 13);
			label8.TabIndex = 2;
			label8.Text = "Reference Level:";
			label24.AutoSize = true;
			label24.BackColor = Color.Transparent;
			label24.Location = new Point(15, 0x75);
			label24.Name = "label24";
			label24.Size = new Size(0x59, 13);
			label24.TabIndex = 8;
			label24.Text = "Threshold step 1:";
			label25.AutoSize = true;
			label25.BackColor = Color.Transparent;
			label25.Location = new Point(15, 0x8f);
			label25.Name = "label25";
			label25.Size = new Size(0x59, 13);
			label25.TabIndex = 11;
			label25.Text = "Threshold step 2:";
			label26.AutoSize = true;
			label26.BackColor = Color.Transparent;
			label26.Location = new Point(15, 0xa9);
			label26.Name = "label26";
			label26.Size = new Size(0x59, 13);
			label26.TabIndex = 14;
			label26.Text = "Threshold step 3:";
			label27.AutoSize = true;
			label27.BackColor = Color.Transparent;
			label27.Location = new Point(15, 0xc3);
			label27.Name = "label27";
			label27.Size = new Size(0x59, 13);
			label27.TabIndex = 0x11;
			label27.Text = "Threshold step 4:";
			label28.AutoSize = true;
			label28.BackColor = Color.Transparent;
			label28.Location = new Point(15, 0xdd);
			label28.Name = "label28";
			label28.Size = new Size(0x59, 13);
			label28.TabIndex = 20;
			label28.Text = "Threshold step 5:";
			label1.AutoSize = true;
			label1.BackColor = Color.Transparent;
			label1.Location = new Point(0xa7, 0x41);
			label1.Name = "label1";
			label1.Size = new Size(0x1c, 13);
			label1.TabIndex = 4;
			label1.Text = "dBm";
			label2.AutoSize = true;
			label2.Location = new Point(15, 0x5d);
			label2.Name = "label2";
			label2.Size = new Size(0x43, 13);
			label2.TabIndex = 5;
			label2.Text = "SNR margin:";
			label3.AutoSize = true;
			label3.BackColor = Color.Transparent;
			label3.Location = new Point(0xa7, 0x5c);
			label3.Name = "label3";
			label3.Size = new Size(20, 13);
			label3.TabIndex = 7;
			label3.Text = "dB";
			label29.AutoSize = true;
			label29.BackColor = Color.Transparent;
			label29.Location = new Point(0xa7, 0x76);
			label29.Name = "label29";
			label29.Size = new Size(20, 13);
			label29.TabIndex = 10;
			label29.Text = "dB";
			label30.AutoSize = true;
			label30.BackColor = Color.Transparent;
			label30.Location = new Point(0xa7, 0x90);
			label30.Name = "label30";
			label30.Size = new Size(20, 13);
			label30.TabIndex = 13;
			label30.Text = "dB";
			label31.AutoSize = true;
			label31.BackColor = Color.Transparent;
			label31.Location = new Point(0xa7, 170);
			label31.Name = "label31";
			label31.Size = new Size(20, 13);
			label31.TabIndex = 0x10;
			label31.Text = "dB";
			label32.AutoSize = true;
			label32.BackColor = Color.Transparent;
			label32.Location = new Point(0xa7, 0xc4);
			label32.Name = "label32";
			label32.Size = new Size(20, 13);
			label32.TabIndex = 0x13;
			label32.Text = "dB";
			label33.AutoSize = true;
			label33.BackColor = Color.Transparent;
			label33.Location = new Point(0xa7, 0xde);
			label33.Name = "label33";
			label33.Size = new Size(20, 13);
			label33.TabIndex = 0x16;
			label33.Text = "dB";
			nudAgcStep5.Location = new Point(110, 0xdb);
			int[] bits = new int[4];
			bits[0] = 15;
			nudAgcStep5.Maximum = new decimal(bits);
			nudAgcStep5.Name = "nudAgcStep5";
			nudAgcStep5.Size = new Size(0x33, 20);
			nudAgcStep5.TabIndex = 0x15;
			int[] numArray2 = new int[4];
			numArray2[0] = 11;
			nudAgcStep5.Value = new decimal(numArray2);
			nudAgcStep5.ValueChanged += new EventHandler(nudAgcStep_ValueChanged);
			nudAgcSnrMargin.Location = new Point(110, 0x59);
			int[] numArray3 = new int[4];
			numArray3[0] = 7;
			nudAgcSnrMargin.Maximum = new decimal(numArray3);
			nudAgcSnrMargin.Name = "nudAgcSnrMargin";
			nudAgcSnrMargin.Size = new Size(0x33, 20);
			nudAgcSnrMargin.TabIndex = 6;
			nudAgcSnrMargin.ThousandsSeparator = true;
			int[] numArray4 = new int[4];
			numArray4[0] = 5;
			nudAgcSnrMargin.Value = new decimal(numArray4);
			nudAgcSnrMargin.ValueChanged += new EventHandler(nudAgcSnrMargin_ValueChanged);
			nudAgcStep4.Location = new Point(110, 0xc1);
			int[] numArray5 = new int[4];
			numArray5[0] = 15;
			nudAgcStep4.Maximum = new decimal(numArray5);
			nudAgcStep4.Name = "nudAgcStep4";
			nudAgcStep4.Size = new Size(0x33, 20);
			nudAgcStep4.TabIndex = 0x12;
			int[] numArray6 = new int[4];
			numArray6[0] = 9;
			nudAgcStep4.Value = new decimal(numArray6);
			nudAgcStep4.ValueChanged += new EventHandler(nudAgcStep_ValueChanged);
			nudAgcRefLevel.Location = new Point(110, 0x3f);
			int[] numArray7 = new int[4];
			numArray7[0] = 80;
			numArray7[3] = -2147483648;
			nudAgcRefLevel.Maximum = new decimal(numArray7);
			int[] numArray8 = new int[4];
			numArray8[0] = 0x8f;
			numArray8[3] = -2147483648;
			nudAgcRefLevel.Minimum = new decimal(numArray8);
			nudAgcRefLevel.Name = "nudAgcRefLevel";
			nudAgcRefLevel.Size = new Size(0x33, 20);
			nudAgcRefLevel.TabIndex = 3;
			nudAgcRefLevel.ThousandsSeparator = true;
			int[] numArray9 = new int[4];
			numArray9[0] = 80;
			numArray9[3] = -2147483648;
			nudAgcRefLevel.Value = new decimal(numArray9);
			nudAgcRefLevel.ValueChanged += new EventHandler(nudAgcRefLevel_ValueChanged);
			nudAgcStep3.Location = new Point(110, 0xa7);
			int[] numArray10 = new int[4];
			numArray10[0] = 15;
			nudAgcStep3.Maximum = new decimal(numArray10);
			nudAgcStep3.Name = "nudAgcStep3";
			nudAgcStep3.Size = new Size(0x33, 20);
			nudAgcStep3.TabIndex = 15;
			int[] numArray11 = new int[4];
			numArray11[0] = 11;
			nudAgcStep3.Value = new decimal(numArray11);
			nudAgcStep3.ValueChanged += new EventHandler(nudAgcStep_ValueChanged);
			nudAgcStep1.Location = new Point(110, 0x73);
			int[] numArray12 = new int[4];
			numArray12[0] = 0x1f;
			nudAgcStep1.Maximum = new decimal(numArray12);
			nudAgcStep1.Name = "nudAgcStep1";
			nudAgcStep1.Size = new Size(0x33, 20);
			nudAgcStep1.TabIndex = 9;
			int[] numArray13 = new int[4];
			numArray13[0] = 0x10;
			nudAgcStep1.Value = new decimal(numArray13);
			nudAgcStep1.ValueChanged += new EventHandler(nudAgcStep_ValueChanged);
			nudAgcStep2.Location = new Point(110, 0x8d);
			int[] numArray14 = new int[4];
			numArray14[0] = 15;
			nudAgcStep2.Maximum = new decimal(numArray14);
			nudAgcStep2.Name = "nudAgcStep2";
			nudAgcStep2.Size = new Size(0x33, 20);
			nudAgcStep2.TabIndex = 12;
			int[] numArray15 = new int[4];
			numArray15[0] = 7;
			nudAgcStep2.Value = new decimal(numArray15);
			nudAgcStep2.ValueChanged += new EventHandler(nudAgcStep_ValueChanged);
			gBoxRssi.Controls.Add(pnlRssiPhase);
			gBoxRssi.Controls.Add(label23);
			gBoxRssi.Controls.Add(btnRestartRx);
			gBoxRssi.Controls.Add(panel7);
			gBoxRssi.Controls.Add(label21);
			gBoxRssi.Controls.Add(btnRssiRead);
			gBoxRssi.Controls.Add(label17);
			gBoxRssi.Controls.Add(label54);
			gBoxRssi.Controls.Add(label55);
			gBoxRssi.Controls.Add(label56);
			gBoxRssi.Controls.Add(lblRssiValue);
			gBoxRssi.Controls.Add(nudRssiThresh);
			gBoxRssi.Controls.Add(ledRssiDone);
			gBoxRssi.Controls.Add(panel1);
			gBoxRssi.Controls.Add(label6);
			gBoxRssi.Controls.Add(nudTimeoutRxStart);
			gBoxRssi.Controls.Add(label9);
			gBoxRssi.Controls.Add(label14);
			gBoxRssi.Controls.Add(label11);
			gBoxRssi.Controls.Add(label15);
			gBoxRssi.Controls.Add(nudTimeoutRssiThresh);
			gBoxRssi.Location = new Point(0x126, 0xb1);
			gBoxRssi.Name = "gBoxRssi";
			gBoxRssi.Size = new Size(0x11d, 0xc3);
			gBoxRssi.TabIndex = 4;
			gBoxRssi.TabStop = false;
			gBoxRssi.Text = "RSSI";
			gBoxRssi.MouseLeave += new EventHandler(control_MouseLeave);
			gBoxRssi.MouseEnter += new EventHandler(control_MouseEnter);
			pnlRssiPhase.AutoSize = true;
			pnlRssiPhase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			pnlRssiPhase.Controls.Add(rBtnRssiPhaseManual);
			pnlRssiPhase.Controls.Add(rBtnRssiPhaseAuto);
			pnlRssiPhase.Location = new Point(0x85, 0xa8);
			pnlRssiPhase.Margin = new Padding(3, 2, 3, 2);
			pnlRssiPhase.Name = "pnlRssiPhase";
			pnlRssiPhase.Size = new Size(0x77, 20);
			pnlRssiPhase.TabIndex = 20;
			rBtnRssiPhaseManual.AutoSize = true;
			rBtnRssiPhaseManual.Location = new Point(0x38, 3);
			rBtnRssiPhaseManual.Margin = new Padding(3, 0, 3, 0);
			rBtnRssiPhaseManual.Name = "rBtnRssiPhaseManual";
			rBtnRssiPhaseManual.Size = new Size(60, 0x11);
			rBtnRssiPhaseManual.TabIndex = 1;
			rBtnRssiPhaseManual.Text = "Manual";
			rBtnRssiPhaseManual.UseVisualStyleBackColor = true;
			rBtnRssiPhaseManual.CheckedChanged += new EventHandler(rBtnRssiPhaseManual_CheckedChanged);
			rBtnRssiPhaseAuto.AutoSize = true;
			rBtnRssiPhaseAuto.Checked = true;
			rBtnRssiPhaseAuto.Location = new Point(3, 3);
			rBtnRssiPhaseAuto.Margin = new Padding(3, 0, 3, 0);
			rBtnRssiPhaseAuto.Name = "rBtnRssiPhaseAuto";
			rBtnRssiPhaseAuto.Size = new Size(0x2f, 0x11);
			rBtnRssiPhaseAuto.TabIndex = 0;
			rBtnRssiPhaseAuto.TabStop = true;
			rBtnRssiPhaseAuto.Text = "Auto";
			rBtnRssiPhaseAuto.UseVisualStyleBackColor = true;
			rBtnRssiPhaseAuto.CheckedChanged += new EventHandler(rBtnRssiPhaseAuto_CheckedChanged);
			label23.AutoSize = true;
			label23.Location = new Point(6, 0xac);
			label23.Name = "label23";
			label23.Size = new Size(40, 13);
			label23.TabIndex = 0x12;
			label23.Text = "Phase:";
			label23.TextAlign = ContentAlignment.MiddleLeft;
			btnRestartRx.Location = new Point(60, 0xa7);
			btnRestartRx.Name = "btnRestartRx";
			btnRestartRx.Size = new Size(0x43, 0x17);
			btnRestartRx.TabIndex = 0x13;
			btnRestartRx.Text = "Restart Rx";
			btnRestartRx.UseVisualStyleBackColor = true;
			btnRestartRx.Click += new EventHandler(btnRestartRx_Click);
			panel7.AutoSize = true;
			panel7.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			panel7.Controls.Add(rBtnFastRxOff);
			panel7.Controls.Add(rBtnFastRxOn);
			panel7.Location = new Point(0x85, 0x13);
			panel7.Name = "panel7";
			panel7.Size = new Size(0x62, 0x11);
			panel7.TabIndex = 1;
			rBtnFastRxOff.AutoSize = true;
			rBtnFastRxOff.Location = new Point(50, 0);
			rBtnFastRxOff.Margin = new Padding(3, 0, 3, 0);
			rBtnFastRxOff.Name = "rBtnFastRxOff";
			rBtnFastRxOff.Size = new Size(0x2d, 0x11);
			rBtnFastRxOff.TabIndex = 1;
			rBtnFastRxOff.Text = "OFF";
			rBtnFastRxOff.UseVisualStyleBackColor = true;
			rBtnFastRxOn.AutoSize = true;
			rBtnFastRxOn.Checked = true;
			rBtnFastRxOn.Location = new Point(3, 0);
			rBtnFastRxOn.Margin = new Padding(3, 0, 3, 0);
			rBtnFastRxOn.Name = "rBtnFastRxOn";
			rBtnFastRxOn.Size = new Size(0x29, 0x11);
			rBtnFastRxOn.TabIndex = 0;
			rBtnFastRxOn.TabStop = true;
			rBtnFastRxOn.Text = "ON";
			rBtnFastRxOn.UseVisualStyleBackColor = true;
			rBtnFastRxOn.CheckedChanged += new EventHandler(rBtnFastRx_CheckedChanged);
			label21.AutoSize = true;
			label21.Location = new Point(3, 0x15);
			label21.Name = "label21";
			label21.Size = new Size(0x57, 13);
			label21.TabIndex = 0;
			label21.Text = "Fast Rx wakeup:";
			btnRssiRead.Location = new Point(0x56, 0x8e);
			btnRssiRead.Name = "btnRssiRead";
			btnRssiRead.Size = new Size(0x29, 0x17);
			btnRssiRead.TabIndex = 14;
			btnRssiRead.Text = "Read";
			btnRssiRead.UseVisualStyleBackColor = true;
			btnRssiRead.Visible = false;
			btnRssiRead.Click += new EventHandler(btnRssiStart_Click);
			label17.AutoSize = true;
			label17.BackColor = Color.Transparent;
			label17.Location = new Point(0xff, 0x79);
			label17.Name = "label17";
			label17.Size = new Size(0x1c, 13);
			label17.TabIndex = 12;
			label17.Text = "dBm";
			label17.TextAlign = ContentAlignment.MiddleCenter;
			label54.AutoSize = true;
			label54.BackColor = Color.Transparent;
			label54.Location = new Point(0xff, 0x93);
			label54.Name = "label54";
			label54.Size = new Size(0x1c, 13);
			label54.TabIndex = 0x11;
			label54.Text = "dBm";
			label54.TextAlign = ContentAlignment.MiddleCenter;
			label55.AutoSize = true;
			label55.BackColor = Color.Transparent;
			label55.Location = new Point(3, 0x79);
			label55.Margin = new Padding(0);
			label55.Name = "label55";
			label55.Size = new Size(0x39, 13);
			label55.TabIndex = 10;
			label55.Text = "Threshold:";
			label55.TextAlign = ContentAlignment.MiddleCenter;
			label56.AutoSize = true;
			label56.BackColor = Color.Transparent;
			label56.Location = new Point(3, 0x93);
			label56.Margin = new Padding(0);
			label56.Name = "label56";
			label56.Size = new Size(0x25, 13);
			label56.TabIndex = 13;
			label56.Text = "Value:";
			label56.TextAlign = ContentAlignment.MiddleCenter;
			lblRssiValue.BackColor = Color.Transparent;
			lblRssiValue.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			lblRssiValue.Location = new Point(0x85, 0x8f);
			lblRssiValue.Margin = new Padding(3);
			lblRssiValue.Name = "lblRssiValue";
			lblRssiValue.Size = new Size(0x62, 20);
			lblRssiValue.TabIndex = 15;
			lblRssiValue.Text = "0";
			lblRssiValue.TextAlign = ContentAlignment.MiddleCenter;
			nudRssiThresh.DecimalPlaces = 1;
			nudRssiThresh.Enabled = false;
			int[] numArray16 = new int[4];
			numArray16[0] = 5;
			numArray16[3] = 0x10000;
			nudRssiThresh.Increment = new decimal(numArray16);
			nudRssiThresh.Location = new Point(0x85, 0x75);
			int[] numArray17 = new int[4];
			nudRssiThresh.Maximum = new decimal(numArray17);
			int[] numArray18 = new int[4];
			numArray18[0] = 0x4fb;
			numArray18[3] = -2147418112;
			nudRssiThresh.Minimum = new decimal(numArray18);
			nudRssiThresh.Name = "nudRssiThresh";
			nudRssiThresh.Size = new Size(0x62, 20);
			nudRssiThresh.TabIndex = 11;
			nudRssiThresh.ThousandsSeparator = true;
			int[] numArray19 = new int[4];
			numArray19[0] = 80;
			numArray19[3] = -2147483648;
			nudRssiThresh.Value = new decimal(numArray19);
			nudRssiThresh.ValueChanged += new EventHandler(nudRssiThresh_ValueChanged);
			ledRssiDone.BackColor = Color.Transparent;
			ledRssiDone.LedColor = Color.Green;
			ledRssiDone.LedSize = new Size(11, 11);
			ledRssiDone.Location = new Point(0xea, 0x92);
			ledRssiDone.Name = "ledRssiDone";
			ledRssiDone.Size = new Size(15, 15);
			ledRssiDone.TabIndex = 0x10;
			ledRssiDone.Text = "led1";
			panel1.AutoSize = true;
			panel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			panel1.Controls.Add(rBtnRssiAutoThreshOff);
			panel1.Controls.Add(rBtnRssiAutoThreshOn);
			panel1.Location = new Point(0x85, 0x5e);
			panel1.Name = "panel1";
			panel1.Size = new Size(0x62, 0x11);
			panel1.TabIndex = 9;
			rBtnRssiAutoThreshOff.AutoSize = true;
			rBtnRssiAutoThreshOff.Location = new Point(50, 0);
			rBtnRssiAutoThreshOff.Margin = new Padding(3, 0, 3, 0);
			rBtnRssiAutoThreshOff.Name = "rBtnRssiAutoThreshOff";
			rBtnRssiAutoThreshOff.Size = new Size(0x2d, 0x11);
			rBtnRssiAutoThreshOff.TabIndex = 1;
			rBtnRssiAutoThreshOff.Text = "OFF";
			rBtnRssiAutoThreshOff.UseVisualStyleBackColor = true;
			rBtnRssiAutoThreshOff.CheckedChanged += new EventHandler(rBtnRssiAutoThreshOn_CheckedChanged);
			rBtnRssiAutoThreshOn.AutoSize = true;
			rBtnRssiAutoThreshOn.Checked = true;
			rBtnRssiAutoThreshOn.Location = new Point(3, 0);
			rBtnRssiAutoThreshOn.Margin = new Padding(3, 0, 3, 0);
			rBtnRssiAutoThreshOn.Name = "rBtnRssiAutoThreshOn";
			rBtnRssiAutoThreshOn.Size = new Size(0x29, 0x11);
			rBtnRssiAutoThreshOn.TabIndex = 0;
			rBtnRssiAutoThreshOn.TabStop = true;
			rBtnRssiAutoThreshOn.Text = "ON";
			rBtnRssiAutoThreshOn.UseVisualStyleBackColor = true;
			rBtnRssiAutoThreshOn.CheckedChanged += new EventHandler(rBtnRssiAutoThreshOn_CheckedChanged);
			label6.AutoSize = true;
			label6.Location = new Point(3, 0x60);
			label6.Name = "label6";
			label6.Size = new Size(0x4e, 13);
			label6.TabIndex = 8;
			label6.Text = "Auto threshold:";
			nudTimeoutRxStart.Location = new Point(0x85, 0x2a);
			int[] numArray20 = new int[4];
			numArray20[0] = 850;
			nudTimeoutRxStart.Maximum = new decimal(numArray20);
			nudTimeoutRxStart.Name = "nudTimeoutRxStart";
			nudTimeoutRxStart.Size = new Size(0x62, 20);
			nudTimeoutRxStart.TabIndex = 3;
			nudTimeoutRxStart.ThousandsSeparator = true;
			nudTimeoutRxStart.ValueChanged += new EventHandler(nudTimeoutRxStart_ValueChanged);
			label9.AutoSize = true;
			label9.Location = new Point(3, 0x2e);
			label9.Name = "label9";
			label9.Size = new Size(0x57, 13);
			label9.TabIndex = 2;
			label9.Text = "Timeout Rx start:";
			label14.AutoSize = true;
			label14.Location = new Point(3, 0x48);
			label14.Name = "label14";
			label14.Size = new Size(0x5e, 13);
			label14.TabIndex = 5;
			label14.Text = "Timeout threshold:";
			label11.AutoSize = true;
			label11.Location = new Point(0xff, 0x2e);
			label11.Name = "label11";
			label11.Size = new Size(20, 13);
			label11.TabIndex = 4;
			label11.Text = "ms";
			label15.AutoSize = true;
			label15.Location = new Point(0xff, 0x48);
			label15.Name = "label15";
			label15.Size = new Size(20, 13);
			label15.TabIndex = 7;
			label15.Text = "ms";
			nudTimeoutRssiThresh.Location = new Point(0x85, 0x44);
			int[] numArray21 = new int[4];
			numArray21[0] = 850;
			nudTimeoutRssiThresh.Maximum = new decimal(numArray21);
			nudTimeoutRssiThresh.Name = "nudTimeoutRssiThresh";
			nudTimeoutRssiThresh.Size = new Size(0x62, 20);
			nudTimeoutRssiThresh.TabIndex = 6;
			nudTimeoutRssiThresh.ThousandsSeparator = true;
			nudTimeoutRssiThresh.ValueChanged += new EventHandler(nudTimeoutRssiThresh_ValueChanged);
			gBoxAfcFei.Controls.Add(nudLowBetaAfcOffset);
			gBoxAfcFei.Controls.Add(lblLowBetaAfcOffset);
			gBoxAfcFei.Controls.Add(lblAfcLowBeta);
			gBoxAfcFei.Controls.Add(label19);
			gBoxAfcFei.Controls.Add(lblLowBetaAfcOfssetUnit);
			gBoxAfcFei.Controls.Add(label20);
			gBoxAfcFei.Controls.Add(pnlAfcLowBeta);
			gBoxAfcFei.Controls.Add(btnFeiRead);
			gBoxAfcFei.Controls.Add(panel8);
			gBoxAfcFei.Controls.Add(ledFeiDone);
			gBoxAfcFei.Controls.Add(panel9);
			gBoxAfcFei.Controls.Add(lblFeiValue);
			gBoxAfcFei.Controls.Add(label12);
			gBoxAfcFei.Controls.Add(label18);
			gBoxAfcFei.Controls.Add(label10);
			gBoxAfcFei.Controls.Add(btnAfcClear);
			gBoxAfcFei.Controls.Add(btnAfcStart);
			gBoxAfcFei.Controls.Add(ledAfcDone);
			gBoxAfcFei.Controls.Add(lblAfcValue);
			gBoxAfcFei.Controls.Add(label22);
			gBoxAfcFei.Location = new Point(0x126, 3);
			gBoxAfcFei.Name = "gBoxAfcFei";
			gBoxAfcFei.Size = new Size(0x11d, 0xa8);
			gBoxAfcFei.TabIndex = 3;
			gBoxAfcFei.TabStop = false;
			gBoxAfcFei.Text = "AFC / FEI";
			gBoxAfcFei.MouseLeave += new EventHandler(control_MouseLeave);
			gBoxAfcFei.MouseEnter += new EventHandler(control_MouseEnter);
			int[] numArray22 = new int[4];
			numArray22[0] = 0x1e8;
			nudLowBetaAfcOffset.Increment = new decimal(numArray22);
			nudLowBetaAfcOffset.Location = new Point(0x85, 0x2a);
			int[] numArray23 = new int[4];
			numArray23[0] = 0xf218;
			nudLowBetaAfcOffset.Maximum = new decimal(numArray23);
			int[] numArray24 = new int[4];
			numArray24[0] = 0xf400;
			numArray24[3] = -2147483648;
			nudLowBetaAfcOffset.Minimum = new decimal(numArray24);
			nudLowBetaAfcOffset.Name = "nudLowBetaAfcOffset";
			nudLowBetaAfcOffset.Size = new Size(0x62, 20);
			nudLowBetaAfcOffset.TabIndex = 2;
			nudLowBetaAfcOffset.ThousandsSeparator = true;
			nudLowBetaAfcOffset.ValueChanged += new EventHandler(nudLowBetaAfcOffset_ValueChanged);
			lblLowBetaAfcOffset.AutoSize = true;
			lblLowBetaAfcOffset.Location = new Point(3, 0x2c);
			lblLowBetaAfcOffset.Name = "lblLowBetaAfcOffset";
			lblLowBetaAfcOffset.Size = new Size(0x66, 13);
			lblLowBetaAfcOffset.TabIndex = 3;
			lblLowBetaAfcOffset.Text = "AFC low beta offset:";
			lblAfcLowBeta.AutoSize = true;
			lblAfcLowBeta.Location = new Point(3, 0x15);
			lblAfcLowBeta.Name = "lblAfcLowBeta";
			lblAfcLowBeta.Size = new Size(0x49, 13);
			lblAfcLowBeta.TabIndex = 0;
			lblAfcLowBeta.Text = "AFC low beta:";
			label19.AutoSize = true;
			label19.Location = new Point(3, 70);
			label19.Name = "label19";
			label19.Size = new Size(80, 13);
			label19.TabIndex = 5;
			label19.Text = "AFC auto clear:";
			lblLowBetaAfcOfssetUnit.AutoSize = true;
			lblLowBetaAfcOfssetUnit.Location = new Point(0xff, 0x2e);
			lblLowBetaAfcOfssetUnit.Name = "lblLowBetaAfcOfssetUnit";
			lblLowBetaAfcOfssetUnit.Size = new Size(20, 13);
			lblLowBetaAfcOfssetUnit.TabIndex = 4;
			lblLowBetaAfcOfssetUnit.Text = "Hz";
			label20.AutoSize = true;
			label20.Location = new Point(3, 0x5d);
			label20.Name = "label20";
			label20.Size = new Size(0x36, 13);
			label20.TabIndex = 8;
			label20.Text = "AFC auto:";
			pnlAfcLowBeta.AutoSize = true;
			pnlAfcLowBeta.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			pnlAfcLowBeta.Controls.Add(rBtnAfcLowBetaOff);
			pnlAfcLowBeta.Controls.Add(rBtnAfcLowBetaOn);
			pnlAfcLowBeta.Location = new Point(0x85, 0x13);
			pnlAfcLowBeta.Name = "pnlAfcLowBeta";
			pnlAfcLowBeta.Size = new Size(0x62, 0x11);
			pnlAfcLowBeta.TabIndex = 1;
			rBtnAfcLowBetaOff.AutoSize = true;
			rBtnAfcLowBetaOff.Location = new Point(50, 0);
			rBtnAfcLowBetaOff.Margin = new Padding(3, 0, 3, 0);
			rBtnAfcLowBetaOff.Name = "rBtnAfcLowBetaOff";
			rBtnAfcLowBetaOff.Size = new Size(0x2d, 0x11);
			rBtnAfcLowBetaOff.TabIndex = 1;
			rBtnAfcLowBetaOff.Text = "OFF";
			rBtnAfcLowBetaOff.UseVisualStyleBackColor = true;
			rBtnAfcLowBetaOff.CheckedChanged += new EventHandler(rBtnAfcLowBeta_CheckedChanged);
			rBtnAfcLowBetaOn.AutoSize = true;
			rBtnAfcLowBetaOn.Checked = true;
			rBtnAfcLowBetaOn.Location = new Point(3, 0);
			rBtnAfcLowBetaOn.Margin = new Padding(3, 0, 3, 0);
			rBtnAfcLowBetaOn.Name = "rBtnAfcLowBetaOn";
			rBtnAfcLowBetaOn.Size = new Size(0x29, 0x11);
			rBtnAfcLowBetaOn.TabIndex = 0;
			rBtnAfcLowBetaOn.TabStop = true;
			rBtnAfcLowBetaOn.Text = "ON";
			rBtnAfcLowBetaOn.UseVisualStyleBackColor = true;
			rBtnAfcLowBetaOn.CheckedChanged += new EventHandler(rBtnAfcLowBeta_CheckedChanged);
			btnFeiRead.Location = new Point(0x56, 0x8b);
			btnFeiRead.Name = "btnFeiRead";
			btnFeiRead.Size = new Size(0x29, 0x17);
			btnFeiRead.TabIndex = 0x10;
			btnFeiRead.Text = "Read";
			btnFeiRead.UseVisualStyleBackColor = true;
			btnFeiRead.Click += new EventHandler(btnFeiStart_Click);
			panel8.AutoSize = true;
			panel8.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			panel8.Controls.Add(rBtnAfcAutoClearOff);
			panel8.Controls.Add(rBtnAfcAutoClearOn);
			panel8.Location = new Point(0x85, 0x44);
			panel8.Name = "panel8";
			panel8.Size = new Size(0x62, 0x11);
			panel8.TabIndex = 6;
			rBtnAfcAutoClearOff.AutoSize = true;
			rBtnAfcAutoClearOff.Location = new Point(50, 0);
			rBtnAfcAutoClearOff.Margin = new Padding(3, 0, 3, 0);
			rBtnAfcAutoClearOff.Name = "rBtnAfcAutoClearOff";
			rBtnAfcAutoClearOff.Size = new Size(0x2d, 0x11);
			rBtnAfcAutoClearOff.TabIndex = 1;
			rBtnAfcAutoClearOff.Text = "OFF";
			rBtnAfcAutoClearOff.UseVisualStyleBackColor = true;
			rBtnAfcAutoClearOff.CheckedChanged += new EventHandler(rBtnAfcAutoClearOn_CheckedChanged);
			rBtnAfcAutoClearOn.AutoSize = true;
			rBtnAfcAutoClearOn.Checked = true;
			rBtnAfcAutoClearOn.Location = new Point(3, 0);
			rBtnAfcAutoClearOn.Margin = new Padding(3, 0, 3, 0);
			rBtnAfcAutoClearOn.Name = "rBtnAfcAutoClearOn";
			rBtnAfcAutoClearOn.Size = new Size(0x29, 0x11);
			rBtnAfcAutoClearOn.TabIndex = 0;
			rBtnAfcAutoClearOn.TabStop = true;
			rBtnAfcAutoClearOn.Text = "ON";
			rBtnAfcAutoClearOn.UseVisualStyleBackColor = true;
			rBtnAfcAutoClearOn.CheckedChanged += new EventHandler(rBtnAfcAutoClearOn_CheckedChanged);
			ledFeiDone.BackColor = Color.Transparent;
			ledFeiDone.LedColor = Color.Green;
			ledFeiDone.LedSize = new Size(11, 11);
			ledFeiDone.Location = new Point(0xea, 0x8f);
			ledFeiDone.Name = "ledFeiDone";
			ledFeiDone.Size = new Size(15, 15);
			ledFeiDone.TabIndex = 0x12;
			ledFeiDone.Text = "led1";
			panel9.AutoSize = true;
			panel9.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			panel9.Controls.Add(rBtnAfcAutoOff);
			panel9.Controls.Add(rBtnAfcAutoOn);
			panel9.Location = new Point(0x85, 0x5b);
			panel9.Name = "panel9";
			panel9.Size = new Size(0x62, 0x11);
			panel9.TabIndex = 7;
			rBtnAfcAutoOff.AutoSize = true;
			rBtnAfcAutoOff.Location = new Point(50, 0);
			rBtnAfcAutoOff.Margin = new Padding(3, 0, 3, 0);
			rBtnAfcAutoOff.Name = "rBtnAfcAutoOff";
			rBtnAfcAutoOff.Size = new Size(0x2d, 0x11);
			rBtnAfcAutoOff.TabIndex = 1;
			rBtnAfcAutoOff.Text = "OFF";
			rBtnAfcAutoOff.UseVisualStyleBackColor = true;
			rBtnAfcAutoOff.CheckedChanged += new EventHandler(rBtnAfcAutoOn_CheckedChanged);
			rBtnAfcAutoOn.AutoSize = true;
			rBtnAfcAutoOn.Checked = true;
			rBtnAfcAutoOn.Location = new Point(3, 0);
			rBtnAfcAutoOn.Margin = new Padding(3, 0, 3, 0);
			rBtnAfcAutoOn.Name = "rBtnAfcAutoOn";
			rBtnAfcAutoOn.Size = new Size(0x29, 0x11);
			rBtnAfcAutoOn.TabIndex = 0;
			rBtnAfcAutoOn.TabStop = true;
			rBtnAfcAutoOn.Text = "ON";
			rBtnAfcAutoOn.UseVisualStyleBackColor = true;
			rBtnAfcAutoOn.CheckedChanged += new EventHandler(rBtnAfcAutoOn_CheckedChanged);
			lblFeiValue.BackColor = Color.Transparent;
			lblFeiValue.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			lblFeiValue.Location = new Point(0x85, 140);
			lblFeiValue.Margin = new Padding(3);
			lblFeiValue.Name = "lblFeiValue";
			lblFeiValue.Size = new Size(0x62, 20);
			lblFeiValue.TabIndex = 0x11;
			lblFeiValue.Text = "0";
			lblFeiValue.TextAlign = ContentAlignment.MiddleLeft;
			label12.AutoSize = true;
			label12.BackColor = Color.Transparent;
			label12.Location = new Point(3, 0x90);
			label12.Name = "label12";
			label12.Size = new Size(0x1a, 13);
			label12.TabIndex = 15;
			label12.Text = "FEI:";
			label12.TextAlign = ContentAlignment.MiddleCenter;
			label18.AutoSize = true;
			label18.Location = new Point(0xff, 0x76);
			label18.Name = "label18";
			label18.Size = new Size(20, 13);
			label18.TabIndex = 14;
			label18.Text = "Hz";
			label10.AutoSize = true;
			label10.Location = new Point(0xff, 0x90);
			label10.Name = "label10";
			label10.Size = new Size(20, 13);
			label10.TabIndex = 0x13;
			label10.Text = "Hz";
			btnAfcClear.Location = new Point(0x56, 0x71);
			btnAfcClear.Name = "btnAfcClear";
			btnAfcClear.Size = new Size(0x29, 0x17);
			btnAfcClear.TabIndex = 11;
			btnAfcClear.Text = "Clear";
			btnAfcClear.UseVisualStyleBackColor = true;
			btnAfcClear.Click += new EventHandler(btnAfcClear_Click);
			btnAfcStart.Location = new Point(0x27, 0x71);
			btnAfcStart.Name = "btnAfcStart";
			btnAfcStart.Size = new Size(0x29, 0x17);
			btnAfcStart.TabIndex = 10;
			btnAfcStart.Text = "Start";
			btnAfcStart.UseVisualStyleBackColor = true;
			btnAfcStart.Click += new EventHandler(btnAfcStart_Click);
			ledAfcDone.BackColor = Color.Transparent;
			ledAfcDone.LedColor = Color.Green;
			ledAfcDone.LedSize = new Size(11, 11);
			ledAfcDone.Location = new Point(0xea, 0x75);
			ledAfcDone.Name = "ledAfcDone";
			ledAfcDone.Size = new Size(15, 15);
			ledAfcDone.TabIndex = 13;
			ledAfcDone.Text = "led1";
			lblAfcValue.BackColor = Color.Transparent;
			lblAfcValue.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			lblAfcValue.Location = new Point(0x85, 0x72);
			lblAfcValue.Margin = new Padding(3);
			lblAfcValue.Name = "lblAfcValue";
			lblAfcValue.Size = new Size(0x62, 20);
			lblAfcValue.TabIndex = 12;
			lblAfcValue.Text = "0";
			lblAfcValue.TextAlign = ContentAlignment.MiddleLeft;
			label22.AutoSize = true;
			label22.BackColor = Color.Transparent;
			label22.Location = new Point(3, 0x76);
			label22.Name = "label22";
			label22.Size = new Size(30, 13);
			label22.TabIndex = 9;
			label22.Text = "AFC:";
			label22.TextAlign = ContentAlignment.MiddleCenter;
			gBoxOok.Controls.Add(cBoxOokThreshType);
			gBoxOok.Controls.Add(lblOokType);
			gBoxOok.Controls.Add(lblOokStep);
			gBoxOok.Controls.Add(lblOokDec);
			gBoxOok.Controls.Add(lblOokCutoff);
			gBoxOok.Controls.Add(lblOokFixed);
			gBoxOok.Controls.Add(suffixOOKstep);
			gBoxOok.Controls.Add(suffixOOKfixed);
			gBoxOok.Controls.Add(nudOokPeakThreshStep);
			gBoxOok.Controls.Add(nudOokFixedThresh);
			gBoxOok.Controls.Add(cBoxOokPeakThreshDec);
			gBoxOok.Controls.Add(cBoxOokAverageThreshFilt);
			gBoxOok.Location = new Point(3, 0xc5);
			gBoxOok.Name = "gBoxOok";
			gBoxOok.Size = new Size(0x11d, 0xaf);
			gBoxOok.TabIndex = 2;
			gBoxOok.TabStop = false;
			gBoxOok.Text = "OOK";
			gBoxOok.MouseLeave += new EventHandler(control_MouseLeave);
			gBoxOok.MouseEnter += new EventHandler(control_MouseEnter);
			cBoxOokThreshType.FormattingEnabled = true;
			cBoxOokThreshType.Items.AddRange(new object[] { "Fixed", "Peak", "Average" });
			cBoxOokThreshType.Location = new Point(0x7b, 30);
			cBoxOokThreshType.Name = "cBoxOokThreshType";
			cBoxOokThreshType.Size = new Size(0x7c, 0x15);
			cBoxOokThreshType.TabIndex = 1;
			cBoxOokThreshType.SelectedIndexChanged += new EventHandler(cBoxOokThreshType_SelectedIndexChanged);
			lblOokType.AutoSize = true;
			lblOokType.Location = new Point(6, 0x22);
			lblOokType.Name = "lblOokType";
			lblOokType.Size = new Size(80, 13);
			lblOokType.TabIndex = 0;
			lblOokType.Text = "Threshold type:";
			lblOokStep.AutoSize = true;
			lblOokStep.Location = new Point(6, 60);
			lblOokStep.Name = "lblOokStep";
			lblOokStep.Size = new Size(0x68, 13);
			lblOokStep.TabIndex = 2;
			lblOokStep.Text = "Peak threshold step:";
			lblOokDec.AutoSize = true;
			lblOokDec.Location = new Point(6, 0x56);
			lblOokDec.Name = "lblOokDec";
			lblOokDec.Size = new Size(0x66, 13);
			lblOokDec.TabIndex = 5;
			lblOokDec.Text = "Peak threshold dec:";
			lblOokCutoff.AutoSize = true;
			lblOokCutoff.Location = new Point(6, 0x70);
			lblOokCutoff.Name = "lblOokCutoff";
			lblOokCutoff.Size = new Size(0x69, 13);
			lblOokCutoff.TabIndex = 7;
			lblOokCutoff.Text = "Avg threshold cutoff:";
			lblOokFixed.AutoSize = true;
			lblOokFixed.Location = new Point(6, 0x8a);
			lblOokFixed.Name = "lblOokFixed";
			lblOokFixed.Size = new Size(0x51, 13);
			lblOokFixed.TabIndex = 9;
			lblOokFixed.Text = "Fixed threshold:";
			suffixOOKstep.AutoSize = true;
			suffixOOKstep.BackColor = Color.Transparent;
			suffixOOKstep.Location = new Point(0xfd, 60);
			suffixOOKstep.Name = "suffixOOKstep";
			suffixOOKstep.Size = new Size(20, 13);
			suffixOOKstep.TabIndex = 4;
			suffixOOKstep.Text = "dB";
			suffixOOKfixed.AutoSize = true;
			suffixOOKfixed.BackColor = Color.Transparent;
			suffixOOKfixed.Location = new Point(0xfd, 0x8a);
			suffixOOKfixed.Name = "suffixOOKfixed";
			suffixOOKfixed.Size = new Size(20, 13);
			suffixOOKfixed.TabIndex = 11;
			suffixOOKfixed.Text = "dB";
			nudOokPeakThreshStep.DecimalPlaces = 1;
			int[] numArray25 = new int[4];
			numArray25[0] = 5;
			numArray25[3] = 0x10000;
			nudOokPeakThreshStep.Increment = new decimal(numArray25);
			nudOokPeakThreshStep.Location = new Point(0x7b, 0x38);
			int[] numArray26 = new int[4];
			numArray26[0] = 60;
			numArray26[3] = 0x10000;
			nudOokPeakThreshStep.Maximum = new decimal(numArray26);
			int[] numArray27 = new int[4];
			numArray27[0] = 5;
			numArray27[3] = 0x10000;
			nudOokPeakThreshStep.Minimum = new decimal(numArray27);
			nudOokPeakThreshStep.Name = "nudOokPeakThreshStep";
			nudOokPeakThreshStep.Size = new Size(0x7c, 20);
			nudOokPeakThreshStep.TabIndex = 3;
			nudOokPeakThreshStep.ThousandsSeparator = true;
			int[] numArray28 = new int[4];
			numArray28[0] = 5;
			numArray28[3] = 0x10000;
			nudOokPeakThreshStep.Value = new decimal(numArray28);
			nudOokPeakThreshStep.ValueChanged += new EventHandler(nudOokPeakThreshStep_ValueChanged);
			nudOokPeakThreshStep.Validating += new CancelEventHandler(nudOokPeakThreshStep_Validating);
			nudOokFixedThresh.Location = new Point(0x7b, 0x86);
			int[] numArray29 = new int[4];
			numArray29[0] = 0xff;
			nudOokFixedThresh.Maximum = new decimal(numArray29);
			nudOokFixedThresh.Name = "nudOokFixedThresh";
			nudOokFixedThresh.Size = new Size(0x7c, 20);
			nudOokFixedThresh.TabIndex = 10;
			nudOokFixedThresh.ThousandsSeparator = true;
			int[] numArray30 = new int[4];
			numArray30[0] = 6;
			nudOokFixedThresh.Value = new decimal(numArray30);
			nudOokFixedThresh.ValueChanged += new EventHandler(nudOokFixedThresh_ValueChanged);
			cBoxOokPeakThreshDec.FormattingEnabled = true;
			cBoxOokPeakThreshDec.Items.AddRange(new object[] { "Once per chip", "Once every 2 chips", "Once every 4 chips", "Once every 8 chips", "2 times per chip", "4 times per chip", "8 times per chip", "16 times per chip" });
			cBoxOokPeakThreshDec.Location = new Point(0x7b, 0x52);
			cBoxOokPeakThreshDec.Name = "cBoxOokPeakThreshDec";
			cBoxOokPeakThreshDec.Size = new Size(0x7c, 0x15);
			cBoxOokPeakThreshDec.TabIndex = 6;
			cBoxOokPeakThreshDec.SelectedIndexChanged += new EventHandler(cBoxOokPeakThreshDec_SelectedIndexChanged);
			cBoxOokAverageThreshFilt.FormattingEnabled = true;
			cBoxOokAverageThreshFilt.Items.AddRange(new object[] { "Bitrate / 32π", "Bitrate / 8π", "Bitrate / 4π", "Bitrate / 2π" });
			cBoxOokAverageThreshFilt.Location = new Point(0x7b, 0x6c);
			cBoxOokAverageThreshFilt.Name = "cBoxOokAverageThreshFilt";
			cBoxOokAverageThreshFilt.Size = new Size(0x7c, 0x15);
			cBoxOokAverageThreshFilt.TabIndex = 8;
			cBoxOokAverageThreshFilt.SelectedIndexChanged += new EventHandler(cBoxOokAverageThreshFilt_SelectedIndexChanged);
			gBoxAfcBw.Controls.Add(nudAfcDccFreq);
			gBoxAfcBw.Controls.Add(lblAfcDcc);
			gBoxAfcBw.Controls.Add(lblAfcRxBw);
			gBoxAfcBw.Controls.Add(suffixAFCDCC);
			gBoxAfcBw.Controls.Add(suffixAFCRxBw);
			gBoxAfcBw.Controls.Add(nudRxFilterBwAfc);
			gBoxAfcBw.Location = new Point(3, 100);
			gBoxAfcBw.Name = "gBoxAfcBw";
			gBoxAfcBw.Size = new Size(0x11d, 0x5b);
			gBoxAfcBw.TabIndex = 1;
			gBoxAfcBw.TabStop = false;
			gBoxAfcBw.Text = "AFC bandwidth";
			gBoxAfcBw.MouseLeave += new EventHandler(control_MouseLeave);
			gBoxAfcBw.MouseEnter += new EventHandler(control_MouseEnter);
			nudAfcDccFreq.Location = new Point(0x7b, 0x1c);
			int[] numArray31 = new int[4];
			numArray31[0] = 0x679;
			nudAfcDccFreq.Maximum = new decimal(numArray31);
			int[] numArray32 = new int[4];
			numArray32[0] = 12;
			nudAfcDccFreq.Minimum = new decimal(numArray32);
			nudAfcDccFreq.Name = "nudAfcDccFreq";
			nudAfcDccFreq.Size = new Size(0x7c, 20);
			nudAfcDccFreq.TabIndex = 1;
			nudAfcDccFreq.ThousandsSeparator = true;
			int[] numArray33 = new int[4];
			numArray33[0] = 0x1f1;
			nudAfcDccFreq.Value = new decimal(numArray33);
			nudAfcDccFreq.ValueChanged += new EventHandler(nudAfcDccFreq_ValueChanged);
			lblAfcDcc.AutoSize = true;
			lblAfcDcc.Location = new Point(6, 30);
			lblAfcDcc.Name = "lblAfcDcc";
			lblAfcDcc.Size = new Size(0x52, 13);
			lblAfcDcc.TabIndex = 0;
			lblAfcDcc.Text = "DCC frequency:";
			lblAfcRxBw.AutoSize = true;
			lblAfcRxBw.Location = new Point(6, 0x39);
			lblAfcRxBw.Name = "lblAfcRxBw";
			lblAfcRxBw.Size = new Size(0x61, 13);
			lblAfcRxBw.TabIndex = 3;
			lblAfcRxBw.Text = "Rx filter bandwidth:";
			suffixAFCDCC.AutoSize = true;
			suffixAFCDCC.Location = new Point(0xfd, 0x20);
			suffixAFCDCC.Name = "suffixAFCDCC";
			suffixAFCDCC.Size = new Size(20, 13);
			suffixAFCDCC.TabIndex = 2;
			suffixAFCDCC.Text = "Hz";
			suffixAFCRxBw.AutoSize = true;
			suffixAFCRxBw.Location = new Point(0xfd, 0x3b);
			suffixAFCRxBw.Name = "suffixAFCRxBw";
			suffixAFCRxBw.Size = new Size(20, 13);
			suffixAFCRxBw.TabIndex = 5;
			suffixAFCRxBw.Text = "Hz";
			nudRxFilterBwAfc.Location = new Point(0x7b, 0x37);
			int[] numArray34 = new int[4];
			numArray34[0] = 0x61a80;
			nudRxFilterBwAfc.Maximum = new decimal(numArray34);
			int[] numArray35 = new int[4];
			numArray35[0] = 0xc35;
			nudRxFilterBwAfc.Minimum = new decimal(numArray35);
			nudRxFilterBwAfc.Name = "nudRxFilterBwAfc";
			nudRxFilterBwAfc.Size = new Size(0x7c, 20);
			nudRxFilterBwAfc.TabIndex = 4;
			nudRxFilterBwAfc.ThousandsSeparator = true;
			int[] numArray36 = new int[4];
			numArray36[0] = 0xc350;
			nudRxFilterBwAfc.Value = new decimal(numArray36);
			nudRxFilterBwAfc.ValueChanged += new EventHandler(nudRxFilterBwAfc_ValueChanged);
			gBoxRxBw.Controls.Add(nudDccFreq);
			gBoxRxBw.Controls.Add(lblDcc);
			gBoxRxBw.Controls.Add(lblRxBw);
			gBoxRxBw.Controls.Add(suffixDCC);
			gBoxRxBw.Controls.Add(suffixRxBw);
			gBoxRxBw.Controls.Add(nudRxFilterBw);
			gBoxRxBw.Location = new Point(3, 3);
			gBoxRxBw.Name = "gBoxRxBw";
			gBoxRxBw.Size = new Size(0x11d, 0x5b);
			gBoxRxBw.TabIndex = 0;
			gBoxRxBw.TabStop = false;
			gBoxRxBw.Text = "Rx bandwidth";
			gBoxRxBw.MouseLeave += new EventHandler(control_MouseLeave);
			gBoxRxBw.MouseEnter += new EventHandler(control_MouseEnter);
			nudDccFreq.Location = new Point(0x7b, 0x1d);
			int[] numArray37 = new int[4];
			numArray37[0] = 0x679;
			nudDccFreq.Maximum = new decimal(numArray37);
			int[] numArray38 = new int[4];
			numArray38[0] = 12;
			nudDccFreq.Minimum = new decimal(numArray38);
			nudDccFreq.Name = "nudDccFreq";
			nudDccFreq.Size = new Size(0x7c, 20);
			nudDccFreq.TabIndex = 1;
			nudDccFreq.ThousandsSeparator = true;
			int[] numArray39 = new int[4];
			numArray39[0] = 0x19e;
			nudDccFreq.Value = new decimal(numArray39);
			nudDccFreq.ValueChanged += new EventHandler(nudDccFreq_ValueChanged);
			lblDcc.AutoSize = true;
			lblDcc.Location = new Point(6, 0x1f);
			lblDcc.Name = "lblDcc";
			lblDcc.Size = new Size(0x52, 13);
			lblDcc.TabIndex = 0;
			lblDcc.Text = "DCC frequency:";
			lblRxBw.AutoSize = true;
			lblRxBw.Location = new Point(6, 0x39);
			lblRxBw.Name = "lblRxBw";
			lblRxBw.Size = new Size(0x61, 13);
			lblRxBw.TabIndex = 3;
			lblRxBw.Text = "Rx filter bandwidth:";
			suffixDCC.AutoSize = true;
			suffixDCC.Location = new Point(0xfd, 0x21);
			suffixDCC.Name = "suffixDCC";
			suffixDCC.Size = new Size(20, 13);
			suffixDCC.TabIndex = 2;
			suffixDCC.Text = "Hz";
			suffixRxBw.AutoSize = true;
			suffixRxBw.Location = new Point(0xfd, 0x39);
			suffixRxBw.Name = "suffixRxBw";
			suffixRxBw.Size = new Size(20, 13);
			suffixRxBw.TabIndex = 5;
			suffixRxBw.Text = "Hz";
			nudRxFilterBw.Location = new Point(0x7b, 0x35);
			int[] numArray40 = new int[4];
			numArray40[0] = 0x7a120;
			nudRxFilterBw.Maximum = new decimal(numArray40);
			int[] numArray41 = new int[4];
			numArray41[0] = 0xf42;
			nudRxFilterBw.Minimum = new decimal(numArray41);
			nudRxFilterBw.Name = "nudRxFilterBw";
			nudRxFilterBw.Size = new Size(0x7c, 20);
			nudRxFilterBw.TabIndex = 4;
			nudRxFilterBw.ThousandsSeparator = true;
			int[] numArray42 = new int[4];
			numArray42[0] = 0x28b1;
			nudRxFilterBw.Value = new decimal(numArray42);
			nudRxFilterBw.ValueChanged += new EventHandler(nudRxFilterBw_ValueChanged);
			gBoxLna.Controls.Add(panel5);
			gBoxLna.Controls.Add(label13);
			gBoxLna.Controls.Add(label16);
			gBoxLna.Controls.Add(lblAgcReference);
			gBoxLna.Controls.Add(label48);
			gBoxLna.Controls.Add(label49);
			gBoxLna.Controls.Add(label50);
			gBoxLna.Controls.Add(label51);
			gBoxLna.Controls.Add(label52);
			gBoxLna.Controls.Add(lblLnaGain1);
			gBoxLna.Controls.Add(label53);
			gBoxLna.Controls.Add(panel6);
			gBoxLna.Controls.Add(lblLnaGain2);
			gBoxLna.Controls.Add(lblLnaGain3);
			gBoxLna.Controls.Add(lblLnaGain4);
			gBoxLna.Controls.Add(lblLnaGain5);
			gBoxLna.Controls.Add(lblLnaGain6);
			gBoxLna.Controls.Add(lblAgcThresh1);
			gBoxLna.Controls.Add(lblAgcThresh2);
			gBoxLna.Controls.Add(lblAgcThresh3);
			gBoxLna.Controls.Add(lblAgcThresh4);
			gBoxLna.Controls.Add(lblAgcThresh5);
			gBoxLna.Controls.Add(label47);
			gBoxLna.Location = new Point(3, 0x17a);
			gBoxLna.Name = "gBoxLna";
			gBoxLna.Size = new Size(0x319, 0x70);
			gBoxLna.TabIndex = 7;
			gBoxLna.TabStop = false;
			gBoxLna.Text = "Lna gain";
			gBoxLna.MouseLeave += new EventHandler(control_MouseLeave);
			gBoxLna.MouseEnter += new EventHandler(control_MouseEnter);
			panel5.AutoSize = true;
			panel5.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			panel5.Controls.Add(rBtnLnaGainAutoOff);
			panel5.Controls.Add(rBtnLnaGainAutoOn);
			panel5.Location = new Point(0x36, 0x51);
			panel5.Name = "panel5";
			panel5.Size = new Size(0x77, 0x11);
			panel5.TabIndex = 0x15;
			rBtnLnaGainAutoOff.AutoSize = true;
			rBtnLnaGainAutoOff.Location = new Point(0x38, 0);
			rBtnLnaGainAutoOff.Margin = new Padding(3, 0, 3, 0);
			rBtnLnaGainAutoOff.Name = "rBtnLnaGainAutoOff";
			rBtnLnaGainAutoOff.Size = new Size(60, 0x11);
			rBtnLnaGainAutoOff.TabIndex = 1;
			rBtnLnaGainAutoOff.Text = "Manual";
			rBtnLnaGainAutoOff.UseVisualStyleBackColor = true;
			rBtnLnaGainAutoOff.CheckedChanged += new EventHandler(rBtnLnaGain_CheckedChanged);
			rBtnLnaGainAutoOn.AutoSize = true;
			rBtnLnaGainAutoOn.Checked = true;
			rBtnLnaGainAutoOn.Location = new Point(3, 0);
			rBtnLnaGainAutoOn.Margin = new Padding(3, 0, 3, 0);
			rBtnLnaGainAutoOn.Name = "rBtnLnaGainAutoOn";
			rBtnLnaGainAutoOn.Size = new Size(0x2f, 0x11);
			rBtnLnaGainAutoOn.TabIndex = 0;
			rBtnLnaGainAutoOn.TabStop = true;
			rBtnLnaGainAutoOn.Text = "Auto";
			rBtnLnaGainAutoOn.UseVisualStyleBackColor = true;
			rBtnLnaGainAutoOn.CheckedChanged += new EventHandler(rBtnLnaGain_CheckedChanged);
			label13.BackColor = Color.Transparent;
			label13.Location = new Point(0x4f, 40);
			label13.Name = "label13";
			label13.Size = new Size(0x2a, 13);
			label13.TabIndex = 6;
			label13.Text = "AGC";
			label13.TextAlign = ContentAlignment.MiddleCenter;
			label16.BackColor = Color.Transparent;
			label16.Location = new Point(0x13, 0x51);
			label16.Margin = new Padding(0, 0, 0, 3);
			label16.Name = "label16";
			label16.Size = new Size(0x20, 0x11);
			label16.TabIndex = 20;
			label16.Text = "Gain:";
			label16.TextAlign = ContentAlignment.MiddleLeft;
			lblAgcReference.BackColor = Color.Transparent;
			lblAgcReference.Location = new Point(110, 40);
			lblAgcReference.Margin = new Padding(0, 0, 0, 3);
			lblAgcReference.Name = "lblAgcReference";
			lblAgcReference.Size = new Size(100, 13);
			lblAgcReference.TabIndex = 7;
			lblAgcReference.Text = "-80";
			lblAgcReference.TextAlign = ContentAlignment.MiddleCenter;
			label48.BackColor = Color.Transparent;
			label48.Location = new Point(110, 0x18);
			label48.Margin = new Padding(0, 0, 0, 3);
			label48.Name = "label48";
			label48.Size = new Size(100, 13);
			label48.TabIndex = 0;
			label48.Text = "Reference";
			label48.TextAlign = ContentAlignment.MiddleCenter;
			label49.BackColor = Color.Transparent;
			label49.Location = new Point(210, 0x18);
			label49.Margin = new Padding(0, 0, 0, 3);
			label49.Name = "label49";
			label49.Size = new Size(100, 13);
			label49.TabIndex = 1;
			label49.Text = "Threshold 1";
			label49.TextAlign = ContentAlignment.MiddleCenter;
			label50.BackColor = Color.Transparent;
			label50.Location = new Point(310, 0x18);
			label50.Margin = new Padding(0, 0, 0, 3);
			label50.Name = "label50";
			label50.Size = new Size(100, 13);
			label50.TabIndex = 2;
			label50.Text = "Threshold 2";
			label50.TextAlign = ContentAlignment.MiddleCenter;
			label51.BackColor = Color.Transparent;
			label51.Location = new Point(410, 0x18);
			label51.Margin = new Padding(0, 0, 0, 3);
			label51.Name = "label51";
			label51.Size = new Size(100, 13);
			label51.TabIndex = 3;
			label51.Text = "Threshold 3";
			label51.TextAlign = ContentAlignment.MiddleCenter;
			label52.BackColor = Color.Transparent;
			label52.Location = new Point(510, 0x18);
			label52.Margin = new Padding(0, 0, 0, 3);
			label52.Name = "label52";
			label52.Size = new Size(100, 13);
			label52.TabIndex = 4;
			label52.Text = "Threshold 4";
			label52.TextAlign = ContentAlignment.MiddleCenter;
			lblLnaGain1.BackColor = Color.LightSteelBlue;
			lblLnaGain1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			lblLnaGain1.Location = new Point(160, 0x38);
			lblLnaGain1.Margin = new Padding(0, 0, 0, 3);
			lblLnaGain1.Name = "lblLnaGain1";
			lblLnaGain1.Size = new Size(100, 20);
			lblLnaGain1.TabIndex = 14;
			lblLnaGain1.Text = "G1";
			lblLnaGain1.TextAlign = ContentAlignment.MiddleCenter;
			label53.BackColor = Color.Transparent;
			label53.Location = new Point(610, 0x18);
			label53.Margin = new Padding(0, 0, 0, 3);
			label53.Name = "label53";
			label53.Size = new Size(100, 13);
			label53.TabIndex = 5;
			label53.Text = "Threshold 5";
			label53.TextAlign = ContentAlignment.MiddleCenter;
			panel6.AutoSize = true;
			panel6.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			panel6.Controls.Add(rBtnLnaGain1);
			panel6.Controls.Add(rBtnLnaGain2);
			panel6.Controls.Add(rBtnLnaGain3);
			panel6.Controls.Add(rBtnLnaGain4);
			panel6.Controls.Add(rBtnLnaGain5);
			panel6.Controls.Add(rBtnLnaGain6);
			panel6.Location = new Point(0xc9, 0x53);
			panel6.Name = "panel6";
			panel6.Size = new Size(0x209, 13);
			panel6.TabIndex = 0x16;
			rBtnLnaGain1.AutoSize = true;
			rBtnLnaGain1.Checked = true;
			rBtnLnaGain1.Location = new Point(3, 0);
			rBtnLnaGain1.Margin = new Padding(3, 0, 3, 0);
			rBtnLnaGain1.Name = "rBtnLnaGain1";
			rBtnLnaGain1.Size = new Size(14, 13);
			rBtnLnaGain1.TabIndex = 0;
			rBtnLnaGain1.TabStop = true;
			rBtnLnaGain1.UseVisualStyleBackColor = true;
			rBtnLnaGain1.CheckedChanged += new EventHandler(rBtnLnaGain_CheckedChanged);
			rBtnLnaGain2.AutoSize = true;
			rBtnLnaGain2.Location = new Point(0x66, 0);
			rBtnLnaGain2.Margin = new Padding(3, 0, 3, 0);
			rBtnLnaGain2.Name = "rBtnLnaGain2";
			rBtnLnaGain2.Size = new Size(14, 13);
			rBtnLnaGain2.TabIndex = 1;
			rBtnLnaGain2.UseVisualStyleBackColor = true;
			rBtnLnaGain2.CheckedChanged += new EventHandler(rBtnLnaGain_CheckedChanged);
			rBtnLnaGain3.AutoSize = true;
			rBtnLnaGain3.Location = new Point(0xcb, 0);
			rBtnLnaGain3.Margin = new Padding(3, 0, 3, 0);
			rBtnLnaGain3.Name = "rBtnLnaGain3";
			rBtnLnaGain3.Size = new Size(14, 13);
			rBtnLnaGain3.TabIndex = 2;
			rBtnLnaGain3.UseVisualStyleBackColor = true;
			rBtnLnaGain3.CheckedChanged += new EventHandler(rBtnLnaGain_CheckedChanged);
			rBtnLnaGain4.AutoSize = true;
			rBtnLnaGain4.Location = new Point(0x12f, 0);
			rBtnLnaGain4.Margin = new Padding(3, 0, 3, 0);
			rBtnLnaGain4.Name = "rBtnLnaGain4";
			rBtnLnaGain4.Size = new Size(14, 13);
			rBtnLnaGain4.TabIndex = 3;
			rBtnLnaGain4.UseVisualStyleBackColor = true;
			rBtnLnaGain4.CheckedChanged += new EventHandler(rBtnLnaGain_CheckedChanged);
			rBtnLnaGain5.AutoSize = true;
			rBtnLnaGain5.Location = new Point(0x194, 0);
			rBtnLnaGain5.Margin = new Padding(3, 0, 3, 0);
			rBtnLnaGain5.Name = "rBtnLnaGain5";
			rBtnLnaGain5.Size = new Size(14, 13);
			rBtnLnaGain5.TabIndex = 4;
			rBtnLnaGain5.UseVisualStyleBackColor = true;
			rBtnLnaGain5.CheckedChanged += new EventHandler(rBtnLnaGain_CheckedChanged);
			rBtnLnaGain6.AutoSize = true;
			rBtnLnaGain6.Location = new Point(0x1f8, 0);
			rBtnLnaGain6.Margin = new Padding(3, 0, 3, 0);
			rBtnLnaGain6.Name = "rBtnLnaGain6";
			rBtnLnaGain6.Size = new Size(14, 13);
			rBtnLnaGain6.TabIndex = 5;
			rBtnLnaGain6.UseVisualStyleBackColor = true;
			rBtnLnaGain6.CheckedChanged += new EventHandler(rBtnLnaGain_CheckedChanged);
			lblLnaGain2.BackColor = Color.Transparent;
			lblLnaGain2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			lblLnaGain2.Location = new Point(260, 0x38);
			lblLnaGain2.Margin = new Padding(0, 0, 0, 3);
			lblLnaGain2.Name = "lblLnaGain2";
			lblLnaGain2.Size = new Size(100, 20);
			lblLnaGain2.TabIndex = 15;
			lblLnaGain2.Text = "G2";
			lblLnaGain2.TextAlign = ContentAlignment.MiddleCenter;
			lblLnaGain3.BackColor = Color.Transparent;
			lblLnaGain3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			lblLnaGain3.Location = new Point(360, 0x38);
			lblLnaGain3.Margin = new Padding(0, 0, 0, 3);
			lblLnaGain3.Name = "lblLnaGain3";
			lblLnaGain3.Size = new Size(100, 20);
			lblLnaGain3.TabIndex = 0x10;
			lblLnaGain3.Text = "G3";
			lblLnaGain3.TextAlign = ContentAlignment.MiddleCenter;
			lblLnaGain4.BackColor = Color.Transparent;
			lblLnaGain4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			lblLnaGain4.Location = new Point(460, 0x38);
			lblLnaGain4.Margin = new Padding(0, 0, 0, 3);
			lblLnaGain4.Name = "lblLnaGain4";
			lblLnaGain4.Size = new Size(100, 20);
			lblLnaGain4.TabIndex = 0x11;
			lblLnaGain4.Text = "G4";
			lblLnaGain4.TextAlign = ContentAlignment.MiddleCenter;
			lblLnaGain5.BackColor = Color.Transparent;
			lblLnaGain5.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			lblLnaGain5.Location = new Point(560, 0x38);
			lblLnaGain5.Margin = new Padding(0, 0, 0, 3);
			lblLnaGain5.Name = "lblLnaGain5";
			lblLnaGain5.Size = new Size(100, 20);
			lblLnaGain5.TabIndex = 0x12;
			lblLnaGain5.Text = "G5";
			lblLnaGain5.TextAlign = ContentAlignment.MiddleCenter;
			lblLnaGain6.BackColor = Color.Transparent;
			lblLnaGain6.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			lblLnaGain6.Location = new Point(660, 0x38);
			lblLnaGain6.Margin = new Padding(0, 0, 0, 3);
			lblLnaGain6.Name = "lblLnaGain6";
			lblLnaGain6.Size = new Size(100, 20);
			lblLnaGain6.TabIndex = 0x13;
			lblLnaGain6.Text = "G6";
			lblLnaGain6.TextAlign = ContentAlignment.MiddleCenter;
			lblAgcThresh1.BackColor = Color.Transparent;
			lblAgcThresh1.Location = new Point(210, 40);
			lblAgcThresh1.Margin = new Padding(0, 0, 0, 3);
			lblAgcThresh1.Name = "lblAgcThresh1";
			lblAgcThresh1.Size = new Size(100, 13);
			lblAgcThresh1.TabIndex = 8;
			lblAgcThresh1.Text = "0";
			lblAgcThresh1.TextAlign = ContentAlignment.MiddleCenter;
			lblAgcThresh2.BackColor = Color.Transparent;
			lblAgcThresh2.Location = new Point(310, 40);
			lblAgcThresh2.Margin = new Padding(0, 0, 0, 3);
			lblAgcThresh2.Name = "lblAgcThresh2";
			lblAgcThresh2.Size = new Size(100, 13);
			lblAgcThresh2.TabIndex = 9;
			lblAgcThresh2.Text = "0";
			lblAgcThresh2.TextAlign = ContentAlignment.MiddleCenter;
			lblAgcThresh3.BackColor = Color.Transparent;
			lblAgcThresh3.Location = new Point(410, 40);
			lblAgcThresh3.Margin = new Padding(0, 0, 0, 3);
			lblAgcThresh3.Name = "lblAgcThresh3";
			lblAgcThresh3.Size = new Size(100, 13);
			lblAgcThresh3.TabIndex = 10;
			lblAgcThresh3.Text = "0";
			lblAgcThresh3.TextAlign = ContentAlignment.MiddleCenter;
			lblAgcThresh4.BackColor = Color.Transparent;
			lblAgcThresh4.Location = new Point(510, 40);
			lblAgcThresh4.Margin = new Padding(0, 0, 0, 3);
			lblAgcThresh4.Name = "lblAgcThresh4";
			lblAgcThresh4.Size = new Size(100, 13);
			lblAgcThresh4.TabIndex = 11;
			lblAgcThresh4.Text = "0";
			lblAgcThresh4.TextAlign = ContentAlignment.MiddleCenter;
			lblAgcThresh5.BackColor = Color.Transparent;
			lblAgcThresh5.Location = new Point(610, 40);
			lblAgcThresh5.Margin = new Padding(0, 0, 0, 3);
			lblAgcThresh5.Name = "lblAgcThresh5";
			lblAgcThresh5.Size = new Size(100, 13);
			lblAgcThresh5.TabIndex = 12;
			lblAgcThresh5.Text = "0";
			lblAgcThresh5.TextAlign = ContentAlignment.MiddleCenter;
			label47.AutoSize = true;
			label47.BackColor = Color.Transparent;
			label47.Location = new Point(0x2c5, 40);
			label47.Margin = new Padding(0);
			label47.Name = "label47";
			label47.Size = new Size(0x40, 13);
			label47.TabIndex = 13;
			label47.Text = "-> Pin [dBm]";
			label47.TextAlign = ContentAlignment.MiddleLeft;
			gBoxDagc.Controls.Add(label34);
			gBoxDagc.Controls.Add(panel11);
			gBoxDagc.Location = new Point(0x249, 0x79);
			gBoxDagc.Name = "gBoxDagc";
			gBoxDagc.Size = new Size(0xd3, 50);
			gBoxDagc.TabIndex = 5;
			gBoxDagc.TabStop = false;
			gBoxDagc.Text = "DAGC";
			gBoxDagc.MouseLeave += new EventHandler(control_MouseLeave);
			gBoxDagc.MouseEnter += new EventHandler(control_MouseEnter);
			label34.AutoSize = true;
			label34.Location = new Point(11, 0x15);
			label34.Name = "label34";
			label34.Size = new Size(40, 13);
			label34.TabIndex = 3;
			label34.Text = "DAGC:";
			panel11.AutoSize = true;
			panel11.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			panel11.Controls.Add(rBtnDagcOff);
			panel11.Controls.Add(rBtnDagcOn);
			panel11.Location = new Point(0x6a, 0x13);
			panel11.Name = "panel11";
			panel11.Size = new Size(0x5d, 0x11);
			panel11.TabIndex = 4;
			rBtnDagcOff.AutoSize = true;
			rBtnDagcOff.Location = new Point(0x2d, 0);
			rBtnDagcOff.Margin = new Padding(3, 0, 3, 0);
			rBtnDagcOff.Name = "rBtnDagcOff";
			rBtnDagcOff.Size = new Size(0x2d, 0x11);
			rBtnDagcOff.TabIndex = 1;
			rBtnDagcOff.Text = "OFF";
			rBtnDagcOff.UseVisualStyleBackColor = true;
			rBtnDagcOff.CheckedChanged += new EventHandler(rBtnDagc_CheckedChanged);
			rBtnDagcOn.AutoSize = true;
			rBtnDagcOn.Checked = true;
			rBtnDagcOn.Location = new Point(3, 0);
			rBtnDagcOn.Margin = new Padding(3, 0, 3, 0);
			rBtnDagcOn.Name = "rBtnDagcOn";
			rBtnDagcOn.Size = new Size(0x29, 0x11);
			rBtnDagcOn.TabIndex = 0;
			rBtnDagcOn.TabStop = true;
			rBtnDagcOn.Text = "ON";
			rBtnDagcOn.UseVisualStyleBackColor = true;
			rBtnDagcOn.CheckedChanged += new EventHandler(rBtnDagc_CheckedChanged);
			base.AutoScaleDimensions = new SizeF(6f, 13f);
			base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			base.Controls.Add(gBoxDagc);
			base.Controls.Add(gBoxLnaSensitivity);
			base.Controls.Add(gBoxAgc);
			base.Controls.Add(gBoxRssi);
			base.Controls.Add(gBoxAfcFei);
			base.Controls.Add(gBoxOok);
			base.Controls.Add(gBoxAfcBw);
			base.Controls.Add(gBoxRxBw);
			base.Controls.Add(gBoxLna);
			base.Name = "ReceiverViewControl";
			base.Size = new Size(0x31f, 0x1ed);
			((ISupportInitialize)errorProvider).EndInit();
			panel3.ResumeLayout(false);
			panel3.PerformLayout();
			panel4.ResumeLayout(false);
			panel4.PerformLayout();
			pnlSensitivityBoost.ResumeLayout(false);
			pnlSensitivityBoost.PerformLayout();
			gBoxLnaSensitivity.ResumeLayout(false);
			gBoxLnaSensitivity.PerformLayout();
			gBoxAgc.ResumeLayout(false);
			gBoxAgc.PerformLayout();
			panel2.ResumeLayout(false);
			panel2.PerformLayout();
			nudAgcStep5.EndInit();
			nudAgcSnrMargin.EndInit();
			nudAgcStep4.EndInit();
			nudAgcRefLevel.EndInit();
			nudAgcStep3.EndInit();
			nudAgcStep1.EndInit();
			nudAgcStep2.EndInit();
			gBoxRssi.ResumeLayout(false);
			gBoxRssi.PerformLayout();
			pnlRssiPhase.ResumeLayout(false);
			pnlRssiPhase.PerformLayout();
			panel7.ResumeLayout(false);
			panel7.PerformLayout();
			nudRssiThresh.EndInit();
			panel1.ResumeLayout(false);
			panel1.PerformLayout();
			nudTimeoutRxStart.EndInit();
			nudTimeoutRssiThresh.EndInit();
			gBoxAfcFei.ResumeLayout(false);
			gBoxAfcFei.PerformLayout();
			nudLowBetaAfcOffset.EndInit();
			pnlAfcLowBeta.ResumeLayout(false);
			pnlAfcLowBeta.PerformLayout();
			panel8.ResumeLayout(false);
			panel8.PerformLayout();
			panel9.ResumeLayout(false);
			panel9.PerformLayout();
			gBoxOok.ResumeLayout(false);
			gBoxOok.PerformLayout();
			nudOokPeakThreshStep.EndInit();
			nudOokFixedThresh.EndInit();
			gBoxAfcBw.ResumeLayout(false);
			gBoxAfcBw.PerformLayout();
			nudAfcDccFreq.EndInit();
			nudRxFilterBwAfc.EndInit();
			gBoxRxBw.ResumeLayout(false);
			gBoxRxBw.PerformLayout();
			nudDccFreq.EndInit();
			nudRxFilterBw.EndInit();
			gBoxLna.ResumeLayout(false);
			gBoxLna.PerformLayout();
			panel5.ResumeLayout(false);
			panel5.PerformLayout();
			panel6.ResumeLayout(false);
			panel6.PerformLayout();
			gBoxDagc.ResumeLayout(false);
			gBoxDagc.PerformLayout();
			panel11.ResumeLayout(false);
			panel11.PerformLayout();
			base.ResumeLayout(false);
		}
		public void InitTest ()
		{
			NumericUpDown nud = new NumericUpDown ();
			nud.BeginInit ();
			nud.Maximum = 3;
			nud.BeginInit ();
			nud.EndInit ();
			nud.Value = 4;
			nud.Dispose ();
		}
        /// <summary>
        /// Public constructor.
        /// </summary>
        public OverOptimization(string caption)
            : base(caption)
        {
            lblIntro      = new Label();
            lblDeviation  = new Label();
            lblParams     = new Label();
            nudDeviation  = new NumericUpDown();
            nudParams     = new NumericUpDown();
            btnStart      = new Button();
            btnViewCharts = new Button();
            btnOpenFolder = new Button();
            btnOpenReport = new Button();

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

            // Label Intro
            lblIntro.Parent    = this;
            lblIntro.ForeColor = colorText;
            lblIntro.BackColor = Color.Transparent;
            lblIntro.AutoSize  = false;
            lblIntro.Text      = Language.T("The over-optimization report shows how the stats results of back test are changing with changing of the numerical parameters of the strategy by given percent.");

            // Label Deviation
            lblDeviation.Parent    = this;
            lblDeviation.ForeColor = colorText;
            lblDeviation.BackColor = Color.Transparent;
            lblDeviation.AutoSize  = true;
            lblDeviation.Text      = Language.T("Parameters deviation % [recommended 20]");

            // Label Parameters
            lblParams.Parent    = this;
            lblParams.ForeColor = colorText;
            lblParams.BackColor = Color.Transparent;
            lblParams.AutoSize  = true;
            lblParams.Text      = Language.T("Parameters number [recommended 20]");

            // NumericUpDown Deviation
            nudDeviation.BeginInit();
            nudDeviation.Parent    = this;
            nudDeviation.Name      = "Deviation";
            nudDeviation.TextAlign = HorizontalAlignment.Center;
            nudDeviation.Minimum   = 1;
            nudDeviation.Maximum   = 100;
            nudDeviation.Value     = 20;
            nudDeviation.EndInit();

            // NumericUpDown Swap Long
            nudParams.BeginInit();
            nudParams.Parent    = this;
            nudParams.Name      = "Parameters";
            nudParams.TextAlign = HorizontalAlignment.Center;
            nudParams.Minimum   = 1;
            nudParams.Maximum   = 100;
            nudParams.Value     = 20;
            nudParams.EndInit();

            // Button View Charts
            btnViewCharts.Parent     = this;
            btnViewCharts.Name       = "btnViewCharts";
            btnViewCharts.Text       = Language.T("View Charts");
            btnViewCharts.ImageAlign = ContentAlignment.MiddleLeft;
            btnViewCharts.Image      = Properties.Resources.overoptimization_chart;
            btnViewCharts.Enabled    = false;
            btnViewCharts.Click     += new EventHandler(ViewCharts_Click);
            btnViewCharts.UseVisualStyleBackColor = true;

            // Button Open report folder
            btnOpenFolder.Parent     = this;
            btnOpenFolder.Name       = "btnOpenFolder";
            btnOpenFolder.Text       = Language.T("Open Folder");
            btnOpenFolder.ImageAlign = ContentAlignment.MiddleLeft;
            btnOpenFolder.Image      = Properties.Resources.folder_open;
            btnOpenFolder.Enabled    = false;
            btnOpenFolder.Click     += new EventHandler(OpenFolder_Click);
            btnOpenFolder.UseVisualStyleBackColor = true;

            // Button Open Report
            btnOpenReport.Parent     = this;
            btnOpenReport.Name       = "btnOpenReport";
            btnOpenReport.Text       = Language.T("Open Report");
            btnOpenReport.ImageAlign = ContentAlignment.MiddleLeft;
            btnOpenReport.Image      = Properties.Resources.export;
            btnOpenReport.Enabled    = false;
            btnOpenReport.Click     += new EventHandler(OpenReport_Click);
            btnOpenReport.UseVisualStyleBackColor = true;

            // Button Run
            btnStart.Parent = this;
            btnStart.Text   = Language.T("Start");
            btnStart.Click += new EventHandler(BtnStart_Click);
            btnStart.UseVisualStyleBackColor = true;

            // ProgressBar
            progressBar = new ProgressBar();
            progressBar.Parent  = this;
            progressBar.Minimum = 1;
            progressBar.Maximum = 100;
            progressBar.Step    = 1;

            // BackgroundWorker
            bgWorker = new BackgroundWorker();
            bgWorker.WorkerReportsProgress      = true;
            bgWorker.WorkerSupportsCancellation = true;
            bgWorker.DoWork             += new DoWorkEventHandler(BgWorker_DoWork);
            bgWorker.ProgressChanged    += new ProgressChangedEventHandler(BgWorker_ProgressChanged);
            bgWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(BgWorker_RunWorkerCompleted);

            this.Resize += new EventHandler(PnlOverOptimization_Resize);
        }
        /// <summary>
        /// Initialize the form and controls
        /// </summary>
        public Bar_Explorer(int iBarNumber)
        {
            pnlChart = new Panel();
            pnlInfo  = new Panel();
            toolTip  = new ToolTip();

            barCurrent = iBarNumber < Data.FirstBar ? Data.FirstBar : iBarNumber;

            this.Text            = Language.T("Bar Explorer");
            this.BackColor       = LayoutColors.ColorFormBack;
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.Icon            = Data.Icon;
            this.MaximizeBox     = false;
            this.MinimizeBox     = false;
            this.ShowInTaskbar   = false;

            fontInfo      = new Font(Font.FontFamily, 9);
            infoRowHeight = (int)Math.Max(fontInfo.Height, 18);

            barInfo = Language.T("Bar") + ": " + (barCurrent + 1).ToString() + " " +
                Data.Time[barCurrent].ToString(Data.DF) + " "  +
                Data.Time[barCurrent].ToString("HH:mm") + "; " +
                Language.T("Interpolation method")      + ": " +
                Backtester.InterpolationMethodToString();

            pnlChart.Parent = this;
            pnlChart.Paint += new PaintEventHandler(PnlChart_Paint);

            pnlInfo.Parent = this;
            pnlInfo.Paint += new PaintEventHandler(PnlInfo_Paint);

            btnNavigate = new Button[6];
            string [] btnNavigateText = new string [] {"< !", "<<", "<", ">", ">>", "! >"};
            string[]  btnNavigateTips = new string [] {
                Language.T("Previous ambiguous bar."),
                Language.T("Previous deal."),
                Language.T("Previous bar."),
                Language.T("Next bar."),
                Language.T("Next deal."),
                Language.T("Next ambiguous bar.")
            };

            for (int i = 0; i < 6; i++)
            {
                btnNavigate[i] = new Button();
                btnNavigate[i].Parent = this;
                btnNavigate[i].Text   = btnNavigateText[i];
                btnNavigate[i].Name   = btnNavigateText[i];
                btnNavigate[i].Click      += new EventHandler(BtnNavigate_Click);
                btnNavigate[i].MouseWheel += new MouseEventHandler(Bar_Explorer_MouseWheel);
                btnNavigate[i].KeyUp      += new KeyEventHandler(BtnNavigate_KeyUp);
                btnNavigate[i].UseVisualStyleBackColor = true;
                toolTip.SetToolTip(btnNavigate[i], btnNavigateTips[i]);
            }

            btnNavigate[0].Enabled = Backtester.AmbiguousBars  > 0;
            btnNavigate[1].Enabled = Backtester.PositionsTotal > 0;
            btnNavigate[4].Enabled = Backtester.PositionsTotal > 0;
            btnNavigate[5].Enabled = Backtester.AmbiguousBars  > 0;

            nudGo = new NumericUpDown();
            nudGo.Parent    = this;
            nudGo.TextAlign = HorizontalAlignment.Center;
            nudGo.BeginInit();
            nudGo.Minimum   = Data.FirstBar + 1;
            nudGo.Maximum   = Data.Bars;
            nudGo.Increment = 1;
            nudGo.Value     = barCurrent + 1;
            nudGo.KeyUp    += new KeyEventHandler(BtnNavigate_KeyUp);
            nudGo.EndInit();

            btnGo = new Button();
            btnGo.Parent = this;
            btnGo.Name   = "Go";
            btnGo.Text   = Language.T("Go");
            btnGo.UseVisualStyleBackColor = true;
            btnGo.Click      += new EventHandler(BtnNavigate_Click);
            btnGo.MouseWheel += new MouseEventHandler(Bar_Explorer_MouseWheel);
            btnGo.KeyUp      += new KeyEventHandler(BtnNavigate_KeyUp);
            toolTip.SetToolTip(btnGo, Language.T("Go to the chosen bar."));

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

            // Colors
            brushRed  = new SolidBrush(LayoutColors.ColorSignalRed);

            brushCaptionBack = new SolidBrush(LayoutColors.ColorCaptionBack);
            brushCaptionText = new SolidBrush(LayoutColors.ColorCaptionText);
            brushEvenRow     = new SolidBrush(LayoutColors.ColorEvenRowBack);
            brushBack        = new SolidBrush(LayoutColors.ColorControlBack);
            brushGridText    = new SolidBrush(LayoutColors.ColorChartFore);
            brushBarWhite    = new SolidBrush(LayoutColors.ColorBarWhite);
            brushBarBlack    = new SolidBrush(LayoutColors.ColorBarBlack);
            brushTradeLong   = new SolidBrush(LayoutColors.ColorTradeLong);
            brushTradeShort  = new SolidBrush(LayoutColors.ColorTradeShort);
            brushTradeClose  = new SolidBrush(LayoutColors.ColorTradeClose);

            penGrid             = new Pen(LayoutColors.ColorChartGrid);
            penGrid.DashStyle   = DashStyle.Dash;
            penGrid.DashPattern = new float[] { 4, 2 };
            penGridSolid        = new Pen(LayoutColors.ColorChartGrid);
            penAxes             = new Pen(LayoutColors.ColorChartFore);
            penCross            = new Pen(LayoutColors.ColorChartCross);
            penBarBorder        = new Pen(LayoutColors.ColorBarBorder);

            colorBarWight1 = Data.GetGradientColor(LayoutColors.ColorBarWhite,  30);
            colorBarWight2 = Data.GetGradientColor(LayoutColors.ColorBarWhite, -30);
            colorBarBlack1 = Data.GetGradientColor(LayoutColors.ColorBarBlack,  30);
            colorBarBlack2 = Data.GetGradientColor(LayoutColors.ColorBarBlack, -30);

            colorLongTrade1   = Data.GetGradientColor(LayoutColors.ColorTradeLong,   30);
            colorLongTrade2   = Data.GetGradientColor(LayoutColors.ColorTradeLong,  -30);
            colorShortTrade1  = Data.GetGradientColor(LayoutColors.ColorTradeShort,  30);
            colorShortTrade2  = Data.GetGradientColor(LayoutColors.ColorTradeShort, -30);
            colorClosedTrade1 = Data.GetGradientColor(LayoutColors.ColorTradeClose,  30);
            colorClosedTrade2 = Data.GetGradientColor(LayoutColors.ColorTradeClose, -30);

            SetJournalPoints();

            return;
        }
        /// <summary>
        /// Sets controls in panel Settings
        /// </summary>
        private void SetPanelSettings()
        {
            ChbOutOfSample = new CheckBox
                                 {
                                     Parent = PnlSettings,
                                     ForeColor = _colorText,
                                     BackColor = Color.Transparent,
                                     Text = Language.T("Out of sample testing, percent of OOS bars"),
                                     Checked = false,
                                     AutoSize = true
                                 };
            ChbOutOfSample.CheckedChanged += ChbOutOfSampleCheckedChanged;

            NUDOutOfSample = new NumericUpDown {Parent = PnlSettings, TextAlign = HorizontalAlignment.Center};
            NUDOutOfSample.BeginInit();
            NUDOutOfSample.Minimum = 10;
            NUDOutOfSample.Maximum = 60;
            NUDOutOfSample.Increment = 1;
            NUDOutOfSample.Value = 30;
            NUDOutOfSample.EndInit();
            NUDOutOfSample.ValueChanged += NudOutOfSampleValueChanged;

            ChbOptimizerWritesReport = new CheckBox
                                           {
                                               Parent = PnlSettings,
                                               ForeColor = _colorText,
                                               BackColor = Color.Transparent,
                                               Text = Language.T("Optimizer writes a report for each optimized strategy"),
                                               Checked = false,
                                               AutoSize = true
                                           };

            ChbHideFSB = new CheckBox
                             {
                                 Parent = PnlSettings,
                                 ForeColor = _colorText,
                                 BackColor = Color.Transparent,
                                 Text = Language.T("Hide FSB when Optimizer starts"),
                                 Checked = true,
                                 AutoSize = true
                             };

            BtnResetSettings = new Button
                                   {
                                       Parent = PnlSettings,
                                       UseVisualStyleBackColor = true,
                                       Text = Language.T("Reset all parameters and settings")
                                   };
            BtnResetSettings.Click += BtnResetClick;
        }
        /// <summary>
        /// Sets controls in panel Limitations
        /// </summary>
        private void SetPanelLimitations()
        {
            ChbAmbiguousBars = new CheckBox
                                   {
                                       Parent = PnlLimitations,
                                       ForeColor = _colorText,
                                       BackColor = Color.Transparent,
                                       Text = Language.T("Maximum number of ambiguous bars"),
                                       Checked = false,
                                       AutoSize = true
                                   };

            NUDAmbiguousBars = new NumericUpDown {Parent = PnlLimitations, TextAlign = HorizontalAlignment.Center};
            NUDAmbiguousBars.BeginInit();
            NUDAmbiguousBars.Minimum = 0;
            NUDAmbiguousBars.Maximum = 100;
            NUDAmbiguousBars.Increment = 1;
            NUDAmbiguousBars.Value = 10;
            NUDAmbiguousBars.EndInit();

            ChbMaxDrawdown = new CheckBox
                                 {
                                     Parent = PnlLimitations,
                                     ForeColor = _colorText,
                                     BackColor = Color.Transparent,
                                     Checked = false,
                                     Text = Language.T("Maximum equity drawdown") + " [" +
                                            (Configs.AccountInMoney
                                                 ? Configs.AccountCurrency + "]"
                                                 : Language.T("pips") + "]"),
                                     AutoSize = true
                                 };

            NUDMaxDrawdown = new NumericUpDown {Parent = PnlLimitations, TextAlign = HorizontalAlignment.Center};
            NUDMaxDrawdown.BeginInit();
            NUDMaxDrawdown.Minimum = 0;
            NUDMaxDrawdown.Maximum = Configs.InitialAccount;
            NUDMaxDrawdown.Increment = 10;
            NUDMaxDrawdown.Value = Configs.InitialAccount/4M;
            NUDMaxDrawdown.EndInit();

            ChbEquityPercent = new CheckBox
                                   {
                                       Parent = PnlLimitations,
                                       ForeColor = _colorText,
                                       BackColor = Color.Transparent,
                                       Text = Language.T("Maximum equity drawdown") + " [% " + Configs.AccountCurrency +"]",
                                       Checked = false,
                                       AutoSize = true
                                   };

            NUDEquityPercent = new NumericUpDown {Parent = PnlLimitations, TextAlign = HorizontalAlignment.Center};
            NUDEquityPercent.BeginInit();
            NUDEquityPercent.Minimum = 1;
            NUDEquityPercent.Maximum = 100;
            NUDEquityPercent.Increment = 1;
            NUDEquityPercent.Value = 25;
            NUDEquityPercent.EndInit();

            ChbMinTrades = new CheckBox
                               {
                                   Parent = PnlLimitations,
                                   ForeColor = _colorText,
                                   BackColor = Color.Transparent,
                                   Text = Language.T("Minimum number of trades"),
                                   Checked = true,
                                   AutoSize = true
                               };

            NUDMinTrades = new NumericUpDown {Parent = PnlLimitations, TextAlign = HorizontalAlignment.Center};
            NUDMinTrades.BeginInit();
            NUDMinTrades.Minimum = 10;
            NUDMinTrades.Maximum = 1000;
            NUDMinTrades.Increment = 10;
            NUDMinTrades.Value = 100;
            NUDMinTrades.EndInit();

            ChbMaxTrades = new CheckBox
                               {
                                   Parent = PnlLimitations,
                                   ForeColor = _colorText,
                                   BackColor = Color.Transparent,
                                   Text = Language.T("Maximum number of trades"),
                                   Checked = false,
                                   AutoSize = true
                               };

            NUDMaxTrades = new NumericUpDown {Parent = PnlLimitations, TextAlign = HorizontalAlignment.Center};
            NUDMaxTrades.BeginInit();
            NUDMaxTrades.Minimum = 10;
            NUDMaxTrades.Maximum = 10000;
            NUDMaxTrades.Increment = 10;
            NUDMaxTrades.Value = 1000;
            NUDMaxTrades.EndInit();

            ChbWinLossRatio = new CheckBox
                                  {
                                      Parent = PnlLimitations,
                                      ForeColor = _colorText,
                                      BackColor = Color.Transparent,
                                      Text = Language.T("Minimum win / loss trades ratio"),
                                      Checked = false,
                                      AutoSize = true
                                  };

            NUDWinLossRatio = new NumericUpDown {Parent = PnlLimitations, TextAlign = HorizontalAlignment.Center};
            NUDWinLossRatio.BeginInit();
            NUDWinLossRatio.Minimum = 0.10M;
            NUDWinLossRatio.Maximum = 1;
            NUDWinLossRatio.Increment = 0.01M;
            NUDWinLossRatio.Value = 0.30M;
            NUDWinLossRatio.DecimalPlaces = 2;
            NUDWinLossRatio.EndInit();

            ChbOOSPatternFilter = new CheckBox
                                      {
                                          Parent = PnlLimitations,
                                          ForeColor = _colorText,
                                          BackColor = Color.Transparent,
                                          Text = Language.T("Filter bad OOS performance"),
                                          Checked = false,
                                          AutoSize = true
                                      };

            NUDOOSPatternPercent = new NumericUpDown {Parent = PnlLimitations, TextAlign = HorizontalAlignment.Center};
            NUDOOSPatternPercent.BeginInit();
            NUDOOSPatternPercent.Minimum = 1;
            NUDOOSPatternPercent.Maximum = 50;
            NUDOOSPatternPercent.Value = 20;
            NUDOOSPatternPercent.EndInit();
            _toolTip.SetToolTip(NUDOOSPatternPercent, Language.T("Deviation percent."));

            ChbSmoothBalanceLines = new CheckBox
                                        {
                                            Parent = PnlLimitations,
                                            ForeColor = _colorText,
                                            BackColor = Color.Transparent,
                                            Text = Language.T("Filter non-linear balance pattern"),
                                            Checked = false,
                                            AutoSize = true
                                        };

            NUDSmoothBalancePercent = new NumericUpDown
                                          {Parent = PnlLimitations, TextAlign = HorizontalAlignment.Center};
            NUDSmoothBalancePercent.BeginInit();
            NUDSmoothBalancePercent.Minimum = 1;
            NUDSmoothBalancePercent.Maximum = 50;
            NUDSmoothBalancePercent.Value = 20;
            NUDSmoothBalancePercent.EndInit();
            _toolTip.SetToolTip(NUDSmoothBalancePercent, Language.T("Deviation percent."));

            NUDSmoothBalanceCheckPoints = new NumericUpDown
                                              {Parent = PnlLimitations, TextAlign = HorizontalAlignment.Center};
            NUDSmoothBalanceCheckPoints.BeginInit();
            NUDSmoothBalanceCheckPoints.Minimum = 1;
            NUDSmoothBalanceCheckPoints.Maximum = 50;
            NUDSmoothBalanceCheckPoints.Value = 1;
            NUDSmoothBalanceCheckPoints.EndInit();
            _toolTip.SetToolTip(NUDSmoothBalanceCheckPoints, Language.T("Check points count."));
        }
        /// <summary>
        /// Sets controls in panel Settings
        /// </summary>
        void SetPanelSettings()
        {
            chbOutOfSample = new CheckBox();
            chbOutOfSample.Parent    = pnlSettings;
            chbOutOfSample.ForeColor = colorText;
            chbOutOfSample.BackColor = Color.Transparent;
            chbOutOfSample.Text      = Language.T("Out of sample testing, percent of OOS bars");
            chbOutOfSample.Checked   = false;
            chbOutOfSample.AutoSize  = true;
            chbOutOfSample.CheckedChanged += new EventHandler(ChbOutOfSample_CheckedChanged);

            nudOutOfSample = new NumericUpDown();
            nudOutOfSample.Parent    = pnlSettings;
            nudOutOfSample.TextAlign = HorizontalAlignment.Center;
            nudOutOfSample.BeginInit();
            nudOutOfSample.Minimum   = 10;
            nudOutOfSample.Maximum   = 60;
            nudOutOfSample.Increment = 1;
            nudOutOfSample.Value     = 30;
            nudOutOfSample.EndInit();
            nudOutOfSample.ValueChanged += new EventHandler(NudOutOfSample_ValueChanged);

            chbUseDefaultIndicatorValues = new CheckBox();
            chbUseDefaultIndicatorValues.Parent    = pnlSettings;
            chbUseDefaultIndicatorValues.ForeColor = colorText;
            chbUseDefaultIndicatorValues.BackColor = Color.Transparent;
            chbUseDefaultIndicatorValues.Text      = Language.T("Only use default numeric indicator values");
            chbUseDefaultIndicatorValues.Checked   = false;
            chbUseDefaultIndicatorValues.AutoSize  = true;

            chbHideFSB = new CheckBox();
            chbHideFSB.Parent    = pnlSettings;
            chbHideFSB.ForeColor = colorText;
            chbHideFSB.BackColor = Color.Transparent;
            chbHideFSB.Text      = Language.T("Hide FSB when Generator starts");
            chbHideFSB.Checked   = true;
            chbHideFSB.AutoSize  = true;
            chbHideFSB.Cursor    = Cursors.Default;

            btnReset = new Button();
            btnReset.Parent = pnlSettings;
            btnReset.UseVisualStyleBackColor = true;
            btnReset.Text = Language.T("Reset all parameters and settings");
            btnReset.Click += new EventHandler(BtnReset_Click);
        }
        /// <summary>
        /// Sets controls in panel Limitations
        /// </summary>
        void SetPanelLimitations()
        {
            chbAmbiguousBars = new CheckBox();
            chbAmbiguousBars.Parent    = pnlLimitations;
            chbAmbiguousBars.ForeColor = colorText;
            chbAmbiguousBars.BackColor = Color.Transparent;
            chbAmbiguousBars.Text      = Language.T("Maximum number of ambiguous bars");
            chbAmbiguousBars.Checked   = true;
            chbAmbiguousBars.AutoSize  = true;

            nudAmbiguousBars = new NumericUpDown();
            nudAmbiguousBars.Parent    = pnlLimitations;
            nudAmbiguousBars.TextAlign = HorizontalAlignment.Center;
            nudAmbiguousBars.BeginInit();
            nudAmbiguousBars.Minimum   = 0;
            nudAmbiguousBars.Maximum   = 100;
            nudAmbiguousBars.Increment = 1;
            nudAmbiguousBars.Value     = 10;
            nudAmbiguousBars.EndInit();

            chbMaxDrawdown = new CheckBox();
            chbMaxDrawdown.Parent    = pnlLimitations;
            chbMaxDrawdown.ForeColor = colorText;
            chbMaxDrawdown.BackColor = Color.Transparent;
            chbMaxDrawdown.Text      = Language.T("Maximum equity drawdown") + " [" + (Configs.AccountInMoney ? Configs.AccountCurrency + "]" : Language.T("pips") + "]");
            chbMaxDrawdown.Checked   = false;
            chbMaxDrawdown.AutoSize  = true;

            nudMaxDrawdown = new NumericUpDown();
            nudMaxDrawdown.Parent    = pnlLimitations;
            nudMaxDrawdown.TextAlign = HorizontalAlignment.Center;
            nudMaxDrawdown.BeginInit();
            nudMaxDrawdown.Minimum   = 0;
            nudMaxDrawdown.Maximum   = Configs.InitialAccount;
            nudMaxDrawdown.Increment = 10;
            nudMaxDrawdown.Value     = Configs.InitialAccount / 4;
            nudMaxDrawdown.EndInit();

            chbEquityPercent = new CheckBox();
            chbEquityPercent.Parent    = pnlLimitations;
            chbEquityPercent.ForeColor = colorText;
            chbEquityPercent.BackColor = Color.Transparent;
            chbEquityPercent.Text      = Language.T("Maximum equity drawdown") + " [% " + Configs.AccountCurrency + "]";
            chbEquityPercent.Checked   = true;
            chbEquityPercent.AutoSize  = true;

            nudEquityPercent = new NumericUpDown();
            nudEquityPercent.Parent    = pnlLimitations;
            nudEquityPercent.TextAlign = HorizontalAlignment.Center;
            nudEquityPercent.BeginInit();
            nudEquityPercent.Minimum   = 1;
            nudEquityPercent.Maximum   = 100;
            nudEquityPercent.Increment = 1;
            nudEquityPercent.Value     = 25;
            nudEquityPercent.EndInit();

            chbMinTrades = new CheckBox();
            chbMinTrades.Parent    = pnlLimitations;
            chbMinTrades.ForeColor = colorText;
            chbMinTrades.BackColor = Color.Transparent;
            chbMinTrades.Text      = Language.T("Minimum number of trades");
            chbMinTrades.Checked   = true;
            chbMinTrades.AutoSize  = true;

            nudMinTrades = new NumericUpDown();
            nudMinTrades.Parent    = pnlLimitations;
            nudMinTrades.TextAlign = HorizontalAlignment.Center;
            nudMinTrades.BeginInit();
            nudMinTrades.Minimum   = 10;
            nudMinTrades.Maximum   = 1000;
            nudMinTrades.Increment = 10;
            nudMinTrades.Value     = 100;
            nudMinTrades.EndInit();

            chbMaxTrades = new CheckBox();
            chbMaxTrades.Parent    = pnlLimitations;
            chbMaxTrades.ForeColor = colorText;
            chbMaxTrades.BackColor = Color.Transparent;
            chbMaxTrades.Text      = Language.T("Maximum number of trades");
            chbMaxTrades.Checked   = false;
            chbMaxTrades.AutoSize  = true;

            nudMaxTrades = new NumericUpDown();
            nudMaxTrades.Parent    = pnlLimitations;
            nudMaxTrades.TextAlign = HorizontalAlignment.Center;
            nudMaxTrades.BeginInit();
            nudMaxTrades.Minimum   = 10;
            nudMaxTrades.Maximum   = 10000;
            nudMaxTrades.Increment = 10;
            nudMaxTrades.Value     = 1000;
            nudMaxTrades.EndInit();

            chbWinLossRatio = new CheckBox();
            chbWinLossRatio.Parent    = pnlLimitations;
            chbWinLossRatio.ForeColor = colorText;
            chbWinLossRatio.BackColor = Color.Transparent;
            chbWinLossRatio.Text      = Language.T("Minimum win / loss trades ratio");
            chbWinLossRatio.Checked   = false;
            chbWinLossRatio.AutoSize  = true;

            nudWinLossRatio = new NumericUpDown();
            nudWinLossRatio.Parent    = pnlLimitations;
            nudWinLossRatio.TextAlign = HorizontalAlignment.Center;
            nudWinLossRatio.BeginInit();
            nudWinLossRatio.Minimum       = 0.10M;
            nudWinLossRatio.Maximum       = 1;
            nudWinLossRatio.Increment     = 0.01M;
            nudWinLossRatio.Value         = 0.30M;
            nudWinLossRatio.DecimalPlaces = 2;
            nudWinLossRatio.EndInit();

            chbOOSPatternFilter = new CheckBox();
            chbOOSPatternFilter.Parent    = pnlLimitations;
            chbOOSPatternFilter.ForeColor = colorText;
            chbOOSPatternFilter.BackColor = Color.Transparent;
            chbOOSPatternFilter.Text      = Language.T("Filter bad OOS performance");
            chbOOSPatternFilter.Checked   = false;
            chbOOSPatternFilter.AutoSize  = true;

            nudOOSPatternPercent = new NumericUpDown();
            nudOOSPatternPercent.Parent    = pnlLimitations;
            nudOOSPatternPercent.TextAlign = HorizontalAlignment.Center;
            nudOOSPatternPercent.BeginInit();
            nudOOSPatternPercent.Minimum = 1;
            nudOOSPatternPercent.Maximum = 50;
            nudOOSPatternPercent.Value   = 20;
            nudOOSPatternPercent.EndInit();
            toolTip.SetToolTip(nudOOSPatternPercent, Language.T("Deviation percent."));

            chbSmoothBalanceLines = new CheckBox();
            chbSmoothBalanceLines.Parent    = pnlLimitations;
            chbSmoothBalanceLines.ForeColor = colorText;
            chbSmoothBalanceLines.BackColor = Color.Transparent;
            chbSmoothBalanceLines.Text      = Language.T("Filter non-linear balance pattern");
            chbSmoothBalanceLines.Checked   = false;
            chbSmoothBalanceLines.AutoSize  = true;

            nudSmoothBalancePercent = new NumericUpDown();
            nudSmoothBalancePercent.Parent    = pnlLimitations;
            nudSmoothBalancePercent.TextAlign = HorizontalAlignment.Center;
            nudSmoothBalancePercent.BeginInit();
            nudSmoothBalancePercent.Minimum = 1;
            nudSmoothBalancePercent.Maximum = 50;
            nudSmoothBalancePercent.Value   = 20;
            nudSmoothBalancePercent.EndInit();
            toolTip.SetToolTip(nudSmoothBalancePercent, Language.T("Deviation percent."));

            nudSmoothBalanceCheckPoints = new NumericUpDown();
            nudSmoothBalanceCheckPoints.Parent    = pnlLimitations;
            nudSmoothBalanceCheckPoints.TextAlign = HorizontalAlignment.Center;
            nudSmoothBalanceCheckPoints.BeginInit();
            nudSmoothBalanceCheckPoints.Minimum = 1;
            nudSmoothBalanceCheckPoints.Maximum = 50;
            nudSmoothBalanceCheckPoints.Value   = 1;
            nudSmoothBalanceCheckPoints.EndInit();
            toolTip.SetToolTip(nudSmoothBalanceCheckPoints, Language.T("Check points count."));

            return;
        }
        /// <summary>
        /// Sets controls in panel Common
        /// </summary>
        void SetPanelCommon()
        {
            // chbGenerateNewStrategy
            chbGenerateNewStrategy.Parent    = pnlCommon;
            chbGenerateNewStrategy.Text      = Language.T("Generate a new strategy at every start");
            chbGenerateNewStrategy.AutoSize  = true;
            chbGenerateNewStrategy.Checked   = true;
            chbGenerateNewStrategy.ForeColor = LayoutColors.ColorControlText;
            chbGenerateNewStrategy.BackColor = Color.Transparent;

            // chbPreservPermSL
            chbPreservPermSL.Parent    = pnlCommon;
            chbPreservPermSL.Text      = Language.T("Do not change the Permanent Stop Loss");
            chbPreservPermSL.AutoSize  = true;
            chbPreservPermSL.Checked   = true;
            chbPreservPermSL.ForeColor = LayoutColors.ColorControlText;
            chbPreservPermSL.BackColor = Color.Transparent;

            // chbPreservPermTP
            chbPreservPermTP.Parent    = pnlCommon;
            chbPreservPermTP.Text      = Language.T("Do not change the Permanent Take Profit");
            chbPreservPermTP.AutoSize  = true;
            chbPreservPermTP.Checked   = true;
            chbPreservPermTP.ForeColor = LayoutColors.ColorControlText;
            chbPreservPermTP.BackColor = Color.Transparent;

            // chbPseudoOpt
            chbInitialOptimisation.Parent    = pnlCommon;
            chbInitialOptimisation.Text      = Language.T("Perform an initial optimization");
            chbInitialOptimisation.AutoSize  = true;
            chbInitialOptimisation.Checked   = true;
            chbInitialOptimisation.ForeColor = LayoutColors.ColorControlText;
            chbInitialOptimisation.BackColor = Color.Transparent;

            chbMaxOpeningLogicSlots = new CheckBox();
            chbMaxOpeningLogicSlots.Parent    = pnlCommon;
            chbMaxOpeningLogicSlots.ForeColor = colorText;
            chbMaxOpeningLogicSlots.BackColor = Color.Transparent;
            chbMaxOpeningLogicSlots.Text      = Language.T("Maximum number of opening logic slots");
            chbMaxOpeningLogicSlots.Checked   = true;
            chbMaxOpeningLogicSlots.AutoSize  = true;

            nudMaxOpeningLogicSlots = new NumericUpDown();
            nudMaxOpeningLogicSlots.Parent    = pnlCommon;
            nudMaxOpeningLogicSlots.TextAlign = HorizontalAlignment.Center;
            nudMaxOpeningLogicSlots.BeginInit();
            nudMaxOpeningLogicSlots.Minimum   = 0;
            nudMaxOpeningLogicSlots.Maximum   = Strategy.MaxOpenFilters;
            nudMaxOpeningLogicSlots.Increment = 1;
            nudMaxOpeningLogicSlots.Value     = 2;
            nudMaxOpeningLogicSlots.EndInit();

            chbMaxClosingLogicSlots = new CheckBox();
            chbMaxClosingLogicSlots.Parent    = pnlCommon;
            chbMaxClosingLogicSlots.ForeColor = colorText;
            chbMaxClosingLogicSlots.BackColor = Color.Transparent;
            chbMaxClosingLogicSlots.Text      = Language.T("Maximum number of closing logic slots");
            chbMaxClosingLogicSlots.Checked   = true;
            chbMaxClosingLogicSlots.AutoSize  = true;

            nudMaxClosingLogicSlots = new NumericUpDown();
            nudMaxClosingLogicSlots.Parent    = pnlCommon;
            nudMaxClosingLogicSlots.TextAlign = HorizontalAlignment.Center;
            nudMaxClosingLogicSlots.BeginInit();
            nudMaxClosingLogicSlots.Minimum   = 0;
            nudMaxClosingLogicSlots.Maximum   = Strategy.MaxCloseFilters;
            nudMaxClosingLogicSlots.Increment = 1;
            nudMaxClosingLogicSlots.Value     = 1;
            nudMaxClosingLogicSlots.EndInit();

            //lblNumUpDown
            lblWorkingMinutes.Parent    = pnlCommon;
            lblWorkingMinutes.ForeColor = LayoutColors.ColorControlText;
            lblWorkingMinutes.BackColor = Color.Transparent;
            lblWorkingMinutes.Text      = Language.T("Working time");
            lblWorkingMinutes.AutoSize  = true;
            lblWorkingMinutes.TextAlign = ContentAlignment.MiddleRight;

            // numUpDownWorkingTime
            nudWorkingMinutes.Parent    = pnlCommon;
            nudWorkingMinutes.Value     = 5;
            nudWorkingMinutes.Minimum   = 0;
            nudWorkingMinutes.Maximum   = 10000;
            nudWorkingMinutes.TextAlign = HorizontalAlignment.Center;
            toolTip.SetToolTip(nudWorkingMinutes, Language.T("Set the number of minutes for the Generator to work.") +
                Environment.NewLine + "0 - " + Language.T("No limits").ToLower() + ".");

            // Label Calculated Strategies Caption
            lblCalcStrInfo.Parent    = pnlCommon;
            lblCalcStrInfo.AutoSize  = true;
            lblCalcStrInfo.ForeColor = LayoutColors.ColorControlText;
            lblCalcStrInfo.BackColor = Color.Transparent;
            lblCalcStrInfo.Text      = Language.T("Calculations");

            // Label Calculated Strategies Number
            lblCalcStrNumb.Parent      = pnlCommon;
            lblCalcStrNumb.BorderStyle = BorderStyle.FixedSingle;
            lblCalcStrNumb.ForeColor   = LayoutColors.ColorControlText;
            lblCalcStrNumb.BackColor   = LayoutColors.ColorControlBack;
            lblCalcStrNumb.TextAlign   = ContentAlignment.MiddleCenter;
            lblCalcStrNumb.Text        = "0";
        }
        /// <summary>
        ///     Public constructor.
        /// </summary>
        public OverOptimization(string caption) : base(caption)
        {
            lblIntro = new Label();
            lblDeviation = new Label();
            lblParams = new Label();
            lblNoParams = new Label();
            nudDeviation = new NumericUpDown();
            nudParams = new NumericUpDown();
            btnStart = new Button();
            btnViewCharts = new Button();
            btnOpenFolder = new Button();
            btnOpenReport = new Button();
            progressBar = new ProgressBar();

            Color colorText = LayoutColors.ColorControlText;

            CountStrategyParams();
            bool isParams = countStratParams > 0;

            // Label Intro
            lblIntro.Parent = this;
            lblIntro.ForeColor = colorText;
            lblIntro.BackColor = Color.Transparent;
            lblIntro.AutoSize = false;
            lblIntro.Text =
                Language.T(
                    "The Over-optimization Report shows how the results of the backtest vary as the numerical parameters of the strategy change by a given percent.");

            // Label Deviation
            lblDeviation.Parent = this;
            lblDeviation.ForeColor = colorText;
            lblDeviation.BackColor = Color.Transparent;
            lblDeviation.AutoSize = true;
            lblDeviation.Text = Language.T("Parameters deviation % [recommended 20]");

            // Label Parameters
            lblParams.Parent = this;
            lblParams.ForeColor = colorText;
            lblParams.BackColor = Color.Transparent;
            lblParams.AutoSize = true;
            lblParams.Text = Language.T("Parameters number [recommended 20]");

            // lblNoParams
            lblNoParams.Parent = this;
            lblNoParams.Text = Language.T("There are no parameters suitable for analysis.");
            lblNoParams.ForeColor = LayoutColors.ColorSignalRed;
            lblNoParams.BackColor = Color.Transparent;
            lblNoParams.AutoSize = true;
            lblNoParams.Visible = !isParams;

            // NumericUpDown Deviation
            nudDeviation.BeginInit();
            nudDeviation.Parent = this;
            nudDeviation.Name = "Deviation";
            nudDeviation.TextAlign = HorizontalAlignment.Center;
            nudDeviation.Minimum = 1;
            nudDeviation.Maximum = 100;
            nudDeviation.Value = 20;
            nudDeviation.EndInit();

            // NumericUpDown Swap Long
            nudParams.BeginInit();
            nudParams.Parent = this;
            nudParams.Name = "Parameters";
            nudParams.TextAlign = HorizontalAlignment.Center;
            nudParams.Minimum = 1;
            nudParams.Maximum = 100;
            nudParams.Value = 20;
            nudParams.EndInit();

            // Button View Charts
            btnViewCharts.Parent = this;
            btnViewCharts.Name = "btnViewCharts";
            btnViewCharts.Text = Language.T("View Charts");
            btnViewCharts.ImageAlign = ContentAlignment.MiddleLeft;
            btnViewCharts.Image = Resources.overoptimization_chart;
            btnViewCharts.Enabled = false;
            btnViewCharts.Click += ViewChartsClick;
            btnViewCharts.UseVisualStyleBackColor = true;

            // Button Open report folder
            btnOpenFolder.Parent = this;
            btnOpenFolder.Name = "btnOpenFolder";
            btnOpenFolder.Text = Language.T("Open Folder");
            btnOpenFolder.ImageAlign = ContentAlignment.MiddleLeft;
            btnOpenFolder.Image = Resources.folder_open;
            btnOpenFolder.Enabled = false;
            btnOpenFolder.Click += OpenFolderClick;
            btnOpenFolder.UseVisualStyleBackColor = true;

            // Button Open Report
            btnOpenReport.Parent = this;
            btnOpenReport.Name = "btnOpenReport";
            btnOpenReport.Text = Language.T("Open Report");
            btnOpenReport.ImageAlign = ContentAlignment.MiddleLeft;
            btnOpenReport.Image = Resources.export;
            btnOpenReport.Enabled = false;
            btnOpenReport.Click += OpenReportClick;
            btnOpenReport.UseVisualStyleBackColor = true;

            // Button Start
            btnStart.Parent = this;
            btnStart.Text = Language.T("Start");
            btnStart.Enabled = isParams;
            btnStart.Click += BtnStartClick;
            btnStart.UseVisualStyleBackColor = true;

            // ProgressBar
            progressBar.Parent = this;
            progressBar.Minimum = 1;
            progressBar.Maximum = 100;
            progressBar.Step = 1;

            // BackgroundWorker
            bgWorker = new BackgroundWorker {WorkerReportsProgress = true, WorkerSupportsCancellation = true};
            bgWorker.DoWork += BgWorkerDoWork;
            bgWorker.ProgressChanged += BgWorkerProgressChanged;
            bgWorker.RunWorkerCompleted += BgWorkerRunWorkerCompleted;

            Resize += PnlOverOptimizationResize;
        }
        /// <summary>
        ///     Initialize the form and controls
        /// </summary>
        public Comparator()
        {
            PnlOptions = new Panel();
            PnlChart = new Panel();
            ProgressBar = new ProgressBar();
            LblAverageBalance = new Label();
            NumRandom = new NumericUpDown();
            LblRandomCycles = new Label();
            BtnCalculate = new Button();
            BtnClose = new Button();

            Text = Language.T("Comparator");
            BackColor = LayoutColors.ColorFormBack;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            Icon = Data.Icon;
            MaximizeBox = false;
            MinimizeBox = false;
            ShowInTaskbar = false;
            FormClosing += ActionsFormClosing;

            isPaintChart = false;

            //Button Calculate
            BtnCalculate.Parent = this;
            BtnCalculate.Name = "btnCalculate";
            BtnCalculate.Text = Language.T("Calculate");
            BtnCalculate.Click += BtnCalculateClick;
            BtnCalculate.UseVisualStyleBackColor = true;

            //Button Close
            BtnClose.Parent = this;
            BtnClose.Name = "btnClose";
            BtnClose.Text = Language.T("Close");
            BtnClose.DialogResult = DialogResult.OK;
            BtnClose.UseVisualStyleBackColor = true;

            // ProgressBar
            ProgressBar.Parent = this;
            ProgressBar.Minimum = 1;
            ProgressBar.Maximum = 100;
            ProgressBar.Step = 1;

            PnlChart.Parent = this;
            PnlChart.ForeColor = LayoutColors.ColorControlText;
            PnlChart.Paint += PnlChartPaint;

            PnlOptions.Parent = this;
            PnlOptions.ForeColor = LayoutColors.ColorControlText;
            PnlOptions.Paint += PnlOptionsPaint;

            countMethods = Enum.GetValues(typeof (InterpolationMethod)).Length;
            AchboxMethods = new CheckBox[countMethods];
            for (int i = 0; i < countMethods; i++)
            {
                AchboxMethods[i] = new CheckBox
                    {
                        Parent = PnlOptions,
                        Text = Language.T(Enum.GetNames(typeof (InterpolationMethod))[i]),
                        Tag = Enum.GetValues(typeof (InterpolationMethod)).GetValue(i),
                        Checked = true,
                        BackColor = Color.Transparent,
                        AutoSize = true
                    };
                AchboxMethods[i].CheckedChanged += ComparatorCheckedChanged;
            }

            // Label Average Balance
            LblAverageBalance.Parent = PnlOptions;
            LblAverageBalance.AutoSize = true;
            LblAverageBalance.Text = Language.T("Average balance");
            LblAverageBalance.ForeColor = LayoutColors.ColorControlText;
            LblAverageBalance.BackColor = Color.Transparent;
            LblAverageBalance.TextAlign = ContentAlignment.MiddleLeft;

            // NumUpDown random cycles
            NumRandom.BeginInit();
            NumRandom.Parent = this;
            NumRandom.Value = 25;
            NumRandom.Minimum = 3;
            NumRandom.Maximum = 100;
            NumRandom.TextAlign = HorizontalAlignment.Center;
            NumRandom.EndInit();

            // Label Random Cycles
            LblRandomCycles.Parent = this;
            LblRandomCycles.AutoSize = true;
            LblRandomCycles.ForeColor = LayoutColors.ColorControlText;
            LblRandomCycles.BackColor = Color.Transparent;
            LblRandomCycles.Text = Language.T("Random iterations");
            LblRandomCycles.TextAlign = ContentAlignment.MiddleLeft;

            // Colors
            penOptimistic = new Pen(LayoutColors.ComparatorChartOptimisticLine);
            penPessimistic = new Pen(LayoutColors.ComparatorChartPessimisticLine);
            penShortest = new Pen(LayoutColors.ComparatorChartShortestLine);
            penNearest = new Pen(LayoutColors.ComparatorChartNearestLine);
            penRandom = new Pen(LayoutColors.ComparatorChartRandomLine);
            penRandBands = new Pen(LayoutColors.ComparatorChartRandomBands);
            brushRandArea = new SolidBrush(LayoutColors.ComparatorChartRandomArea);
            penBalance = new Pen(LayoutColors.ComparatorChartBalanceLine) {Width = 2};

            // BackGroundWorker
            bgWorker = new BackgroundWorker {WorkerReportsProgress = true, WorkerSupportsCancellation = true};
            bgWorker.DoWork += BgWorkerDoWork;
            bgWorker.ProgressChanged += BgWorkerProgressChanged;
            bgWorker.RunWorkerCompleted += BgWorkerRunWorkerCompleted;

            Configs.TradeUntilMarginCall = false;
        }
        /// <summary>
        ///     Constructor
        /// </summary>
        public InstrumentEditor()
        {
            PnlInstruments = new FancyPanel(Language.T("Instruments"));
            PnlProperties = new FancyPanel(Language.T("Instrument Properties"));
            PnlAddInstrument = new FancyPanel(Language.T("Add an Instrument"));

            // Instruments' controls
            LbxInstruments = new ListBox();
            BtnDelete = new Button();
            BtnUp = new Button();
            BtnDown = new Button();

            // Properties' controls
            LblPropSymbol = new Label();
            LblPropType = new Label();
            LblPropComment = new Label();
            LblPropDigits = new Label();
            LblPropPoint = new Label();
            LblPropLots = new Label();
            LblPropSpread = new Label();
            LblPropSwap = new Label();
            LblPropCommission = new Label();
            LblPropSlippage = new Label();
            LblPropPriceIn = new Label();
            LblPropAccountIn = new Label();
            LblPropAccountRate = new Label();
            LblPropFileName = new Label();
            LblPropDataFiles = new Label();

            TbxPropSymbol = new TextBox();
            TbxPropType = new TextBox();
            TbxPropComment = new TextBox();
            TbxPropPoint = new TextBox();
            TbxPropSpread = new TextBox();
            TbxPropSlippage = new TextBox();
            TbxPropPriceIn = new TextBox();
            TbxPropAccountIn = new TextBox();
            TbxPropAccountRate = new TextBox();
            TbxPropFileName = new TextBox();

            CbxPropSwap = new ComboBox();
            CbxPropCommission = new ComboBox();
            CbxPropCommScope = new ComboBox();
            CbxPropCommTime = new ComboBox();

            NudPropDigits = new NumericUpDown();
            NudPropLotSize = new NumericUpDown();
            NudPropSpread = new NumericUpDown();
            NudPropSwapLong = new NumericUpDown();
            NudPropSwapShort = new NumericUpDown();
            NudPropCommission = new NumericUpDown();
            NudPropSlippage = new NumericUpDown();
            NudPropAccountRate = new NumericUpDown();

            BtnAccept = new Button();

            // Add an Instrument's controls
            LblAddInstrSymbol = new Label();
            LblAddInstrType = new Label();
            TbxAddInstrSymbol = new TextBox();
            CbxAddInstrType = new ComboBox();
            BtnAddInstrAdd = new Button();

            BtnClose = new Button();

            fontCaption = new Font(Font.FontFamily, 9);
            captionHeight = Math.Max(fontCaption.Height, 18);
            colorText = LayoutColors.ColorControlText;
            NeedReset = false;

            MaximizeBox = false;
            MinimizeBox = false;
            ShowInTaskbar = false;
            Icon = Data.Icon;
            BackColor = LayoutColors.ColorFormBack;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            AcceptButton = BtnAccept;
            Text = Language.T("Instrument Editor");
            FormClosing += InstrumentEditorFormClosing;

            // PnlInstruments
            PnlInstruments.Parent = this;

            // PnlProperties
            PnlProperties.Parent = this;

            // PnlAddInstrument
            PnlAddInstrument.Parent = this;

            // LbxInstruments
            LbxInstruments.Parent = PnlInstruments;
            LbxInstruments.BackColor = LayoutColors.ColorControlBack;
            //LbxInstruments.BorderStyle = BorderStyle.None;
            LbxInstruments.ForeColor = colorText;
            foreach (string symbol in Instruments.SymbolList)
                LbxInstruments.Items.Add(symbol);

            // Button UP
            BtnUp.Parent = PnlInstruments;
            BtnUp.Text = Language.T("Up");
            BtnUp.UseVisualStyleBackColor = true;
            BtnUp.Click += BtnUpClick;

            // Button Down
            BtnDown.Parent = PnlInstruments;
            BtnDown.Text = Language.T("Down");
            BtnDown.UseVisualStyleBackColor = true;
            BtnDown.Click += BtnDownClick;

            // Button Delete
            BtnDelete.Parent = PnlInstruments;
            BtnDelete.Text = Language.T("Delete");
            BtnDelete.UseVisualStyleBackColor = true;
            BtnDelete.Click += BtnDeleteClick;

            // LblAddInstrSymbol
            LblAddInstrSymbol.Parent = PnlAddInstrument;
            LblAddInstrSymbol.ForeColor = colorText;
            LblAddInstrSymbol.BackColor = Color.Transparent;
            LblAddInstrSymbol.AutoSize = false;
            LblAddInstrSymbol.TextAlign = ContentAlignment.MiddleRight;
            LblAddInstrSymbol.Text = Language.T("Symbol");

            // TbxAddInstrSymbol
            TbxAddInstrSymbol.Parent = PnlAddInstrument;
            TbxAddInstrSymbol.ForeColor = colorText;

            // LblAddInstrType
            LblAddInstrType.Parent = PnlAddInstrument;
            LblAddInstrType.ForeColor = colorText;
            LblAddInstrType.BackColor = Color.Transparent;
            LblAddInstrType.AutoSize = false;
            LblAddInstrType.TextAlign = ContentAlignment.MiddleRight;
            LblAddInstrType.Text = Language.T("Type");

            // CbxAddInstrType
            CbxAddInstrType.Parent = PnlAddInstrument;
            CbxAddInstrType.Name = "cbxAddInstrType";
            CbxAddInstrType.DropDownStyle = ComboBoxStyle.DropDownList;
            string[] instrTypes = Enum.GetNames(typeof (InstrumetType));
            foreach (string type in instrTypes)
                CbxAddInstrType.Items.Add(type);
            CbxAddInstrType.SelectedIndex = 0;

            // BtnAddInstrAdd
            BtnAddInstrAdd.Parent = PnlAddInstrument;
            BtnAddInstrAdd.Name = "btnAddInstrAdd";
            BtnAddInstrAdd.Text = Language.T("Add");
            BtnAddInstrAdd.UseVisualStyleBackColor = true;
            BtnAddInstrAdd.Click += BtnAddInstrAddClick;

            // LblPropSymbol
            LblPropSymbol.Parent = PnlProperties;
            LblPropSymbol.ForeColor = colorText;
            LblPropSymbol.BackColor = Color.Transparent;
            LblPropSymbol.AutoSize = false;
            LblPropSymbol.TextAlign = ContentAlignment.MiddleRight;
            LblPropSymbol.Text = Language.T("Symbol");

            // LblPropType
            LblPropType.Parent = PnlProperties;
            LblPropType.ForeColor = colorText;
            LblPropType.BackColor = Color.Transparent;
            LblPropType.AutoSize = false;
            LblPropType.TextAlign = ContentAlignment.MiddleRight;
            LblPropType.Text = Language.T("Type");

            // LblPropComment
            LblPropComment.Parent = PnlProperties;
            LblPropComment.ForeColor = colorText;
            LblPropComment.BackColor = Color.Transparent;
            LblPropComment.AutoSize = false;
            LblPropComment.TextAlign = ContentAlignment.MiddleRight;
            LblPropComment.Text = Language.T("Comment");

            // LblPropDigits
            LblPropDigits.Parent = PnlProperties;
            LblPropDigits.ForeColor = colorText;
            LblPropDigits.BackColor = Color.Transparent;
            LblPropDigits.AutoSize = false;
            LblPropDigits.TextAlign = ContentAlignment.MiddleRight;
            LblPropDigits.Text = Language.T("Digits");

            // LblPropPoint
            LblPropPoint.Parent = PnlProperties;
            LblPropPoint.ForeColor = colorText;
            LblPropPoint.BackColor = Color.Transparent;
            LblPropPoint.AutoSize = false;
            LblPropPoint.TextAlign = ContentAlignment.MiddleRight;
            LblPropPoint.Text = Language.T("Point value");

            // LblPropLots
            LblPropLots.Parent = PnlProperties;
            LblPropLots.ForeColor = colorText;
            LblPropLots.BackColor = Color.Transparent;
            LblPropLots.AutoSize = false;
            LblPropLots.TextAlign = ContentAlignment.MiddleRight;
            LblPropLots.Text = Language.T("Lot size");

            // LblPropSpread
            LblPropSpread.Parent = PnlProperties;
            LblPropSpread.ForeColor = colorText;
            LblPropSpread.BackColor = Color.Transparent;
            LblPropSpread.AutoSize = false;
            LblPropSpread.TextAlign = ContentAlignment.MiddleRight;
            LblPropSpread.Text = Language.T("Spread in");

            // LblPropSwap
            LblPropSwap.Parent = PnlProperties;
            LblPropSwap.ForeColor = colorText;
            LblPropSwap.BackColor = Color.Transparent;
            LblPropSwap.AutoSize = false;
            LblPropSwap.TextAlign = ContentAlignment.MiddleRight;
            LblPropSwap.Text = Language.T("Swap in");

            // LblPropCommission
            LblPropCommission.Parent = PnlProperties;
            LblPropCommission.ForeColor = colorText;
            LblPropCommission.BackColor = Color.Transparent;
            LblPropCommission.AutoSize = false;
            LblPropCommission.TextAlign = ContentAlignment.MiddleRight;
            LblPropCommission.Text = Language.T("Commission in");

            // LblPropSlippage
            LblPropSlippage.Parent = PnlProperties;
            LblPropSlippage.ForeColor = colorText;
            LblPropSlippage.BackColor = Color.Transparent;
            LblPropSlippage.AutoSize = false;
            LblPropSlippage.TextAlign = ContentAlignment.MiddleRight;
            LblPropSlippage.Text = Language.T("Slippage in");

            // LblPropPriceIn
            LblPropPriceIn.Parent = PnlProperties;
            LblPropPriceIn.ForeColor = colorText;
            LblPropPriceIn.BackColor = Color.Transparent;
            LblPropPriceIn.AutoSize = false;
            LblPropPriceIn.TextAlign = ContentAlignment.MiddleRight;
            LblPropPriceIn.Text = Language.T("Price in");

            // LblPropAccountIn
            LblPropAccountIn.Parent = PnlProperties;
            LblPropAccountIn.ForeColor = colorText;
            LblPropAccountIn.BackColor = Color.Transparent;
            LblPropAccountIn.AutoSize = false;
            LblPropAccountIn.TextAlign = ContentAlignment.MiddleRight;
            LblPropAccountIn.Text = Language.T("Account in");

            // LblPropAccountRate
            LblPropAccountRate.Parent = PnlProperties;
            LblPropAccountRate.ForeColor = colorText;
            LblPropAccountRate.BackColor = Color.Transparent;
            LblPropAccountRate.AutoSize = false;
            LblPropAccountRate.TextAlign = ContentAlignment.MiddleRight;
            LblPropAccountRate.Text = Language.T("Account exchange rate");

            // LblPropFileName
            LblPropFileName.Parent = PnlProperties;
            LblPropFileName.BackColor = Color.Transparent;
            LblPropFileName.ForeColor = colorText;
            LblPropFileName.AutoSize = false;
            LblPropFileName.TextAlign = ContentAlignment.MiddleRight;
            LblPropFileName.Text = Language.T("Base name of the data files");

            // LblPropDataFiles
            LblPropDataFiles.Parent = PnlProperties;
            LblPropDataFiles.BackColor = Color.Transparent;
            LblPropDataFiles.ForeColor = colorText;
            LblPropDataFiles.AutoSize = false;
            LblPropDataFiles.TextAlign = ContentAlignment.TopLeft;
            LblPropDataFiles.Text = "";

            // TbxPropSymbol
            TbxPropSymbol.Parent = PnlProperties;
            TbxPropSymbol.BackColor = LayoutColors.ColorControlBack;
            TbxPropSymbol.ForeColor = colorText;
            TbxPropSymbol.Enabled = false;

            // TbxPropType
            TbxPropType.Parent = PnlProperties;
            TbxPropType.BackColor = LayoutColors.ColorControlBack;
            TbxPropType.ForeColor = colorText;
            TbxPropType.Enabled = false;

            // TbxPropComment
            TbxPropComment.Parent = PnlProperties;
            TbxPropComment.BackColor = LayoutColors.ColorControlBack;
            TbxPropComment.ForeColor = colorText;

            // TbxPropPoint
            TbxPropPoint.Parent = PnlProperties;
            TbxPropPoint.BackColor = LayoutColors.ColorControlBack;
            TbxPropPoint.ForeColor = colorText;
            TbxPropPoint.Enabled = false;

            // TbxPropSpread
            TbxPropSpread.Parent = PnlProperties;
            TbxPropSpread.BackColor = LayoutColors.ColorControlBack;
            TbxPropSpread.ForeColor = colorText;
            TbxPropSpread.Enabled = false;
            TbxPropSpread.Text = Language.T("points");

            // TbxPropSlippage
            TbxPropSlippage.Parent = PnlProperties;
            TbxPropSlippage.BackColor = LayoutColors.ColorControlBack;
            TbxPropSlippage.ForeColor = colorText;
            TbxPropSlippage.Enabled = false;
            TbxPropSlippage.Text = Language.T("points");

            // TbxPropPriceIn
            TbxPropPriceIn.Parent = PnlProperties;
            TbxPropPriceIn.BackColor = LayoutColors.ColorControlBack;
            TbxPropPriceIn.ForeColor = colorText;
            TbxPropPriceIn.TextChanged += TbxPropPriceInTextChanged;

            // TbxPropAccountIn
            TbxPropAccountIn.Parent = PnlProperties;
            TbxPropAccountIn.BackColor = LayoutColors.ColorControlBack;
            TbxPropAccountIn.ForeColor = colorText;
            TbxPropAccountIn.Enabled = false;
            TbxPropAccountIn.Text = Configs.AccountCurrency;

            // TbxPropAccountRate
            TbxPropAccountRate.Parent = PnlProperties;
            TbxPropAccountRate.BackColor = LayoutColors.ColorControlBack;
            TbxPropAccountRate.ForeColor = colorText;
            TbxPropAccountRate.Enabled = false;
            TbxPropAccountRate.Text = "Deal price";

            // TbxPropFileName
            TbxPropFileName.Parent = PnlProperties;
            TbxPropFileName.BackColor = LayoutColors.ColorControlBack;
            TbxPropFileName.ForeColor = colorText;
            TbxPropFileName.TextChanged += TbxPropFileNameTextChanged;

            // CbxPropSwap
            CbxPropSwap.Parent = PnlProperties;
            CbxPropSwap.Name = "CbxPropSwap";
            CbxPropSwap.DropDownStyle = ComboBoxStyle.DropDownList;
            CbxPropSwap.Items.AddRange(new object[] {Language.T("points"), Language.T("percent"), Language.T("money")});
            CbxPropSwap.SelectedIndex = 0;

            // CbxPropCommission
            CbxPropCommission.Parent = PnlProperties;
            CbxPropCommission.Name = "CbxPropCommission";
            CbxPropCommission.DropDownStyle = ComboBoxStyle.DropDownList;
            CbxPropCommission.Items.AddRange(new object[]
                {Language.T("points"), Language.T("percent"), Language.T("money")});
            CbxPropCommission.SelectedIndex = 0;
            CbxPropCommission.SelectedIndexChanged += CbxPropCommissionSelectedIndexChanged;

            // CbxPropCommScope
            CbxPropCommScope.Parent = PnlProperties;
            CbxPropCommScope.Name = "CbxPropCommScope";
            CbxPropCommScope.DropDownStyle = ComboBoxStyle.DropDownList;
            CbxPropCommScope.Items.AddRange(new object[] {Language.T("per lot"), Language.T("per deal")});
            CbxPropCommScope.SelectedIndex = 0;

            // CbxPropCommTime
            CbxPropCommTime.Parent = PnlProperties;
            CbxPropCommTime.Name = "CbxPropCommTime";
            CbxPropCommTime.DropDownStyle = ComboBoxStyle.DropDownList;
            CbxPropCommTime.Items.AddRange(new object[] {Language.T("at opening"), Language.T("at open/close")});
            CbxPropCommTime.SelectedIndex = 0;

            // NumericUpDown Digits
            NudPropDigits.BeginInit();
            NudPropDigits.Parent = PnlProperties;
            NudPropDigits.Name = "NUDPropDigits";
            NudPropDigits.Minimum = 0;
            NudPropDigits.Maximum = 5;
            NudPropDigits.Increment = 1;
            NudPropDigits.Value = 4;
            NudPropDigits.TextAlign = HorizontalAlignment.Center;
            NudPropDigits.ValueChanged += NudPropDigitsValueChanged;
            NudPropDigits.EndInit();

            // NUDPropLotSize
            NudPropLotSize.BeginInit();
            NudPropLotSize.Parent = PnlProperties;
            NudPropLotSize.Name = "NUDPropLotSize";
            NudPropLotSize.Minimum = 0;
            NudPropLotSize.Maximum = 100000;
            NudPropLotSize.Increment = 1;
            NudPropLotSize.Value = 10000;
            NudPropLotSize.TextAlign = HorizontalAlignment.Center;
            NudPropLotSize.EndInit();

            // NUDPropSpread
            NudPropSpread.BeginInit();
            NudPropSpread.Parent = PnlProperties;
            NudPropSpread.Name = "NUDPropSpread";
            NudPropSpread.TextAlign = HorizontalAlignment.Center;
            NudPropSpread.Minimum = 0;
            NudPropSpread.Maximum = 500;
            NudPropSpread.Increment = 0.01M;
            NudPropSpread.DecimalPlaces = 2;
            NudPropSpread.Value = 4;
            NudPropSpread.EndInit();
            toolTip.SetToolTip(NudPropSpread, Language.T("Difference between Bid and Ask prices."));

            // NumericUpDown Swap Long
            NudPropSwapLong.BeginInit();
            NudPropSwapLong.Parent = PnlProperties;
            NudPropSwapLong.Name = "NUDPropSwapLong";
            NudPropSwapLong.TextAlign = HorizontalAlignment.Center;
            NudPropSwapLong.Minimum = -500;
            NudPropSwapLong.Maximum = 500;
            NudPropSwapLong.Increment = 0.01M;
            NudPropSwapLong.DecimalPlaces = 2;
            NudPropSwapLong.Value = 1;
            NudPropSwapLong.EndInit();
            toolTip.SetToolTip(NudPropSwapLong,
                               Language.T("Swap number for a long position rollover") + Environment.NewLine +
                               Language.T("A positive value decreases your profit."));

            // NumericUpDown Swap Short
            NudPropSwapShort.BeginInit();
            NudPropSwapShort.Parent = PnlProperties;
            NudPropSwapShort.Name = "NUDPropSwapShort";
            NudPropSwapShort.TextAlign = HorizontalAlignment.Center;
            NudPropSwapShort.Minimum = -500;
            NudPropSwapShort.Maximum = 500;
            NudPropSwapShort.Increment = 0.01M;
            NudPropSwapShort.DecimalPlaces = 2;
            NudPropSwapShort.Value = -1;
            NudPropSwapShort.EndInit();
            toolTip.SetToolTip(NudPropSwapShort,
                               Language.T("Swap number for a short position rollover") + Environment.NewLine +
                               Language.T("A negative value decreases your profit."));

            // NumericUpDown NUDPropCommission
            NudPropCommission.BeginInit();
            NudPropCommission.Parent = PnlProperties;
            NudPropCommission.Name = "NUDPropCommission";
            NudPropCommission.TextAlign = HorizontalAlignment.Center;
            NudPropCommission.Minimum = -500;
            NudPropCommission.Maximum = 500;
            NudPropCommission.Increment = 0.01M;
            NudPropCommission.DecimalPlaces = 2;
            NudPropCommission.Value = 0;
            NudPropCommission.EndInit();

            // NumericUpDown NUDPropSlippage
            NudPropSlippage.BeginInit();
            NudPropSlippage.Parent = PnlProperties;
            NudPropSlippage.Name = "NUDPropSlippage";
            NudPropSlippage.TextAlign = HorizontalAlignment.Center;
            NudPropSlippage.Minimum = 0;
            NudPropSlippage.Maximum = 200;
            NudPropSlippage.Increment = 1;
            NudPropSlippage.DecimalPlaces = 0;
            NudPropSlippage.Value = 0;
            NudPropSlippage.EndInit();
            toolTip.SetToolTip(NudPropSlippage,
                               Language.T("Number of points you lose due to an inaccurate order execution."));

            // NumericUpDown NUDPropAccountRate
            NudPropAccountRate.BeginInit();
            NudPropAccountRate.Parent = PnlProperties;
            NudPropAccountRate.Name = "NUDPropAccountRate";
            NudPropAccountRate.TextAlign = HorizontalAlignment.Center;
            NudPropAccountRate.Minimum = 0;
            NudPropAccountRate.Maximum = 100000;
            NudPropAccountRate.Increment = 0.0001M;
            NudPropAccountRate.DecimalPlaces = 4;
            NudPropAccountRate.Value = 1;
            NudPropAccountRate.ValueChanged += NudPropAccountRateValueChanged;
            NudPropAccountRate.EndInit();

            // Button Accept
            BtnAccept.Parent = PnlProperties;
            BtnAccept.Name = "btnAccept";
            BtnAccept.Text = Language.T("Accept");
            BtnAccept.Click += BtnAcceptClick;
            BtnAccept.UseVisualStyleBackColor = true;

            //Button Close
            BtnClose.Parent = this;
            BtnClose.Text = Language.T("Close");
            BtnClose.DialogResult = DialogResult.Cancel;
            BtnClose.UseVisualStyleBackColor = true;
        }
        /// <summary>
        /// Constructor
        /// </summary>
        public JForex_Import()
        {
            lblIntro         = new Label();
            txbDataDirectory = new TextBox();
            btnBrowse        = new Button();
            pnlSettings      = new Fancy_Panel();
            pnlInfoBase      = new Fancy_Panel(Language.T("Imported Files"));
            tbxInfo          = new TextBox();
            btnHelp          = new Button();
            btnClose         = new Button();
            btnImport        = new Button();
            progressBar      = new ProgressBar();

            lblMarketClose  = new Label();
            lblMarketOpen   = new Label();
            nudMarketClose  = new NumericUpDown();
            nudMarketOpen   = new NumericUpDown();

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

            MaximizeBox     = false;
            MinimizeBox     = false;
            ShowInTaskbar   = false;
            Icon            = Data.Icon;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            AcceptButton    = btnImport;
            CancelButton    = btnClose;
            Text            = Language.T("JForex Import");

            // Label Intro
            lblIntro.Parent    = pnlSettings;
            lblIntro.ForeColor = colorText;
            lblIntro.BackColor = Color.Transparent;
            lblIntro.AutoSize  = true;
            lblIntro.Text      = Language.T("Directory containing JForex data files:");

            // Data Directory
            txbDataDirectory.Parent    = pnlSettings;
            txbDataDirectory.BackColor = LayoutColors.ColorControlBack;
            txbDataDirectory.ForeColor = colorText;
            txbDataDirectory.Text      = Configs.JForexDataPath;

            // Button Browse
            btnBrowse.Parent = pnlSettings;
            btnBrowse.Name   = "Browse";
            btnBrowse.Text   = Language.T("Browse");
            btnBrowse.Click += new EventHandler(BtnBrowse_Click);
            btnBrowse.UseVisualStyleBackColor = true;

            // Label Market Close
            lblMarketClose.Parent    = pnlSettings;
            lblMarketClose.ForeColor = colorText;
            lblMarketClose.BackColor = Color.Transparent;
            lblMarketClose.AutoSize  = true;
            lblMarketClose.Text      = Language.T("Market closing hour on Friday:");

            // Label Market Open
            lblMarketOpen.Parent    = pnlSettings;
            lblMarketOpen.ForeColor = colorText;
            lblMarketOpen.BackColor = Color.Transparent;
            lblMarketOpen.AutoSize  = true;
            lblMarketOpen.Text      = Language.T("Market opening hour on Sunday:");

            // nudMarketClose
            nudMarketClose.BeginInit();
            nudMarketClose.Parent    = pnlSettings;
            nudMarketClose.TextAlign = HorizontalAlignment.Center;
            nudMarketClose.Minimum   = 0;
            nudMarketClose.Maximum   = 24;
            nudMarketClose.Increment = 1;
            nudMarketClose.Value     = Configs.MarketClosingHour;
            nudMarketClose.EndInit();

            // nudMarketOpen
            nudMarketOpen.BeginInit();
            nudMarketOpen.Parent    = pnlSettings;
            nudMarketOpen.TextAlign = HorizontalAlignment.Center;
            nudMarketOpen.Minimum   = 0;
            nudMarketOpen.Maximum   = 24;
            nudMarketOpen.Increment = 1;
            nudMarketOpen.Value     = Configs.MarketOpeningHour;
            nudMarketOpen.EndInit();

            // pnlSettings
            pnlSettings.Parent = this;

            // pnlInfoBase
            pnlInfoBase.Parent  = this;
            pnlInfoBase.Padding = new Padding(4, (int)pnlInfoBase.CaptionHeight, 2, 2);

            // tbxInfo
            tbxInfo.Parent        = pnlInfoBase;
            tbxInfo.BorderStyle   = BorderStyle.None;
            tbxInfo.Dock          = DockStyle.Fill;
            tbxInfo.BackColor     = LayoutColors.ColorControlBack;
            tbxInfo.ForeColor     = LayoutColors.ColorControlText;
            tbxInfo.Multiline     = true;
            tbxInfo.AcceptsReturn = true;
            tbxInfo.AcceptsTab    = true;
            tbxInfo.ScrollBars    = ScrollBars.Vertical;

            // ProgressBar
            progressBar.Parent = this;

            // Button Help
            btnHelp.Parent = this;
            btnHelp.Name   = "Help";
            btnHelp.Text   = Language.T("Help");
            btnHelp.Click += new EventHandler(BtnHelp_Click);
            btnHelp.UseVisualStyleBackColor = true;

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

            // Button Import
            btnImport.Parent = this;
            btnImport.Name   = "Import";
            btnImport.Text   = Language.T("Import");
            btnImport.Click += new EventHandler(BtnImport_Click);
            btnImport.UseVisualStyleBackColor = true;

            // BackGroundWorker
            bgWorker = new BackgroundWorker();
            bgWorker.WorkerReportsProgress = true;
            bgWorker.WorkerSupportsCancellation = true;
            bgWorker.DoWork += new DoWorkEventHandler(BgWorker_DoWork);
            bgWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(BgWorker_RunWorkerCompleted);
        }
        /// <summary>
        ///     Constructor.
        /// </summary>
        public TrueForexTickDataImport()
        {
            outFolder = Configs.TrueFxImportDestFolder;

            LblIntro = new Label();
            TxbFileName = new TextBox();
            BtnBrowse = new Button();
            LblMinBars = new Label();
            NudMinBars = new NumericUpDown();
            PnlSettings = new FancyPanel();
            PnlImportInfo = new FancyPanel(Language.T("Imported Data"));
            TbxInfo = new TextBox();
            LblDestFolder = new Label();
            TxbDestFolder = new TextBox();
            BtnDestFolder = new Button();
            BtnHelp = new Button();
            BtnClose = new Button();
            BtnImport = new Button();
            ProgressBar = new ProgressBar();

            MaximizeBox = false;
            MinimizeBox = false;
            ShowInTaskbar = false;
            Icon = Data.Icon;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            AcceptButton = BtnImport;
            CancelButton = BtnClose;
            Text = Language.T("TrueFX Import");

            // Label Intro
            LblIntro.Parent = PnlSettings;
            LblIntro.ForeColor = LayoutColors.ColorControlText;
            LblIntro.BackColor = Color.Transparent;
            LblIntro.AutoSize = true;
            LblIntro.Text = Language.T("Select TrueFX source folder") + ":";

            // File Name
            TxbFileName.Parent = PnlSettings;
            TxbFileName.BackColor = LayoutColors.ColorControlBack;
            TxbFileName.ForeColor = LayoutColors.ColorControlText;
            TxbFileName.Text = string.Empty;


            // Button Browse
            BtnBrowse.Parent = PnlSettings;
            BtnBrowse.Name = "Browse";
            BtnBrowse.Text = Language.T("Browse");
            BtnBrowse.Click += BtnBrowseClick;
            BtnBrowse.UseVisualStyleBackColor = true;

            LblMinBars.Parent = PnlSettings;
            LblMinBars.ForeColor = LayoutColors.ColorControlText;
            LblMinBars.BackColor = Color.Transparent;
            LblMinBars.AutoSize = true;
            LblMinBars.Text = Language.T("Minimum bars in bar files") + ":";

            // Minimum Bars
            NudMinBars.Parent = PnlSettings;
            NudMinBars.BeginInit();
            NudMinBars.Minimum = 0;
            NudMinBars.Maximum = int.MaxValue;
            NudMinBars.Value = Configs.MinBarsInBarFile;
            NudMinBars.EndInit();

            // LblDestFolder
            LblDestFolder.Parent = PnlSettings;
            LblDestFolder.ForeColor = LayoutColors.ColorControlText;
            LblDestFolder.BackColor = Color.Transparent;
            LblDestFolder.AutoSize = true;
            LblDestFolder.Text = Language.T("Select a destination folder") + ":";

            // TxbDestFolder
            TxbDestFolder.Parent = PnlSettings;
            TxbDestFolder.BackColor = LayoutColors.ColorControlBack;
            TxbDestFolder.ForeColor = LayoutColors.ColorControlText;
            TxbDestFolder.Text = String.IsNullOrEmpty(Configs.TrueFxImportDestFolder)
                                     ? Data.OfflineDataDir
                                     : Configs.TrueFxImportDestFolder;

            // BtnDestFolder
            BtnDestFolder.Parent = PnlSettings;
            BtnDestFolder.Name = "BtnDestFolder";
            BtnDestFolder.Text = Language.T("Browse");
            BtnDestFolder.Click += BtnDestFolderClick;
            BtnDestFolder.UseVisualStyleBackColor = true;

            // PnlSettings
            PnlSettings.Parent = this;

            // PnlInfoBase
            PnlImportInfo.Parent = this;
            PnlImportInfo.Padding = new Padding(4, (int) PnlImportInfo.CaptionHeight, 2, 2);

            // TbxInfo
            TbxInfo.Parent = PnlImportInfo;
            TbxInfo.BorderStyle = BorderStyle.None;
            TbxInfo.Dock = DockStyle.Fill;
            TbxInfo.BackColor = LayoutColors.ColorControlBack;
            TbxInfo.ForeColor = LayoutColors.ColorControlText;
            TbxInfo.Multiline = true;
            TbxInfo.AcceptsReturn = true;
            TbxInfo.AcceptsTab = true;
            TbxInfo.ScrollBars = ScrollBars.Vertical;

            // ProgressBar
            ProgressBar.Parent = this;

            // Button Help
            BtnHelp.Parent = this;
            BtnHelp.Name = "Help";
            BtnHelp.Text = Language.T("Help");
            BtnHelp.Click += BtnHelpClick;
            BtnHelp.UseVisualStyleBackColor = true;

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

            // Button Import
            BtnImport.Parent = this;
            BtnImport.Name = "Import";
            BtnImport.Text = Language.T("Import");
            BtnImport.Click += BtnImportClick;
            BtnImport.UseVisualStyleBackColor = true;

            // BackGroundWorker
            bgWorker = new BackgroundWorker {WorkerReportsProgress = true, WorkerSupportsCancellation = true};
            bgWorker.DoWork += BgWorkerDoWork;
            bgWorker.RunWorkerCompleted += BgWorkerRunWorkerCompleted;
        }
        /// <summary>
        /// Constructor
        /// </summary>
        public Trade_Settings()
        {
            pnlSettings  = new Fancy_Panel();

            lblCloseAdvance   = new Label();
            lblSlippageEntry  = new Label();

            cbxLongLogicPrice = new ComboBox();
            chbAutoSlippage   = new CheckBox();
            nudCloseAdvance   = new NumericUpDown();
            nudSlippageEntry  = new NumericUpDown();
            nudSlippageExit   = new NumericUpDown();
            lblSlippageExit   = new Label();
            lblLongLogicPrice = new Label();
            lblMinChartBars   = new Label();
            nudMinChartBars   = new NumericUpDown();

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

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

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

            // pnlAveraging
            pnlSettings.Parent = this;

            // ComboBox Long Logic Price
            cbxLongLogicPrice.Parent        = pnlSettings;
            cbxLongLogicPrice.DropDownStyle = ComboBoxStyle.DropDownList;
            cbxLongLogicPrice.Items.AddRange(new string[] { Language.T("Bid"), Language.T("Ask") });
            cbxLongLogicPrice.SelectedIndex = (Configs.LongTradeLogicPrice == "Bid" ? 0 : 1);

            // Label close advance
            lblCloseAdvance.Parent    = pnlSettings;
            lblCloseAdvance.ForeColor = colorText;
            lblCloseAdvance.BackColor = Color.Transparent;
            lblCloseAdvance.AutoSize  = true;
            lblCloseAdvance.Text      = Language.T("'Bar Closing' time advance in seconds");

            // Check Box Auto Slippage
            chbAutoSlippage.Parent    = pnlSettings;
            chbAutoSlippage.ForeColor = colorText;
            chbAutoSlippage.BackColor = Color.Transparent;
            chbAutoSlippage.AutoSize  = true;
            chbAutoSlippage.Checked   = Configs.AutoSlippage;
            chbAutoSlippage.Text      = Language.T("Auto slippage depending on the spread.");
            chbAutoSlippage.CheckedChanged += new EventHandler(chbAutoSlippage_CheckedChanged);

            // Label Entry slippage
            lblSlippageEntry.Parent    = pnlSettings;
            lblSlippageEntry.ForeColor = colorText;
            lblSlippageEntry.BackColor = Color.Transparent;
            lblSlippageEntry.AutoSize  = true;
            lblSlippageEntry.Text      = Language.T("Slippage for entry orders");

            // Label Entry slippage
            lblSlippageExit.Parent    = pnlSettings;
            lblSlippageExit.ForeColor = colorText;
            lblSlippageExit.BackColor = Color.Transparent;
            lblSlippageExit.AutoSize  = true;
            lblSlippageExit.Text      = Language.T("Slippage for exit orders");

            // NumericUpDown Entry Lots
            nudCloseAdvance.Parent    = pnlSettings;
            nudCloseAdvance.BeginInit();
            nudCloseAdvance.Minimum   = 1;
            nudCloseAdvance.Maximum   = 15;
            nudCloseAdvance.Increment = 1;
            nudCloseAdvance.Value     = Configs.BarCloseAdvance;
            nudCloseAdvance.DecimalPlaces = 0;
            nudCloseAdvance.TextAlign = HorizontalAlignment.Center;
            nudCloseAdvance.EndInit();

            // Label lblLongLogicPrice
            lblLongLogicPrice.Parent    = pnlSettings;
            lblLongLogicPrice.ForeColor = colorText;
            lblLongLogicPrice.BackColor = Color.Transparent;
            lblLongLogicPrice.AutoSize  = true;
            lblLongLogicPrice.Text      = Language.T("Long logic rules base price");

            // NUD Entry slippage
            nudSlippageEntry.Parent    = pnlSettings;
            nudSlippageEntry.BeginInit();
            nudSlippageEntry.Minimum   = 0;
            nudSlippageEntry.Maximum   = 1000;
            nudSlippageEntry.Increment = 1;
            nudSlippageEntry.Value     = Configs.SlippageEntry;
            nudSlippageEntry.DecimalPlaces = 0;
            nudSlippageEntry.TextAlign = HorizontalAlignment.Center;
            nudSlippageEntry.Enabled   = !Configs.AutoSlippage;
            nudSlippageEntry.EndInit();

            // NUD Exit slippage
            nudSlippageExit.Parent    = pnlSettings;
            nudSlippageExit.BeginInit();
            nudSlippageExit.Minimum   = 0;
            nudSlippageExit.Maximum   = 1000;
            nudSlippageExit.Increment = 1;
            nudSlippageExit.Value     = Configs.SlippageExit;
            nudSlippageExit.DecimalPlaces = 0;
            nudSlippageExit.TextAlign = HorizontalAlignment.Center;
            nudSlippageExit.Enabled   = !Configs.AutoSlippage;
            nudSlippageExit.EndInit();

            // Label lblMinChartBars
            lblMinChartBars.Parent    = pnlSettings;
            lblMinChartBars.ForeColor = colorText;
            lblMinChartBars.BackColor = Color.Transparent;
            lblMinChartBars.AutoSize  = true;
            lblMinChartBars.Text      = Language.T("Minimum number of bars in the chart");

            // NUD Exit slippage
            nudMinChartBars.Parent    = pnlSettings;
            nudMinChartBars.BeginInit();
            nudMinChartBars.Minimum   = 300;
            nudMinChartBars.Maximum   = 5000;
            nudMinChartBars.Increment = 1;
            nudMinChartBars.Value     = Configs.MinChartBars;
            nudMinChartBars.DecimalPlaces = 0;
            nudMinChartBars.TextAlign = HorizontalAlignment.Center;
            nudMinChartBars.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.Click       += new EventHandler(BtnAccept_Click);
            btnAccept.DialogResult = DialogResult.OK;
            btnAccept.UseVisualStyleBackColor = true;

            return;
        }
        /// <summary>
        /// Initializes Operation tab page.
        /// </summary>
        private void InitializePageOperation()
        {
            TabPageOperation.Name = "tabPageOperation";
            TabPageOperation.Text = Language.T("Operation");
            TabPageOperation.ImageIndex = 5;
            TabPageOperation.BackColor = LayoutColors.ColorFormBack;

            PnlManualTrade = new FancyPanel(Language.T("Manual Operation Execution"))
                                 {Parent = TabPageOperation, Dock = DockStyle.Fill};
            PnlManualTrade.Resize += PnlManualTradeResize;

            PnlHolder = new Panel {Parent = PnlManualTrade, BackColor = Color.Transparent, Size = new Size(750, 350)};

            LblBidAsk = new Label
                            {
                                Parent = PnlHolder,
                                Text = "Bid / Ask",
                                BackColor = Color.Transparent,
                                ForeColor = LayoutColors.ColorControlText,
                                Font = new Font(Font.FontFamily, 18, FontStyle.Bold),
                                Width = 295,
                                TextAlign = ContentAlignment.MiddleCenter,
                                Location = new Point(190, 35)
                            };

            LblSymbol = new Label
                            {
                                Parent = PnlHolder,
                                Text = "Symbol",
                                BackColor = Color.Transparent,
                                ForeColor = LayoutColors.ColorControlText,
                                Font = new Font(Font.FontFamily, 18, FontStyle.Bold)
                            };
            LblSymbol.Height = LblSymbol.Font.Height;
            LblSymbol.Width = 180;
            LblSymbol.TextAlign = ContentAlignment.MiddleRight;
            LblSymbol.Location = new Point(5, 35);

            LblLots = new Label
                          {
                              Parent = PnlHolder,
                              Text = Language.T("Lots"),
                              Font = new Font(Font.FontFamily, 11),
                              BackColor = Color.Transparent,
                              ForeColor = LayoutColors.ColorControlText,
                              Width = 90
                          };
            LblLots.Height = LblLots.Font.Height;
            LblLots.TextAlign = ContentAlignment.MiddleRight;
            LblLots.Location = new Point(5, 81);

            LblStopLoss = new Label
                              {
                                  Parent = PnlHolder,
                                  Text = Language.T("Stop Loss"),
                                  Font = new Font(Font.FontFamily, 11),
                                  BackColor = Color.Transparent,
                                  ForeColor = LayoutColors.ColorControlText,
                                  Location = new Point(5, 121),
                                  Width = 90,
                                  TextAlign = ContentAlignment.MiddleRight
                              };

            LblTakeProfit = new Label
                                {
                                    Parent = PnlHolder,
                                    Font = new Font(Font.FontFamily, 11),
                                    Text = Language.T("Take Profit"),
                                    BackColor = Color.Transparent,
                                    ForeColor = LayoutColors.ColorControlText,
                                    Location = new Point(5, 151),
                                    Width = 90,
                                    TextAlign = ContentAlignment.MiddleRight
                                };

            LblBreakEven = new Label
                               {
                                   Parent = PnlHolder,
                                   Font = new Font(Font.FontFamily, 11),
                                   Text = Language.T("Break Even"),
                                   BackColor = Color.Transparent,
                                   ForeColor = LayoutColors.ColorControlText,
                                   Location = new Point(5, 191),
                                   Width = 90,
                                   TextAlign = ContentAlignment.MiddleRight
                               };

            LblTrailingStop = new Label
                                  {
                                      Parent = PnlHolder,
                                      Font = new Font(Font.FontFamily, 11),
                                      Text = Language.T("Trailing Stop"),
                                      BackColor = Color.Transparent,
                                      ForeColor = LayoutColors.ColorControlText,
                                      Location = new Point(5, 221),
                                      Width = 90,
                                      TextAlign = ContentAlignment.MiddleRight
                                  };

            NUDLots = new NumericUpDown
                          {
                              Parent = PnlHolder,
                              Font = new Font(Font.FontFamily, 11),
                              TextAlign = HorizontalAlignment.Center,
                              Width = 80,
                              Location = new Point(100, 81)
                          };
            NUDLots.BeginInit();
            NUDLots.Minimum = 0.1M;
            NUDLots.Maximum = 100;
            NUDLots.Increment = 0.1M;
            NUDLots.Value = 1;
            NUDLots.DecimalPlaces = 1;
            NUDLots.EndInit();

            NUDStopLoss = new NumericUpDown
                              {
                                  Parent = PnlHolder,
                                  Font = new Font(Font.FontFamily, 11),
                                  TextAlign = HorizontalAlignment.Center,
                                  Width = 80,
                                  Location = new Point(100, 121)
                              };
            NUDStopLoss.BeginInit();
            NUDStopLoss.Minimum = 0;
            NUDStopLoss.Maximum = 5000;
            NUDStopLoss.Increment = 1;
            NUDStopLoss.Value = 0;
            NUDStopLoss.DecimalPlaces = 0;
            NUDStopLoss.EndInit();
            NUDStopLoss.ValueChanged += ParameterValueChanged;

            ColorParameter = NUDStopLoss.ForeColor;

            NUDTakeProfit = new NumericUpDown
                                {
                                    Parent = PnlHolder,
                                    Font = new Font(Font.FontFamily, 11),
                                    TextAlign = HorizontalAlignment.Center,
                                    Width = 80,
                                    Location = new Point(100, 151)
                                };
            NUDTakeProfit.BeginInit();
            NUDTakeProfit.Minimum = 0;
            NUDTakeProfit.Maximum = 5000;
            NUDTakeProfit.Increment = 1;
            NUDTakeProfit.Value = 0;
            NUDTakeProfit.DecimalPlaces = 0;
            NUDTakeProfit.EndInit();
            NUDTakeProfit.ValueChanged += ParameterValueChanged;

            NUDBreakEven = new NumericUpDown
                               {
                                   Parent = PnlHolder,
                                   Font = new Font(Font.FontFamily, 11),
                                   TextAlign = HorizontalAlignment.Center,
                                   Width = 80,
                                   Location = new Point(100, 191)
                               };
            NUDBreakEven.BeginInit();
            NUDBreakEven.Minimum = 0;
            NUDBreakEven.Maximum = 5000;
            NUDBreakEven.Increment = 1;
            NUDBreakEven.Value = 0;
            NUDBreakEven.DecimalPlaces = 0;
            NUDBreakEven.EndInit();
            NUDBreakEven.ValueChanged += ParameterValueChanged;

            NUDTrailingStop = new NumericUpDown
                                  {
                                      Parent = PnlHolder,
                                      Font = new Font(Font.FontFamily, 11),
                                      TextAlign = HorizontalAlignment.Center,
                                      Width = 80,
                                      Location = new Point(100, 221)
                                  };
            NUDTrailingStop.BeginInit();
            NUDTrailingStop.Minimum = 0;
            NUDTrailingStop.Maximum = 5000;
            NUDTrailingStop.Increment = 1;
            NUDTrailingStop.Value = 0;
            NUDTrailingStop.DecimalPlaces = 0;
            NUDTrailingStop.EndInit();
            NUDTrailingStop.ValueChanged += ParameterValueChanged;

            BtnSell = new Button
                          {
                              Name = "btnSell",
                              Parent = PnlHolder,
                              Image = Resources.btn_operation_sell,
                              ImageAlign = ContentAlignment.MiddleLeft,
                              Text = Language.T("Sell"),
                              Width = 145,
                              Height = 40,
                              Font = new Font(Font.FontFamily, 16),
                              ForeColor = Color.Crimson,
                              Location = new Point(190, 80),
                              UseVisualStyleBackColor = true
                          };
            BtnSell.Click += BtnOperationClick;

            BtnBuy = new Button
                         {
                             Name = "btnBuy",
                             Parent = PnlHolder,
                             Image = Resources.btn_operation_buy,
                             ImageAlign = ContentAlignment.MiddleLeft,
                             Text = Language.T("Buy"),
                             Width = 145,
                             Height = 40,
                             Font = new Font(Font.FontFamily, 16),
                             ForeColor = Color.Green,
                             Location = new Point(340, 80),
                             UseVisualStyleBackColor = true
                         };
            BtnBuy.Click += BtnOperationClick;

            BtnClose = new Button
                           {
                               Name = "btnClose",
                               Parent = PnlHolder,
                               Image = Resources.btn_operation_close,
                               ImageAlign = ContentAlignment.MiddleLeft,
                               Text = Language.T("Close"),
                               Width = 295,
                               Height = 40,
                               Font = new Font(Font.FontFamily, 16, FontStyle.Bold),
                               ForeColor = Color.DarkOrange,
                               Location = new Point(190, 126),
                               UseVisualStyleBackColor = true
                           };
            BtnClose.Click += BtnOperationClick;

            BtnModify = new Button
                            {
                                Name = "btnModify",
                                Parent = PnlHolder,
                                Image = Resources.recalculate,
                                ImageAlign = ContentAlignment.MiddleLeft,
                                Text = Language.T("Modify Stop Loss and Take Profit"),
                                ForeColor = Color.Navy,
                                Width = 295,
                                Location = new Point(190, 172),
                                UseVisualStyleBackColor = true
                            };
            BtnModify.Click += BtnOperationClick;

            TickChart = new TickChart(Language.T("Tick Chart"))
                            {Parent = PnlHolder, Size = new Size(250, 200), Location = new Point(495, 81)};
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        public DataHorizon(int maxBars, DateTime startTime, DateTime endTime, bool useStartTime, bool useEndTime)
        {
            MaxBars = maxBars;
            StartTime = startTime;
            EndTime = endTime;
            UseEndTime = useEndTime;
            UseStartTime = useStartTime;

            BtnAccept = new Button();
            BtnHelp = new Button();
            BtnCancel = new Button();
            PnlBase = new FancyPanel();
            DtpStartTime = new DateTimePicker();
            DtpEndTime = new DateTimePicker();
            CbxUseEndTime = new CheckBox();
            CbxUseStartTime = new CheckBox();
            NUDMaxBars = new NumericUpDown();
            LblMaxBars = new Label();
            LblMinBars = new Label();

            MaximizeBox = false;
            MinimizeBox = false;
            ShowInTaskbar = false;
            Icon = Data.Icon;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            AcceptButton = BtnAccept;
            Text = Language.T("Data Horizon");

            var toolTip = new ToolTip();

            // Button Help
            BtnHelp.Parent = this;
            BtnHelp.Name = "Help";
            BtnHelp.Text = Language.T("Help");
            BtnHelp.UseVisualStyleBackColor = true;
            BtnHelp.Click += BtnHelpClick;

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

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

            // Panel Base
            PnlBase.Parent = this;

            // Check box UesStartTime
            CbxUseStartTime.Parent = PnlBase;
            CbxUseStartTime.AutoSize = true;
            CbxUseStartTime.ForeColor = LayoutColors.ColorControlText;
            CbxUseStartTime.BackColor = Color.Transparent;
            CbxUseStartTime.Text = Language.T("Remove data older than:");
            CbxUseStartTime.CheckStateChanged += UseStartTimeCheckStateChanged;
            toolTip.SetToolTip(CbxUseStartTime, Language.T("All data older than the specified date will be cut out."));

            // Check box UesEndTime
            CbxUseEndTime.Parent = PnlBase;
            CbxUseEndTime.ForeColor = LayoutColors.ColorControlText;
            CbxUseEndTime.BackColor = Color.Transparent;
            CbxUseEndTime.AutoSize = true;
            CbxUseEndTime.Text = Language.T("Remove data newer than:");
            CbxUseEndTime.CheckStateChanged += UseEndTimeCheckStateChanged;
            toolTip.SetToolTip(CbxUseEndTime, Language.T("All data newer than the specified date will be cut out."));

            // StartTime
            DtpStartTime.Parent = PnlBase;
            DtpStartTime.ForeColor = LayoutColors.ColorControlText;
            DtpStartTime.Format = DateTimePickerFormat.Custom;
            DtpStartTime.CustomFormat = "MMMM dd, yyyy - dddd,   HH : mm";
            DtpStartTime.ShowUpDown = true;
            DtpStartTime.ValueChanged += StartTimeValueChanged;

            // EndTime
            DtpEndTime.Parent = PnlBase;
            DtpEndTime.ForeColor = LayoutColors.ColorControlText;
            DtpEndTime.Format = DateTimePickerFormat.Custom;
            DtpEndTime.CustomFormat = "MMMM dd, yyyy - dddd,   HH : mm";
            DtpEndTime.ShowUpDown = true;
            DtpEndTime.ValueChanged += EndTimeValueChanged;

            // LabelMaxBars
            LblMaxBars.Parent = PnlBase;
            LblMaxBars.AutoSize = true;
            LblMaxBars.ForeColor = LayoutColors.ColorControlText;
            LblMaxBars.BackColor = Color.Transparent;
            LblMaxBars.Text = Language.T("Maximum number of bars:");
            LblMaxBars.TextAlign = ContentAlignment.MiddleLeft;

            // MaxBars
            NUDMaxBars.BeginInit();
            NUDMaxBars.Parent = PnlBase;
            NUDMaxBars.Name = "MaxBars";
            NUDMaxBars.Minimum = Configs.MinBars;
            NUDMaxBars.Maximum = Configs.MaxBarsLimit;
            NUDMaxBars.ThousandsSeparator = true;
            NUDMaxBars.ValueChanged += MaxBarsValueChanged;
            NUDMaxBars.TextAlign = HorizontalAlignment.Center;
            NUDMaxBars.EndInit();

            // Label MinBars
            LblMinBars.Parent = PnlBase;
            LblMinBars.AutoSize = true;
            LblMinBars.ForeColor = LayoutColors.ColorControlText;
            LblMinBars.BackColor = Color.Transparent;
            LblMinBars.Text = Language.T("Minimum number of bars:") + " " + Configs.MinBars;
            LblMinBars.TextAlign = ContentAlignment.MiddleLeft;
        }
        /// <summary>
        ///     Sets controls in panel Common
        /// </summary>
        private void SetPanelCommon()
        {
            // chbPreserveSameDirAction
            chbPreserveSameDirAction.Parent = pnlCommon;
            chbPreserveSameDirAction.Text = Language.T("Do not change the Same direction signal");
            chbPreserveSameDirAction.AutoSize = true;
            chbPreserveSameDirAction.Checked = true;
            chbPreserveSameDirAction.ForeColor = LayoutColors.ColorControlText;
            chbPreserveSameDirAction.BackColor = Color.Transparent;

            // chbPreserveOppDirAction
            chbPreserveOppDirAction.Parent = pnlCommon;
            chbPreserveOppDirAction.Text = Language.T("Do not change the Opposite direction signal");
            chbPreserveOppDirAction.AutoSize = true;
            chbPreserveOppDirAction.Checked = true;
            chbPreserveOppDirAction.ForeColor = LayoutColors.ColorControlText;
            chbPreserveOppDirAction.BackColor = Color.Transparent;

            // chbPreservPermSL
            chbPreservePermSL.Parent = pnlCommon;
            chbPreservePermSL.Text = Language.T("Do not change the Permanent Stop Loss");
            chbPreservePermSL.AutoSize = true;
            chbPreservePermSL.Checked = true;
            chbPreservePermSL.ForeColor = LayoutColors.ColorControlText;
            chbPreservePermSL.BackColor = Color.Transparent;

            // chbPreservPermTP
            chbPreservePermTP.Parent = pnlCommon;
            chbPreservePermTP.Text = Language.T("Do not change the Permanent Take Profit");
            chbPreservePermTP.AutoSize = true;
            chbPreservePermTP.Checked = true;
            chbPreservePermTP.ForeColor = LayoutColors.ColorControlText;
            chbPreservePermTP.BackColor = Color.Transparent;

            // chbPreservbreakEven
            chbPreserveBreakEven.Parent = pnlCommon;
            chbPreserveBreakEven.Text = Language.T("Do not change the Break Even");
            chbPreserveBreakEven.AutoSize = true;
            chbPreserveBreakEven.Checked = true;
            chbPreserveBreakEven.ForeColor = LayoutColors.ColorControlText;
            chbPreserveBreakEven.BackColor = Color.Transparent;

            chbMaxOpeningLogicSlots = new CheckBox
                {
                    Parent = pnlCommon,
                    ForeColor = colorText,
                    BackColor = Color.Transparent,
                    Text = Language.T("Maximum number of opening logic slots"),
                    Checked = true,
                    AutoSize = true
                };

            nudMaxOpeningLogicSlots = new NumericUpDown {Parent = pnlCommon, TextAlign = HorizontalAlignment.Center};
            nudMaxOpeningLogicSlots.BeginInit();
            nudMaxOpeningLogicSlots.Minimum = 0;
            nudMaxOpeningLogicSlots.Maximum = Strategy.MaxOpenFilters;
            nudMaxOpeningLogicSlots.Increment = 1;
            nudMaxOpeningLogicSlots.Value = 2;
            nudMaxOpeningLogicSlots.EndInit();

            chbMaxClosingLogicSlots = new CheckBox
                {
                    Parent = pnlCommon,
                    ForeColor = colorText,
                    BackColor = Color.Transparent,
                    Text = Language.T("Maximum number of closing logic slots"),
                    Checked = true,
                    AutoSize = true
                };

            nudMaxClosingLogicSlots = new NumericUpDown {Parent = pnlCommon, TextAlign = HorizontalAlignment.Center};
            nudMaxClosingLogicSlots.BeginInit();
            nudMaxClosingLogicSlots.Minimum = 0;
            nudMaxClosingLogicSlots.Maximum = Strategy.MaxCloseFilters;
            nudMaxClosingLogicSlots.Increment = 1;
            nudMaxClosingLogicSlots.Value = 1;
            nudMaxClosingLogicSlots.EndInit();

            // Label Calculated Strategies Caption
            lblCalcStrInfo.Parent = pnlCommon;
            lblCalcStrInfo.AutoSize = true;
            lblCalcStrInfo.ForeColor = LayoutColors.ColorControlText;
            lblCalcStrInfo.BackColor = Color.Transparent;
            lblCalcStrInfo.Text = Language.T("Calculations");

            // Label Calculated Strategies Number
            lblCalcStrNumb.Parent = pnlCommon;
            lblCalcStrNumb.BorderStyle = BorderStyle.FixedSingle;
            lblCalcStrNumb.ForeColor = LayoutColors.ColorControlText;
            lblCalcStrNumb.BackColor = LayoutColors.ColorControlBack;
            lblCalcStrNumb.TextAlign = ContentAlignment.MiddleCenter;
            lblCalcStrNumb.Text = "0";

            // Benchmark
            lblBenchmarkInfo.Parent = pnlCommon;
            lblBenchmarkInfo.AutoSize = true;
            lblBenchmarkInfo.ForeColor = LayoutColors.ColorControlText;
            lblBenchmarkInfo.BackColor = Color.Transparent;
            lblBenchmarkInfo.Text = Language.T("Benchmark");

            lblBenchmarkNumb.Parent = pnlCommon;
            lblBenchmarkNumb.BorderStyle = BorderStyle.FixedSingle;
            lblBenchmarkNumb.ForeColor = LayoutColors.ColorControlText;
            lblBenchmarkNumb.BackColor = LayoutColors.ColorControlBack;
            lblBenchmarkNumb.TextAlign = ContentAlignment.MiddleCenter;
            lblBenchmarkNumb.Text = "0";
        }
        /// <summary>
        /// Constructor
        /// </summary>
        public TradingCharges()
        {
            PnlBase = new FancyPanel();

            LblSpread = new Label();
            LblSwapLong = new Label();
            LblSwapShort = new Label();
            LblCommission = new Label();
            LblSlippage = new Label();

            NUDSpread = new NumericUpDown();
            NUDSwapLong = new NumericUpDown();
            NUDSwapShort = new NumericUpDown();
            NUDCommission = new NumericUpDown();
            NUDSlippage = new NumericUpDown();

            BtnEditInstrument = new Button();
            BtnAccept = new Button();
            BtnCancel = new Button();

            _colorText = LayoutColors.ColorControlText;

            MaximizeBox = false;
            MinimizeBox = false;
            ShowInTaskbar = false;
            Icon = Data.Icon;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            AcceptButton = BtnAccept;
            Text = Language.T("Trading Charges") + " - " + Data.Symbol;

            var toolTip = new ToolTip();

            // pnlBase
            PnlBase.Parent = this;

            // Label Spread
            LblSpread.Parent = PnlBase;
            LblSpread.ForeColor = _colorText;
            LblSpread.BackColor = Color.Transparent;
            LblSpread.AutoSize = true;
            LblSpread.Text = Language.T("Spread") + " [" + Language.T("pips") + "]";

            // Label Swap Long
            LblSwapLong.Parent = PnlBase;
            LblSwapLong.ForeColor = _colorText;
            LblSwapLong.BackColor = Color.Transparent;
            LblSwapLong.AutoSize = true;
            LblSwapLong.Text = Language.T("Swap number for a long position rollover") + " [" +
                               (Data.InstrProperties.SwapType == CommissionType.money
                                    ? Data.InstrProperties.PriceIn
                                    : Language.T(Data.InstrProperties.SwapType.ToString())) + "]" +
                               Environment.NewLine +
                               "(" + Language.T("A positive value decreases your profit.") + ")";

            // Label Swap Short
            LblSwapShort.Parent = PnlBase;
            LblSwapShort.ForeColor = _colorText;
            LblSwapShort.BackColor = Color.Transparent;
            LblSwapShort.AutoSize = true;
            LblSwapShort.Text = Language.T("Swap number for a short position rollover") + " [" +
                                (Data.InstrProperties.SwapType == CommissionType.money
                                     ? Data.InstrProperties.PriceIn
                                     : Language.T(Data.InstrProperties.SwapType.ToString())) + "]" +
                                Environment.NewLine +
                                "(" + Language.T("A negative value decreases your profit.") + ")";

            // Label Commission
            LblCommission.Parent = PnlBase;
            LblCommission.ForeColor = _colorText;
            LblCommission.BackColor = Color.Transparent;
            LblCommission.AutoSize = true;
            LblCommission.Text = Language.T("Commission in") + " " +
                                 Data.InstrProperties.CommissionTypeToString + " " +
                                 Data.InstrProperties.CommissionScopeToString + " " +
                                 Data.InstrProperties.CommissionTimeToString +
                                 (Data.InstrProperties.CommissionType == CommissionType.money
                                      ? " [" + Data.InstrProperties.PriceIn + "]"
                                      : "");

            // Label Slippage
            LblSlippage.Parent = PnlBase;
            LblSlippage.ForeColor = _colorText;
            LblSlippage.BackColor = Color.Transparent;
            LblSlippage.AutoSize = true;
            LblSlippage.Text = Language.T("Slippage") + " [" + Language.T("pips") + "]";

            // NumericUpDown Spread
            NUDSpread.BeginInit();
            NUDSpread.Parent = PnlBase;
            NUDSpread.Name = Language.T("Spread");
            NUDSpread.TextAlign = HorizontalAlignment.Center;
            NUDSpread.Minimum = 0;
            NUDSpread.Maximum = 500;
            NUDSpread.Increment = 0.01M;
            NUDSpread.DecimalPlaces = 2;
            NUDSpread.Value = 4;
            NUDSpread.EndInit();
            toolTip.SetToolTip(NUDSpread, Language.T("Difference between Bid and Ask prices."));

            // NumericUpDown Swap Long
            NUDSwapLong.BeginInit();
            NUDSwapLong.Parent = PnlBase;
            NUDSwapLong.Name = "SwapLong";
            NUDSwapLong.TextAlign = HorizontalAlignment.Center;
            NUDSwapLong.Minimum = -500;
            NUDSwapLong.Maximum = 500;
            NUDSwapLong.Increment = 0.01M;
            NUDSwapLong.DecimalPlaces = 2;
            NUDSwapLong.Value = 1;
            NUDSwapLong.EndInit();
            toolTip.SetToolTip(NUDSwapLong, Language.T("A position changes its average price with the selected number during a rollover."));

            // NumericUpDown Swap Short
            NUDSwapShort.BeginInit();
            NUDSwapShort.Parent = PnlBase;
            NUDSwapShort.Name = "SwapShort";
            NUDSwapShort.TextAlign = HorizontalAlignment.Center;
            NUDSwapShort.Minimum = -500;
            NUDSwapShort.Maximum = 500;
            NUDSwapShort.Increment = 0.01M;
            NUDSwapShort.DecimalPlaces = 2;
            NUDSwapShort.Value = -1;
            NUDSwapShort.EndInit();
            toolTip.SetToolTip(NUDSwapShort, Language.T("A position changes its average price with the selected number during a rollover."));

            // NumericUpDown Commission
            NUDCommission.BeginInit();
            NUDCommission.Parent = PnlBase;
            NUDCommission.Name = Language.T("Commission");
            NUDCommission.TextAlign = HorizontalAlignment.Center;
            NUDCommission.Minimum = -500;
            NUDCommission.Maximum = 500;
            NUDCommission.Increment = 0.01M;
            NUDCommission.DecimalPlaces = 2;
            NUDCommission.Value = 0;
            NUDCommission.EndInit();

            // NumericUpDown Slippage
            NUDSlippage.BeginInit();
            NUDSlippage.Parent = PnlBase;
            NUDSlippage.Name = "Slippage";
            NUDSlippage.TextAlign = HorizontalAlignment.Center;
            NUDSlippage.Minimum = 0;
            NUDSlippage.Maximum = 200;
            NUDSlippage.Increment = 1;
            NUDSlippage.Value = 0;
            NUDSlippage.EndInit();
            toolTip.SetToolTip(NUDSlippage, Language.T("Number of pips you lose due to an inaccurate order execution."));

            //Button btnEditInstrument
            BtnEditInstrument.Parent = this;
            BtnEditInstrument.Name = "EditInstrument";
            BtnEditInstrument.Text = Language.T("More");
            BtnEditInstrument.Click += BtnEditInstrumentClick;
            BtnEditInstrument.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;
        }
 private void InitializeComponent() {
     btnOK = new Button();
     btnApply = new Button();
     btnCancel = new Button();
     lblVer = new LinkLabel();
     tabControl1 = new TabControl();
     tabPage1_Gnrl = new TabPage();
     tabPage2_Tabs = new TabPage();
     tabPage3_Wndw = new TabPage();
     tabPage4_View = new TabPage();
     tabPage5_Grps = new TabPage();
     tabPage6_Apps = new TabPage();
     tabPage7_Plug = new TabPage();
     tabPage8_Keys = new TabPage();
     tabPage9_Misc = new TabPage();
     tabPageA_Path = new TabPage();
     chbActivateNew = new CheckBox();
     chbDontOpenSame = new CheckBox();
     chbCloseWhenGroup = new CheckBox();
     chbShowTooltip = new CheckBox();
     chbX1X2 = new CheckBox();
     chbNavBtn = new CheckBox();
     chbNoHistory = new CheckBox();
     chbSaveExecuted = new CheckBox();
     chbDD = new CheckBox();
     chbAutoUpdate = new CheckBox();
     chbPlaySound = new CheckBox();
     cmbNavBtn = new ComboBox();
     btnHistoryClear = new Button();
     btnClearRecentFile = new Button();
     nudMaxUndo = new NumericUpDown();
     nudMaxRecentFile = new NumericUpDown();
     lblLang = new Label();
     lblNetworkTimeOut = new Label();
     textBoxLang = new TextBox();
     btnLangBrowse = new Button();
     btnCheckUpdates = new Button();
     btnExportSettings = new Button();
     nudNetworkTimeOut = new NumericUpDown();
     lblNewTabLoc = new Label();
     lblActvClose = new Label();
     lblTabDblClk = new Label();
     lblBGDblClik = new Label();
     lblTabWhlClk = new Label();
     lblAction_BarDblClick = new Label();
     lblMultiRows = new Label();
     cmbNewTabLoc = new ComboBox();
     cmbActvClose = new ComboBox();
     cmbTabDblClck = new ComboBox();
     cmbBGDblClick = new ComboBox();
     cmbTabWhlClck = new ComboBox();
     cmbMultiRow = new ComboBox();
     textBoxAction_BarDblClck = new TextBox();
     btnBrowseAction_BarDblClck = new Button();
     chbAutoSubText = new CheckBox();
     chbTabCloseButton = new CheckBox();
     chbTabCloseBtnAlt = new CheckBox();
     chbTabCloseBtnHover = new CheckBox();
     chbSubDirTipOnTab = new CheckBox();
     chbTreeShftWhlTab = new CheckBox();
     chbTabSwitcher = new CheckBox();
     chbRemoveOnSeparate = new CheckBox();
     chbDriveLetter = new CheckBox();
     chbWhlClick = new CheckBox();
     chbNCADblClck = new CheckBox();
     chbBlockProcess = new CheckBox();
     chbFoldrTree = new CheckBox();
     chbWndUnresizable = new CheckBox();
     chbWndRestrAlpha = new CheckBox();
     chbNoTabFromOuteside = new CheckBox();
     chbHolizontalScroll = new CheckBox();
     chbWhlChangeView = new CheckBox();
     chbNeverCloseWindow = new CheckBox();
     chbNeverCloseWndLocked = new CheckBox();
     chbRestoreClosed = new CheckBox();
     chbRestoreLocked = new CheckBox();
     chbSendToTray = new CheckBox();
     chbSendToTrayOnMinimize = new CheckBox();
     cmbWhlClick = new ComboBox();
     lblSep = new Label();
     chbUseTabSkin = new CheckBox();
     chbToolbarBGClr = new CheckBox();
     chbFolderIcon = new CheckBox();
     chbBoldActv = new CheckBox();
     chbRebarBGImage = new CheckBox();
     chbTabTitleShadow = new CheckBox();
     propertyGrid1 = new PropertyGrid();
     nudTabWidth = new NumericUpDown();
     nudTabHeight = new NumericUpDown();
     nudTabWidthMax = new NumericUpDown();
     nudTabWidthMin = new NumericUpDown();
     lblTabSizeTitle = new Label();
     lblTabWidth = new Label();
     lblTabHeight = new Label();
     lblTabWMin = new Label();
     lblTabWMax = new Label();
     lblTabWFix = new Label();
     lblTabFont = new Label();
     lblMenuRenderer = new Label();
     lblTabTextAlignment = new Label();
     lblTabTxtClr = new Label();
     cmbTabSizeMode = new ComboBox();
     cmbTabTextAlignment = new ComboBox();
     cmbRebarBGImageMode = new ComboBox();
     cmbMenuRenderer = new ComboBox();
     btnHiliteClsc = new Button();
     btnTabFont = new Button();
     btnActTxtClr = new Button();
     btnInactTxtClr = new Button();
     btnDefTxtClr = new Button();
     btnToolBarBGClr = new Button();
     btnRebarImage = new Button();
     btnShadowAct = new Button();
     btnShadowIna = new Button();
     btnTabImage = new Button();
     tbRebarImagePath = new TextBox();
     tbTabImagePath = new TextBox();
     treeViewGroup = new TreeView();
     btnUp_Grp = new Button();
     btnDown_Grp = new Button();
     btnMinus_Grp = new Button();
     btnPlus_Grp = new Button();
     btnStartUpGrp = new Button();
     btnAddSep_Grp = new Button();
     cmbSpclFol_Grp = new ComboBox();
     btnAddSpcFol_Grp = new Button();
     lblGroupKey = new Label();
     tbGroupKey = new TextBox();
     chbGroupKey = new CheckBox();
     treeViewUserApps = new TreeView();
     btnUp_app = new Button();
     btnDown_app = new Button();
     btnAddSep_app = new Button();
     btnAddVFolder_app = new Button();
     btnPlus_app = new Button();
     btnMinus_app = new Button();
     lblUserApps_Path = new Label();
     lblUserApps_Args = new Label();
     lblUserApps_Working = new Label();
     tbPath = new TextBox();
     tbArgs = new TextBox();
     tbWorking = new TextBox();
     tbUserAppKey = new TextBox();
     chbUserAppKey = new CheckBox();
     lblUserApps_Key = new Label();
     btnOFD_app = new Button();
     btnBFD_app = new Button();
     btnAddToken_Arg = new Button();
     btnAddToken_Wrk = new Button();
     cmsAddToken = new ContextMenuStrip();
     chbHideMenu = new CheckBox();
     chbAlwaysShowHeader = new CheckBox();
     chbForceSysListView = new CheckBox();
     chbBSUpOneLvl = new CheckBox();
     chbNoFulRowSelect = new CheckBox();
     chbGridLine = new CheckBox();
     chbAlternateColor = new CheckBox();
     chbShowPreview = new CheckBox();
     chbPreviewMode = new CheckBox();
     chbPreviewInfo = new CheckBox();
     chbSubDirTip = new CheckBox();
     chbSubDirTipMode = new CheckBox();
     chbSubDirTipModeHidden = new CheckBox();
     chbSubDirTipModeSystem = new CheckBox();
     chbSubDirTipModeFile = new CheckBox();
     chbSubDirTipPreview = new CheckBox();
     chbSelectWithoutExt = new CheckBox();
     chbF2Selection = new CheckBox();
     chbCursorLoop = new CheckBox();
     btnAlternateColor = new Button();
     btnAlternateColor_Text = new Button();
     btnAlternate_Default = new Button();
     btnAddTextExt = new Button();
     btnDelTextExt = new Button();
     btnDefaultTextExt = new Button();
     btnAddImgExt = new Button();
     btnDelImgExt = new Button();
     btnDefaultImgExt = new Button();
     btnPreviewFont = new Button();
     btnPreviewFontDefault = new Button();
     btnPayPal = new Button();
     nudPreviewMaxHeight = new NumericUpDown();
     nudPreviewMaxWidth = new NumericUpDown();
     lblPreviewHeight = new Label();
     lblPreviewWidth = new Label();
     cmbTextExts = new ComboBox();
     cmbImgExts = new ComboBox();
     pluginView = new PluginView();
     btnBrowsePlugin = new Button();
     lblPluginLang = new Label();
     textBoxPluginLang = new TextBox();
     btnBrowsePluginLang = new Button();
     listViewKeyboard = new ListViewEx();
     clmKeys_Action = new ColumnHeader();
     clmKeys_Key = new ColumnHeader();
     btnCopyKeys = new Button();
     listView_NoCapture = new ListView();
     btnOFD_NoCapture = new Button();
     btnAdd_NoCapture = new Button();
     btnRemove_NoCapture = new Button();
     clmnHeader_NoCapture = new ColumnHeader();
     cmbSpclFol_NoCapture = new ComboBox();
     btnAddSpcFol_NoCapture = new Button();
     tabControl1.SuspendLayout();
     tabPage1_Gnrl.SuspendLayout();
     tabPage2_Tabs.SuspendLayout();
     tabPage3_Wndw.SuspendLayout();
     tabPage4_View.SuspendLayout();
     tabPage5_Grps.SuspendLayout();
     tabPage6_Apps.SuspendLayout();
     tabPage7_Plug.SuspendLayout();
     tabPage8_Keys.SuspendLayout();
     tabPage9_Misc.SuspendLayout();
     tabPageA_Path.SuspendLayout();
     nudMaxUndo.BeginInit();
     nudMaxRecentFile.BeginInit();
     nudNetworkTimeOut.BeginInit();
     nudTabWidthMin.BeginInit();
     nudTabWidthMax.BeginInit();
     nudTabHeight.BeginInit();
     nudTabWidth.BeginInit();
     nudPreviewMaxWidth.BeginInit();
     nudPreviewMaxHeight.BeginInit();
     SuspendLayout();
     btnOK.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
     btnOK.Location = new Point(0xf1, 0x246);
     btnOK.Size = new Size(0x58, 0x17);
     btnOK.TabIndex = 4;
     btnOK.Click += buttonOK_Click;
     btnApply.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
     btnApply.Location = new Point(0x1ad, 0x246);
     btnApply.Size = new Size(0x58, 0x17);
     btnApply.TabIndex = 6;
     btnApply.Click += buttonApply_Click;
     btnCancel.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
     btnCancel.Location = new Point(0x14f, 0x246);
     btnCancel.Size = new Size(0x58, 0x17);
     btnCancel.TabIndex = 5;
     btnCancel.Click += btnCancel_Click;
     lblVer.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
     lblVer.AutoSize = true;
     lblVer.LinkColor = Color.Blue;
     lblVer.ActiveLinkColor = Color.Red;
     lblVer.VisitedLinkColor = Color.Purple;
     lblVer.Location = new Point(12, 0x24b);
     lblVer.Click += lblVer_Click;
     tabControl1.Controls.Add(tabPage1_Gnrl);
     tabControl1.Controls.Add(tabPage2_Tabs);
     tabControl1.Controls.Add(tabPage3_Wndw);
     tabControl1.Controls.Add(tabPage4_View);
     tabControl1.Controls.Add(tabPage5_Grps);
     tabControl1.Controls.Add(tabPage6_Apps);
     tabControl1.Controls.Add(tabPage7_Plug);
     tabControl1.Controls.Add(tabPage8_Keys);
     tabControl1.Controls.Add(tabPage9_Misc);
     tabControl1.Controls.Add(tabPageA_Path);
     tabControl1.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
     tabControl1.Location = new Point(9, 9);
     tabControl1.Margin = new Padding(0);
     tabControl1.Multiline = true;
     tabControl1.SelectedIndex = 0;
     tabControl1.Size = new Size(0x207, 0x238);
     tabControl1.TabIndex = 0;
     tabControl1.SelectedIndexChanged += tabControl1_SelectedIndexChanged;
     tabPage1_Gnrl.Controls.Add(chbActivateNew);
     tabPage1_Gnrl.Controls.Add(chbDontOpenSame);
     tabPage1_Gnrl.Controls.Add(chbCloseWhenGroup);
     tabPage1_Gnrl.Controls.Add(chbShowTooltip);
     tabPage1_Gnrl.Controls.Add(chbX1X2);
     tabPage1_Gnrl.Controls.Add(chbNavBtn);
     tabPage1_Gnrl.Controls.Add(chbNoHistory);
     tabPage1_Gnrl.Controls.Add(chbSaveExecuted);
     tabPage1_Gnrl.Controls.Add(chbDD);
     tabPage1_Gnrl.Controls.Add(chbPlaySound);
     tabPage1_Gnrl.Controls.Add(cmbNavBtn);
     tabPage1_Gnrl.Controls.Add(btnHistoryClear);
     tabPage1_Gnrl.Controls.Add(nudMaxUndo);
     tabPage1_Gnrl.Controls.Add(nudMaxRecentFile);
     tabPage1_Gnrl.Controls.Add(btnClearRecentFile);
     tabPage1_Gnrl.Controls.Add(lblLang);
     tabPage1_Gnrl.Controls.Add(textBoxLang);
     tabPage1_Gnrl.Controls.Add(btnLangBrowse);
     tabPage1_Gnrl.Controls.Add(btnExportSettings);
     tabPage1_Gnrl.Controls.Add(btnCheckUpdates);
     tabPage1_Gnrl.Controls.Add(lblNetworkTimeOut);
     tabPage1_Gnrl.Controls.Add(nudNetworkTimeOut);
     tabPage1_Gnrl.Controls.Add(chbAutoUpdate);
     tabPage1_Gnrl.Location = new Point(4, 0x16);
     tabPage1_Gnrl.Padding = new Padding(3);
     tabPage1_Gnrl.Size = new Size(0x1ff, 0x1d7);
     tabPage1_Gnrl.TabIndex = 0;
     tabPage1_Gnrl.UseVisualStyleBackColor = true;
     btnCheckUpdates.AutoSize = true;
     btnCheckUpdates.Anchor = AnchorStyles.Left | AnchorStyles.Top;
     btnCheckUpdates.Location = new Point(0x12a, 0x1f1);
     btnCheckUpdates.TabIndex = 20;
     btnCheckUpdates.Click += btnCheckUpdates_Click;
     chbAutoUpdate.AutoSize = true;
     chbAutoUpdate.Location = new Point(0x1b, 0x1f3);
     chbAutoUpdate.TabIndex = 0x13;
     btnExportSettings.AutoSize = true;
     btnExportSettings.Anchor = AnchorStyles.Left | AnchorStyles.Top;
     btnExportSettings.Location = new Point(0x1b, 0x1c7);
     btnExportSettings.TabIndex = 0x12;
     btnExportSettings.Click += btnExportSettings_Click;
     lblNetworkTimeOut.AutoSize = true;
     lblNetworkTimeOut.Anchor = AnchorStyles.Left | AnchorStyles.Top;
     lblNetworkTimeOut.Location = new Point(0x1b, 0x1a5);
     nudNetworkTimeOut.Location = new Point(0x194, 420);
     int[] bits = new int[4];
     bits[0] = 60;
     nudNetworkTimeOut.Maximum = new decimal(bits);
     int[] numArray2 = new int[4];
     nudNetworkTimeOut.Minimum = new decimal(numArray2);
     nudNetworkTimeOut.Size = new Size(0x33, 0x15);
     nudNetworkTimeOut.TabIndex = 0x11;
     nudNetworkTimeOut.TextAlign = HorizontalAlignment.Right;
     int[] numArray3 = new int[4];
     numArray3[0] = 6;
     nudNetworkTimeOut.Value = new decimal(numArray3);
     btnLangBrowse.Anchor = AnchorStyles.Right | AnchorStyles.Top;
     btnLangBrowse.Location = new Point(0x1a7, 0x175);
     btnLangBrowse.Size = new Size(0x22, 0x19);
     btnLangBrowse.TabIndex = 0x10;
     btnLangBrowse.Text = "...";
     btnLangBrowse.Click += btnLangBrowse_Click;
     textBoxLang.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
     textBoxLang.Location = new Point(0x2d, 0x178);
     textBoxLang.Size = new Size(0x174, 0x15);
     textBoxLang.MaxLength = 260;
     textBoxLang.TabIndex = 15;
     textBoxLang.KeyPress += textBoxesPath_KeyPress;
     lblLang.Anchor = AnchorStyles.Left | AnchorStyles.Top;
     lblLang.AutoSize = true;
     lblLang.Location = new Point(0x1b, 0x160);
     chbPlaySound.AutoSize = true;
     chbPlaySound.Location = new Point(0x1b, 0x111);
     chbPlaySound.TabIndex = 14;
     chbDD.AutoSize = true;
     chbDD.Location = new Point(0x1b, 0xf5);
     chbDD.TabIndex = 13;
     btnClearRecentFile.Location = new Point(0x163, 0xd7);
     btnClearRecentFile.Size = new Size(100, 0x17);
     btnClearRecentFile.TabIndex = 12;
     btnClearRecentFile.Text = "Clear";
     btnClearRecentFile.Click += btnClearRecentFile_Click;
     nudMaxRecentFile.Location = new Point(0x12a, 0xd8);
     int[] numArray4 = new int[4];
     numArray4[0] = 0x40;
     nudMaxRecentFile.Maximum = new decimal(numArray4);
     int[] numArray5 = new int[4];
     numArray5[0] = 1;
     nudMaxRecentFile.Minimum = new decimal(numArray5);
     nudMaxRecentFile.Size = new Size(0x33, 0x15);
     nudMaxRecentFile.TabIndex = 11;
     nudMaxRecentFile.TextAlign = HorizontalAlignment.Right;
     int[] numArray6 = new int[4];
     numArray6[0] = 1;
     nudMaxRecentFile.Value = new decimal(numArray6);
     chbSaveExecuted.AutoSize = true;
     chbSaveExecuted.Location = new Point(0x1b, 0xd9);
     chbSaveExecuted.ThreeState = true;
     chbSaveExecuted.TabIndex = 10;
     btnHistoryClear.Location = new Point(0x163, 0xbb);
     btnHistoryClear.Size = new Size(100, 0x17);
     btnHistoryClear.TabIndex = 9;
     btnHistoryClear.Text = "Clear";
     btnHistoryClear.Click += buttonHistoryClear_Click;
     nudMaxUndo.Location = new Point(0x12a, 0xbc);
     int[] numArray7 = new int[4];
     numArray7[0] = 0x40;
     nudMaxUndo.Maximum = new decimal(numArray7);
     int[] numArray8 = new int[4];
     numArray8[0] = 1;
     nudMaxUndo.Minimum = new decimal(numArray8);
     nudMaxUndo.Size = new Size(0x33, 0x15);
     nudMaxUndo.TabIndex = 8;
     nudMaxUndo.TextAlign = HorizontalAlignment.Right;
     int[] numArray9 = new int[4];
     numArray9[0] = 1;
     nudMaxUndo.Value = new decimal(numArray9);
     chbNoHistory.AutoSize = true;
     chbNoHistory.Location = new Point(0x1b, 0xbd);
     chbNoHistory.TabIndex = 7;
     cmbNavBtn.DropDownStyle = ComboBoxStyle.DropDownList;
     cmbNavBtn.Location = new Point(0x176, 0x9f);
     cmbNavBtn.Size = new Size(0x51, 0x15);
     cmbNavBtn.TabIndex = 6;
     chbNavBtn.AutoSize = true;
     chbNavBtn.Location = new Point(0x1b, 0xa1);
     chbNavBtn.TabIndex = 5;
     chbNavBtn.CheckedChanged += chbNavBtn_CheckedChanged;
     chbX1X2.AutoSize = true;
     chbX1X2.Location = new Point(0x1b, 0x85);
     chbX1X2.TabIndex = 4;
     chbShowTooltip.AutoSize = true;
     chbShowTooltip.Location = new Point(0x1b, 0x69);
     chbShowTooltip.TabIndex = 3;
     chbCloseWhenGroup.AutoSize = true;
     chbCloseWhenGroup.Location = new Point(0x1b, 0x4d);
     chbCloseWhenGroup.TabIndex = 2;
     chbDontOpenSame.AutoSize = true;
     chbDontOpenSame.Location = new Point(0x1b, 0x31);
     chbDontOpenSame.TabIndex = 1;
     chbActivateNew.AutoSize = true;
     chbActivateNew.Location = new Point(0x1b, 0x15);
     chbActivateNew.TabIndex = 0;
     tabPage2_Tabs.Controls.Add(lblNewTabLoc);
     tabPage2_Tabs.Controls.Add(lblActvClose);
     tabPage2_Tabs.Controls.Add(lblTabDblClk);
     tabPage2_Tabs.Controls.Add(lblBGDblClik);
     tabPage2_Tabs.Controls.Add(lblTabWhlClk);
     tabPage2_Tabs.Controls.Add(lblAction_BarDblClick);
     tabPage2_Tabs.Controls.Add(lblMultiRows);
     tabPage2_Tabs.Controls.Add(cmbNewTabLoc);
     tabPage2_Tabs.Controls.Add(cmbActvClose);
     tabPage2_Tabs.Controls.Add(cmbTabDblClck);
     tabPage2_Tabs.Controls.Add(cmbBGDblClick);
     tabPage2_Tabs.Controls.Add(cmbTabWhlClck);
     tabPage2_Tabs.Controls.Add(cmbMultiRow);
     tabPage2_Tabs.Controls.Add(textBoxAction_BarDblClck);
     tabPage2_Tabs.Controls.Add(btnBrowseAction_BarDblClck);
     tabPage2_Tabs.Controls.Add(chbAutoSubText);
     tabPage2_Tabs.Controls.Add(chbTabCloseButton);
     tabPage2_Tabs.Controls.Add(chbTabCloseBtnAlt);
     tabPage2_Tabs.Controls.Add(chbTabCloseBtnHover);
     tabPage2_Tabs.Controls.Add(chbFolderIcon);
     tabPage2_Tabs.Controls.Add(chbSubDirTipOnTab);
     tabPage2_Tabs.Controls.Add(chbDriveLetter);
     tabPage2_Tabs.Controls.Add(chbTabSwitcher);
     tabPage2_Tabs.Controls.Add(chbTreeShftWhlTab);
     tabPage2_Tabs.Controls.Add(chbRemoveOnSeparate);
     tabPage2_Tabs.Location = new Point(4, 0x16);
     tabPage2_Tabs.Padding = new Padding(3);
     tabPage2_Tabs.Size = new Size(0x1ff, 0x1d7);
     tabPage2_Tabs.TabIndex = 1;
     tabPage2_Tabs.UseVisualStyleBackColor = true;
     chbRemoveOnSeparate.AutoSize = true;
     chbRemoveOnSeparate.Location = new Point(0x1b, 0x1f2);
     chbRemoveOnSeparate.TabIndex = 0x11;
     chbTreeShftWhlTab.AutoSize = true;
     chbTreeShftWhlTab.Location = new Point(0x1b, 0x1da);
     chbTreeShftWhlTab.TabIndex = 0x10;
     chbTabSwitcher.AutoSize = true;
     chbTabSwitcher.Location = new Point(0x1b, 450);
     chbTabSwitcher.TabIndex = 15;
     chbDriveLetter.AutoSize = true;
     chbDriveLetter.Location = new Point(0x36, 0x1aa);
     chbDriveLetter.TabIndex = 14;
     chbSubDirTipOnTab.AutoSize = true;
     chbSubDirTipOnTab.Location = new Point(0x36, 0x196);
     chbSubDirTipOnTab.TabIndex = 13;
     chbFolderIcon.AutoSize = true;
     chbFolderIcon.Location = new Point(0x1b, 0x182);
     chbFolderIcon.TabIndex = 12;
     chbFolderIcon.CheckedChanged += chbFolderIcon_CheckedChanged;
     chbTabCloseBtnHover.AutoSize = true;
     chbTabCloseBtnHover.Location = new Point(0x36, 0x16a);
     chbTabCloseBtnHover.TabIndex = 11;
     chbTabCloseBtnHover.CheckedChanged += chbTabCloseBtns_CheckedChanged;
     chbTabCloseBtnAlt.AutoSize = true;
     chbTabCloseBtnAlt.Location = new Point(0x36, 0x156);
     chbTabCloseBtnAlt.TabIndex = 10;
     chbTabCloseBtnAlt.CheckedChanged += chbTabCloseBtns_CheckedChanged;
     chbTabCloseButton.AutoSize = true;
     chbTabCloseButton.Location = new Point(0x1b, 0x142);
     chbTabCloseButton.TabIndex = 9;
     chbTabCloseButton.CheckedChanged += chbTabCloseButton_CheckedChanged;
     chbAutoSubText.AutoSize = true;
     chbAutoSubText.Location = new Point(0x1b, 0x12a);
     chbAutoSubText.TabIndex = 8;
     cmbMultiRow.DropDownStyle = ComboBoxStyle.DropDownList;
     cmbMultiRow.Location = new Point(0x11d, 0x102);
     cmbMultiRow.Size = new Size(0xa8, 0x15);
     cmbMultiRow.TabIndex = 7;
     lblMultiRows.AutoSize = true;
     lblMultiRows.Location = new Point(0x19, 0x105);
     btnBrowseAction_BarDblClck.Location = new Point(0x1a3, 0xd5);
     btnBrowseAction_BarDblClck.Size = new Size(0x22, 0x19);
     btnBrowseAction_BarDblClck.TabIndex = 6;
     btnBrowseAction_BarDblClck.Text = "...";
     btnBrowseAction_BarDblClck.Click += btnBrowseAction_Click;
     textBoxAction_BarDblClck.Location = new Point(0x97, 0xd7);
     textBoxAction_BarDblClck.Size = new Size(0x107, 0x15);
     textBoxAction_BarDblClck.MaxLength = 260;
     textBoxAction_BarDblClck.TabIndex = 5;
     lblAction_BarDblClick.AutoSize = true;
     lblAction_BarDblClick.Location = new Point(0x2e, 0xda);
     cmbBGDblClick.DropDownStyle = ComboBoxStyle.DropDownList;
     cmbBGDblClick.Location = new Point(0x11d, 0xb1);
     cmbBGDblClick.Size = new Size(0xa8, 0x15);
     cmbBGDblClick.TabIndex = 4;
     cmbBGDblClick.SelectedIndexChanged += comboBoxes_SelectedIndexChanged;
     lblBGDblClik.AutoSize = true;
     lblBGDblClik.Location = new Point(0x19, 0xb5);
     cmbTabWhlClck.DropDownStyle = ComboBoxStyle.DropDownList;
     cmbTabWhlClck.Location = new Point(0x11d, 0x89);
     cmbTabWhlClck.Size = new Size(0xa8, 0x15);
     cmbTabWhlClck.TabIndex = 3;
     lblTabWhlClk.AutoSize = true;
     lblTabWhlClk.Location = new Point(0x19, 0x8d);
     cmbTabDblClck.DropDownStyle = ComboBoxStyle.DropDownList;
     cmbTabDblClck.Location = new Point(0x11d, 0x61);
     cmbTabDblClck.Size = new Size(0xa8, 0x15);
     cmbTabDblClck.TabIndex = 2;
     lblTabDblClk.AutoSize = true;
     lblTabDblClk.Location = new Point(0x19, 0x65);
     cmbActvClose.DropDownStyle = ComboBoxStyle.DropDownList;
     cmbActvClose.Location = new Point(0x11d, 0x39);
     cmbActvClose.Size = new Size(0xa8, 0x15);
     cmbActvClose.TabIndex = 1;
     lblActvClose.AutoSize = true;
     lblActvClose.Location = new Point(0x19, 0x3d);
     cmbNewTabLoc.DropDownStyle = ComboBoxStyle.DropDownList;
     cmbNewTabLoc.Location = new Point(0x11d, 0x11);
     cmbNewTabLoc.Size = new Size(0xa8, 0x15);
     cmbNewTabLoc.TabIndex = 0;
     lblNewTabLoc.AutoSize = true;
     lblNewTabLoc.Location = new Point(0x19, 0x15);
     tabPage3_Wndw.Controls.Add(chbWhlClick);
     tabPage3_Wndw.Controls.Add(chbNCADblClck);
     tabPage3_Wndw.Controls.Add(chbBlockProcess);
     tabPage3_Wndw.Controls.Add(chbFoldrTree);
     tabPage3_Wndw.Controls.Add(chbWndUnresizable);
     tabPage3_Wndw.Controls.Add(chbWndRestrAlpha);
     tabPage3_Wndw.Controls.Add(chbNoTabFromOuteside);
     tabPage3_Wndw.Controls.Add(chbHolizontalScroll);
     tabPage3_Wndw.Controls.Add(chbWhlChangeView);
     tabPage3_Wndw.Controls.Add(chbNeverCloseWindow);
     tabPage3_Wndw.Controls.Add(chbNeverCloseWndLocked);
     tabPage3_Wndw.Controls.Add(chbRestoreClosed);
     tabPage3_Wndw.Controls.Add(chbRestoreLocked);
     tabPage3_Wndw.Controls.Add(chbSendToTray);
     tabPage3_Wndw.Controls.Add(chbSendToTrayOnMinimize);
     tabPage3_Wndw.Controls.Add(cmbWhlClick);
     tabPage3_Wndw.Controls.Add(lblSep);
     tabPage3_Wndw.Location = new Point(4, 0x16);
     tabPage3_Wndw.Padding = new Padding(3);
     tabPage3_Wndw.Size = new Size(0x1ff, 0x1d7);
     tabPage3_Wndw.TabIndex = 4;
     tabPage3_Wndw.UseVisualStyleBackColor = true;
     lblSep.BorderStyle = BorderStyle.Fixed3D;
     lblSep.Location = new Point(0x1a, 0x115);
     lblSep.Margin = new Padding(0);
     lblSep.Size = new Size(0x149, 2);
     cmbWhlClick.DropDownStyle = ComboBoxStyle.DropDownList;
     cmbWhlClick.Location = new Point(0x11d, 0x11);
     cmbWhlClick.Size = new Size(0x6f, 0x15);
     cmbWhlClick.TabIndex = 1;
     chbSendToTrayOnMinimize.AutoSize = true;
     chbSendToTrayOnMinimize.Location = new Point(0x1b, 0x1b3);
     chbSendToTrayOnMinimize.TabIndex = 13;
     chbSendToTray.AutoSize = true;
     chbSendToTray.Location = new Point(0x1b, 0x197);
     chbSendToTray.TabIndex = 12;
     chbRestoreLocked.AutoSize = true;
     chbRestoreLocked.Location = new Point(0x1b, 0x17b);
     chbRestoreLocked.TabIndex = 11;
     chbRestoreLocked.CheckedChanged += chbsCloseWindow_CheckedChanged;
     chbRestoreClosed.AutoSize = true;
     chbRestoreClosed.Location = new Point(0x1b, 0x15f);
     chbRestoreClosed.TabIndex = 10;
     chbRestoreClosed.CheckedChanged += chbsCloseWindow_CheckedChanged;
     chbNeverCloseWndLocked.AutoSize = true;
     chbNeverCloseWndLocked.Location = new Point(0x1b, 0x143);
     chbNeverCloseWndLocked.TabIndex = 9;
     chbNeverCloseWndLocked.CheckedChanged += chbsCloseWindow_CheckedChanged;
     chbNeverCloseWindow.AutoSize = true;
     chbNeverCloseWindow.Location = new Point(0x1b, 0x127);
     chbNeverCloseWindow.TabIndex = 8;
     chbWhlChangeView.AutoSize = true;
     chbWhlChangeView.Location = new Point(0x1b, 0xf5);
     chbWhlChangeView.TabIndex = 9;
     chbHolizontalScroll.AutoSize = true;
     chbHolizontalScroll.Location = new Point(0x1b, 0xd9);
     chbHolizontalScroll.TabIndex = 8;
     chbNoTabFromOuteside.AutoSize = true;
     chbNoTabFromOuteside.Location = new Point(0x1b, 0xbd);
     chbNoTabFromOuteside.TabIndex = 7;
     chbFoldrTree.AutoSize = true;
     chbFoldrTree.Location = new Point(0x1b, 0xa1);
     chbFoldrTree.TabIndex = 6;
     chbBlockProcess.AutoSize = true;
     chbBlockProcess.Location = new Point(0x1b, 0x85);
     chbBlockProcess.TabIndex = 5;
     chbWndRestrAlpha.AutoSize = true;
     chbWndRestrAlpha.Location = new Point(0x1b, 0x69);
     chbWndRestrAlpha.TabIndex = 4;
     chbWndUnresizable.AutoSize = true;
     chbWndUnresizable.Location = new Point(0x1b, 0x4d);
     chbWndUnresizable.TabIndex = 3;
     chbNCADblClck.AutoSize = true;
     chbNCADblClck.Location = new Point(0x1b, 0x31);
     chbNCADblClck.TabIndex = 2;
     chbWhlClick.AutoSize = true;
     chbWhlClick.Location = new Point(0x1b, 0x15);
     chbWhlClick.TabIndex = 0;
     chbWhlClick.CheckedChanged += chbMMButton_CheckedChanged;
     tabPage4_View.Controls.Add(chbUseTabSkin);
     tabPage4_View.Controls.Add(chbBoldActv);
     tabPage4_View.Controls.Add(chbToolbarBGClr);
     tabPage4_View.Controls.Add(chbRebarBGImage);
     tabPage4_View.Controls.Add(chbTabTitleShadow);
     tabPage4_View.Controls.Add(propertyGrid1);
     tabPage4_View.Controls.Add(nudTabWidth);
     tabPage4_View.Controls.Add(nudTabHeight);
     tabPage4_View.Controls.Add(nudTabWidthMax);
     tabPage4_View.Controls.Add(nudTabWidthMin);
     tabPage4_View.Controls.Add(lblTabSizeTitle);
     tabPage4_View.Controls.Add(lblTabWidth);
     tabPage4_View.Controls.Add(lblTabHeight);
     tabPage4_View.Controls.Add(lblTabWFix);
     tabPage4_View.Controls.Add(lblTabWMax);
     tabPage4_View.Controls.Add(lblTabWMin);
     tabPage4_View.Controls.Add(lblTabFont);
     tabPage4_View.Controls.Add(lblTabTxtClr);
     tabPage4_View.Controls.Add(lblTabTextAlignment);
     tabPage4_View.Controls.Add(lblMenuRenderer);
     tabPage4_View.Controls.Add(cmbTabSizeMode);
     tabPage4_View.Controls.Add(cmbTabTextAlignment);
     tabPage4_View.Controls.Add(cmbRebarBGImageMode);
     tabPage4_View.Controls.Add(cmbMenuRenderer);
     tabPage4_View.Controls.Add(btnHiliteClsc);
     tabPage4_View.Controls.Add(btnTabFont);
     tabPage4_View.Controls.Add(btnActTxtClr);
     tabPage4_View.Controls.Add(btnInactTxtClr);
     tabPage4_View.Controls.Add(btnDefTxtClr);
     tabPage4_View.Controls.Add(btnToolBarBGClr);
     tabPage4_View.Controls.Add(btnRebarImage);
     tabPage4_View.Controls.Add(btnShadowAct);
     tabPage4_View.Controls.Add(btnShadowIna);
     tabPage4_View.Controls.Add(btnTabImage);
     tabPage4_View.Controls.Add(tbRebarImagePath);
     tabPage4_View.Controls.Add(tbTabImagePath);
     tabPage4_View.Location = new Point(4, 0x16);
     tabPage4_View.Size = new Size(0x1ff, 0x1d7);
     tabPage4_View.TabIndex = 3;
     tabPage4_View.UseVisualStyleBackColor = true;
     cmbMenuRenderer.DropDownStyle = ComboBoxStyle.DropDownList;
     cmbMenuRenderer.Location = new Point(0x99, 0x1df);
     cmbMenuRenderer.Size = new Size(100, 0x15);
     cmbMenuRenderer.TabIndex = 0x19;
     lblMenuRenderer.AutoSize = true;
     lblMenuRenderer.Location = new Point(13, 0x1e1);
     cmbRebarBGImageMode.DropDownStyle = ComboBoxStyle.DropDownList;
     cmbRebarBGImageMode.Location = new Point(0xdf, 0x1c0);
     cmbRebarBGImageMode.Size = new Size(180, 0x15);
     cmbRebarBGImageMode.TabIndex = 0x18;
     btnRebarImage.Location = new Point(440, 0x1a6);
     btnRebarImage.Size = new Size(0x22, 0x19);
     btnRebarImage.TabIndex = 0x17;
     btnRebarImage.Text = "...";
     btnRebarImage.Click += btnRebarImage_Click;
     tbRebarImagePath.Location = new Point(0xdf, 0x1a7);
     tbRebarImagePath.Size = new Size(0xd5, 0x15);
     tbRebarImagePath.MaxLength = 260;
     tbRebarImagePath.TabIndex = 0x16;
     tbRebarImagePath.KeyPress += textBoxesPath_KeyPress;
     chbRebarBGImage.AutoSize = true;
     chbRebarBGImage.Location = new Point(0x10, 0x1a9);
     chbRebarBGImage.TabIndex = 0x15;
     chbRebarBGImage.CheckedChanged += chbRebarBGImage_CheckedChanged;
     btnToolBarBGClr.Location = new Point(0xdf, 0x18b);
     btnToolBarBGClr.Size = new Size(180, 0x17);
     btnToolBarBGClr.TabIndex = 20;
     btnToolBarBGClr.Click += buttonToolBarBGClr_Click;
     chbToolbarBGClr.AutoSize = true;
     chbToolbarBGClr.Location = new Point(0x10, 400);
     chbToolbarBGClr.TabIndex = 0x13;
     chbToolbarBGClr.CheckedChanged += chbToolbarBGClr_CheckedChanged;
     btnShadowIna.AutoSize = true;
     btnShadowIna.Location = new Point(0x107, 0x160);
     btnShadowIna.Size = new Size(100, 0x17);
     btnShadowIna.TabIndex = 0x12;
     btnShadowIna.Click += btnShadowClrs_Click;
     btnShadowAct.AutoSize = true;
     btnShadowAct.Location = new Point(0x99, 0x160);
     btnShadowAct.Size = new Size(100, 0x17);
     btnShadowAct.TabIndex = 0x11;
     btnShadowAct.Click += btnShadowClrs_Click;
     chbTabTitleShadow.AutoSize = true;
     chbTabTitleShadow.Location = new Point(0x10, 0x165);
     chbTabTitleShadow.TabIndex = 0x10;
     chbTabTitleShadow.CheckedChanged += chbTabTitleShadow_CheckedChanged;
     btnDefTxtClr.AutoSize = true;
     btnDefTxtClr.Location = new Point(0x175, 0x13f);
     btnDefTxtClr.Size = new Size(100, 0x17);
     btnDefTxtClr.TabIndex = 15;
     btnDefTxtClr.Click += buttonRstClr_Click;
     btnInactTxtClr.AutoSize = true;
     btnInactTxtClr.Location = new Point(0x107, 0x13f);
     btnInactTxtClr.Size = new Size(100, 0x17);
     btnInactTxtClr.TabIndex = 14;
     btnInactTxtClr.Click += buttonInactClr_Click;
     btnActTxtClr.AutoSize = true;
     btnActTxtClr.Location = new Point(0x99, 0x13f);
     btnActTxtClr.Size = new Size(100, 0x17);
     btnActTxtClr.TabIndex = 13;
     btnActTxtClr.Click += buttonActClr_Click;
     lblTabTxtClr.AutoSize = true;
     lblTabTxtClr.Location = new Point(13, 0x144);
     chbBoldActv.AutoSize = true;
     chbBoldActv.Location = new Point(0x109, 0x121);
     chbBoldActv.TabIndex = 12;
     btnTabFont.Location = new Point(0x99, 0x11c);
     btnTabFont.Size = new Size(100, 0x19);
     btnTabFont.TabIndex = 11;
     btnTabFont.Click += btnFont_Click;
     lblTabFont.AutoSize = true;
     lblTabFont.Location = new Point(13, 290);
     cmbTabTextAlignment.DropDownStyle = ComboBoxStyle.DropDownList;
     cmbTabTextAlignment.Location = new Point(0x99, 0xfe);
     cmbTabTextAlignment.Size = new Size(100, 0x15);
     cmbTabTextAlignment.TabIndex = 10;
     lblTabTextAlignment.Location = new Point(13, 0x100);
     lblTabTextAlignment.AutoSize = true;
     nudTabWidthMin.Location = new Point(0x152, 0xdf);
     int[] numArray10 = new int[4];
     numArray10[0] = 0x200;
     nudTabWidthMin.Maximum = new decimal(numArray10);
     int[] numArray11 = new int[4];
     numArray11[0] = 10;
     nudTabWidthMin.Minimum = new decimal(numArray11);
     nudTabWidthMin.Size = new Size(0x33, 0x15);
     nudTabWidthMin.TabIndex = 9;
     nudTabWidthMin.TextAlign = HorizontalAlignment.Center;
     int[] numArray12 = new int[4];
     numArray12[0] = 0x19;
     nudTabWidthMin.Value = new decimal(numArray12);
     nudTabWidthMin.ValueChanged += numericUpDownMax_ValueChanged;
     lblTabWMin.Location = new Point(0xfc, 0xdf);
     lblTabWMin.Size = new Size(0x4c, 0x15);
     lblTabWMin.TextAlign = ContentAlignment.MiddleRight;
     nudTabWidthMax.Location = new Point(0x152, 0xc5);
     int[] numArray13 = new int[4];
     numArray13[0] = 0x200;
     nudTabWidthMax.Maximum = new decimal(numArray13);
     int[] numArray14 = new int[4];
     numArray14[0] = 10;
     nudTabWidthMax.Minimum = new decimal(numArray14);
     nudTabWidthMax.Size = new Size(0x33, 0x15);
     nudTabWidthMax.TabIndex = 8;
     nudTabWidthMax.TextAlign = HorizontalAlignment.Center;
     int[] numArray15 = new int[4];
     numArray15[0] = 0x19;
     nudTabWidthMax.Value = new decimal(numArray15);
     nudTabWidthMax.ValueChanged += numericUpDownMax_ValueChanged;
     lblTabWMax.Location = new Point(0xfc, 0xc5);
     lblTabWMax.Size = new Size(0x4c, 0x15);
     lblTabWMax.TextAlign = ContentAlignment.MiddleRight;
     nudTabWidth.Location = new Point(0x152, 0xab);
     int[] numArray16 = new int[4];
     numArray16[0] = 0x200;
     nudTabWidth.Maximum = new decimal(numArray16);
     int[] numArray17 = new int[4];
     numArray17[0] = 10;
     nudTabWidth.Minimum = new decimal(numArray17);
     nudTabWidth.Size = new Size(0x33, 0x15);
     nudTabWidth.TabIndex = 7;
     nudTabWidth.TextAlign = HorizontalAlignment.Center;
     int[] numArray18 = new int[4];
     numArray18[0] = 0x18;
     nudTabWidth.Value = new decimal(numArray18);
     lblTabWFix.Location = new Point(0x102, 0xab);
     lblTabWFix.Size = new Size(70, 0x15);
     lblTabWFix.TextAlign = ContentAlignment.MiddleRight;
     cmbTabSizeMode.DropDownStyle = ComboBoxStyle.DropDownList;
     cmbTabSizeMode.Location = new Point(0x99, 170);
     cmbTabSizeMode.Size = new Size(100, 0x15);
     cmbTabSizeMode.TabIndex = 6;
     cmbTabSizeMode.SelectedIndexChanged += comboBoxes_SelectedIndexChanged;
     nudTabHeight.Location = new Point(0x99, 140);
     int[] numArray19 = new int[4];
     numArray19[0] = 50;
     nudTabHeight.Maximum = new decimal(numArray19);
     int[] numArray20 = new int[4];
     numArray20[0] = 10;
     nudTabHeight.Minimum = new decimal(numArray20);
     nudTabHeight.Size = new Size(0x33, 0x15);
     nudTabHeight.TabIndex = 5;
     nudTabHeight.TextAlign = HorizontalAlignment.Center;
     int[] numArray21 = new int[4];
     numArray21[0] = 0x18;
     nudTabHeight.Value = new decimal(numArray21);
     lblTabWidth.AutoSize = true;
     lblTabWidth.Location = new Point(0x4a, 0xac);
     lblTabHeight.AutoSize = true;
     lblTabHeight.Location = new Point(0x4a, 0x8f);
     lblTabSizeTitle.AutoSize = true;
     lblTabSizeTitle.Location = new Point(13, 0x79);
     propertyGrid1.HelpVisible = false;
     propertyGrid1.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
     propertyGrid1.Location = new Point(15, 0x26);
     propertyGrid1.PropertySort = PropertySort.NoSort;
     propertyGrid1.Size = new Size(0x176, 0x48);
     propertyGrid1.TabIndex = 3;
     propertyGrid1.ToolbarVisible = false;
     btnHiliteClsc.Anchor = AnchorStyles.Right | AnchorStyles.Top;
     btnHiliteClsc.AutoSize = true;
     btnHiliteClsc.Location = new Point(0x1a3, 0x26);
     btnHiliteClsc.Size = new Size(0x4b, 0x17);
     btnHiliteClsc.TabIndex = 4;
     btnHiliteClsc.Click += buttonHL_Click;
     btnTabImage.Location = new Point(440, 11);
     btnTabImage.Size = new Size(0x22, 0x19);
     btnTabImage.TabIndex = 2;
     btnTabImage.Text = "...";
     btnTabImage.Click += btnTabImage_Click;
     tbTabImagePath.Location = new Point(0xdf, 12);
     tbTabImagePath.Size = new Size(0xd5, 0x15);
     tbTabImagePath.MaxLength = 260;
     tbTabImagePath.TabIndex = 1;
     tbTabImagePath.KeyPress += textBoxesPath_KeyPress;
     chbUseTabSkin.AutoSize = true;
     chbUseTabSkin.Location = new Point(15, 14);
     chbUseTabSkin.TabIndex = 0;
     chbUseTabSkin.CheckedChanged += chbDrawMode_CheckedChanged;
     tabPage5_Grps.Controls.Add(btnUp_Grp);
     tabPage5_Grps.Controls.Add(btnDown_Grp);
     tabPage5_Grps.Controls.Add(btnAddSep_Grp);
     tabPage5_Grps.Controls.Add(btnStartUpGrp);
     tabPage5_Grps.Controls.Add(btnPlus_Grp);
     tabPage5_Grps.Controls.Add(btnMinus_Grp);
     tabPage5_Grps.Controls.Add(treeViewGroup);
     tabPage5_Grps.Controls.Add(cmbSpclFol_Grp);
     tabPage5_Grps.Controls.Add(btnAddSpcFol_Grp);
     tabPage5_Grps.Controls.Add(lblGroupKey);
     tabPage5_Grps.Controls.Add(tbGroupKey);
     tabPage5_Grps.Controls.Add(chbGroupKey);
     tabPage5_Grps.Location = new Point(4, 0x16);
     tabPage5_Grps.Padding = new Padding(3);
     tabPage5_Grps.Size = new Size(0x1ff, 0x1d7);
     tabPage5_Grps.TabIndex = 2;
     tabPage5_Grps.UseVisualStyleBackColor = true;
     treeViewGroup.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
     treeViewGroup.HideSelection = false;
     treeViewGroup.ImageKey = "noimage";
     treeViewGroup.SelectedImageKey = "noimage";
     treeViewGroup.ImageList = QTUtility.ImageListGlobal;
     treeViewGroup.LabelEdit = true;
     treeViewGroup.Location = new Point(5, 0x2d);
     treeViewGroup.ShowNodeToolTips = true;
     treeViewGroup.Size = new Size(0x1ed, 0x156);
     treeViewGroup.TabIndex = 6;
     treeViewGroup.AfterSelect += treeViewGroup_AfterSelect;
     treeViewGroup.BeforeLabelEdit += treeViewGroup_BeforeLabelEdit;
     treeViewGroup.AfterLabelEdit += treeViewGroup_AfterLabelEdit;
     treeViewGroup.KeyDown += treeViewGroup_KeyDown;
     btnUp_Grp.Enabled = false;
     btnUp_Grp.Location = new Point(5, 0x10);
     btnUp_Grp.Size = new Size(50, 0x17);
     btnUp_Grp.TabIndex = 0;
     btnUp_Grp.Click += UpDownButtons_Click;
     btnDown_Grp.Enabled = false;
     btnDown_Grp.Location = new Point(0x3d, 0x10);
     btnDown_Grp.Size = new Size(50, 0x17);
     btnDown_Grp.TabIndex = 1;
     btnDown_Grp.Click += UpDownButtons_Click;
     btnAddSep_Grp.Location = new Point(0x75, 0x10);
     btnAddSep_Grp.Size = new Size(120, 0x17);
     btnAddSep_Grp.TabIndex = 2;
     btnAddSep_Grp.Click += btnAddSep_Click;
     btnStartUpGrp.Anchor = AnchorStyles.Right | AnchorStyles.Top;
     btnStartUpGrp.Location = new Point(0x150, 0x10);
     btnStartUpGrp.Size = new Size(100, 0x17);
     btnStartUpGrp.TabIndex = 3;
     btnStartUpGrp.Click += btnStartUpGrp_Click;
     btnPlus_Grp.Anchor = AnchorStyles.Right | AnchorStyles.Top;
     btnPlus_Grp.Location = new Point(0x1ba, 0x10);
     btnPlus_Grp.Size = new Size(0x19, 0x17);
     btnPlus_Grp.TabIndex = 4;
     btnPlus_Grp.Text = "+";
     btnPlus_Grp.Click += btnPlus_Click;
     btnMinus_Grp.Anchor = AnchorStyles.Right | AnchorStyles.Top;
     btnMinus_Grp.Location = new Point(0x1d9, 0x10);
     btnMinus_Grp.Size = new Size(0x19, 0x17);
     btnMinus_Grp.TabIndex = 5;
     btnMinus_Grp.Text = "-";
     btnMinus_Grp.Click += btnMinus_Click;
     cmbSpclFol_Grp.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
     cmbSpclFol_Grp.Enabled = false;
     cmbSpclFol_Grp.DropDownStyle = ComboBoxStyle.DropDownList;
     cmbSpclFol_Grp.Location = new Point(5, 0x187);
     cmbSpclFol_Grp.Size = new Size(150, 0x15);
     cmbSpclFol_Grp.TabIndex = 7;
     btnAddSpcFol_Grp.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
     btnAddSpcFol_Grp.Enabled = false;
     btnAddSpcFol_Grp.Location = new Point(0x9e, 390);
     btnAddSpcFol_Grp.Size = new Size(0x19, 0x17);
     btnAddSpcFol_Grp.TabIndex = 8;
     btnAddSpcFol_Grp.Text = "+";
     btnAddSpcFol_Grp.Click += btnAddSpcFol_Grp_Click;
     lblGroupKey.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
     lblGroupKey.AutoSize = true;
     lblGroupKey.Location = new Point(6, 0x1ac);
     lblGroupKey.Size = new Size(0x61, 13);
     chbGroupKey.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
     chbGroupKey.AutoSize = true;
     chbGroupKey.Enabled = false;
     chbGroupKey.Location = new Point(0x6b, 420);
     chbGroupKey.TabIndex = 9;
     chbGroupKey.CheckedChanged += chbGroupKey_CheckedChanged;
     tbGroupKey.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom;
     tbGroupKey.Enabled = false;
     tbGroupKey.Location = new Point(0x7f, 0x1a9);
     tbGroupKey.Size = new Size(340, 0x15);
     tbGroupKey.TextAlign = HorizontalAlignment.Center;
     tbGroupKey.TabIndex = 10;
     tbGroupKey.PreviewKeyDown += tbGroupKey_PreviewKeyDown;
     tbGroupKey.KeyPress += tbGroupKey_KeyPress;
     tabPage6_Apps.Controls.Add(treeViewUserApps);
     tabPage6_Apps.Controls.Add(btnUp_app);
     tabPage6_Apps.Controls.Add(btnDown_app);
     tabPage6_Apps.Controls.Add(btnAddSep_app);
     tabPage6_Apps.Controls.Add(btnAddVFolder_app);
     tabPage6_Apps.Controls.Add(btnPlus_app);
     tabPage6_Apps.Controls.Add(btnMinus_app);
     tabPage6_Apps.Controls.Add(lblUserApps_Path);
     tabPage6_Apps.Controls.Add(lblUserApps_Args);
     tabPage6_Apps.Controls.Add(lblUserApps_Working);
     tabPage6_Apps.Controls.Add(lblUserApps_Key);
     tabPage6_Apps.Controls.Add(tbPath);
     tabPage6_Apps.Controls.Add(tbArgs);
     tabPage6_Apps.Controls.Add(tbWorking);
     tabPage6_Apps.Controls.Add(chbUserAppKey);
     tabPage6_Apps.Controls.Add(tbUserAppKey);
     tabPage6_Apps.Controls.Add(btnOFD_app);
     tabPage6_Apps.Controls.Add(btnBFD_app);
     tabPage6_Apps.Controls.Add(btnAddToken_Arg);
     tabPage6_Apps.Controls.Add(btnAddToken_Wrk);
     tabPage6_Apps.Location = new Point(4, 0x16);
     tabPage6_Apps.Padding = new Padding(3);
     tabPage6_Apps.Size = new Size(0x1ff, 0x1d7);
     tabPage6_Apps.TabIndex = 5;
     tabPage6_Apps.UseVisualStyleBackColor = true;
     treeViewUserApps.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
     treeViewUserApps.HideSelection = false;
     treeViewUserApps.ImageKey = "noimage";
     treeViewUserApps.SelectedImageKey = "noimage";
     treeViewUserApps.ImageList = QTUtility.ImageListGlobal;
     treeViewUserApps.LabelEdit = true;
     treeViewUserApps.Location = new Point(5, 0x2d);
     treeViewUserApps.Size = new Size(0x1ed, 0x12e);
     treeViewUserApps.TabIndex = 6;
     treeViewUserApps.AfterLabelEdit += treeViewUserApps_AfterLabelEdit;
     treeViewUserApps.AfterSelect += treeViewUserApps_AfterSelect;
     treeViewUserApps.BeforeLabelEdit += treeViewUserApps_BeforeLabelEdit;
     treeViewUserApps.KeyDown += treeViewUserApps_KeyDown;
     btnUp_app.Enabled = false;
     btnUp_app.Location = new Point(5, 0x10);
     btnUp_app.Size = new Size(50, 0x17);
     btnUp_app.TabIndex = 0;
     btnUp_app.Click += btnUpDown_app_Click;
     btnDown_app.Enabled = false;
     btnDown_app.Location = new Point(0x3d, 0x10);
     btnDown_app.Size = new Size(50, 0x17);
     btnDown_app.TabIndex = 1;
     btnDown_app.Click += btnUpDown_app_Click;
     btnAddSep_app.Location = new Point(0x75, 0x10);
     btnAddSep_app.Size = new Size(120, 0x17);
     btnAddSep_app.TabIndex = 2;
     btnAddSep_app.Click += btnAddSep_app_Click;
     btnAddVFolder_app.Anchor = AnchorStyles.Right | AnchorStyles.Top;
     btnAddVFolder_app.Location = new Point(0x182, 0x10);
     btnAddVFolder_app.Size = new Size(50, 0x18);
     btnAddVFolder_app.TabIndex = 3;
     btnAddVFolder_app.Text = "+";
     btnAddVFolder_app.TextImageRelation = TextImageRelation.ImageBeforeText;
     btnAddVFolder_app.ImageAlign = ContentAlignment.TopLeft;
     btnAddVFolder_app.Click += btnAddVirtualFolder_app_Click;
     btnPlus_app.Anchor = AnchorStyles.Right | AnchorStyles.Top;
     btnPlus_app.Location = new Point(0x1ba, 0x10);
     btnPlus_app.Size = new Size(0x19, 0x17);
     btnPlus_app.TabIndex = 4;
     btnPlus_app.Text = "+";
     btnPlus_app.Click += btnPlus_app_Click;
     btnMinus_app.Anchor = AnchorStyles.Right | AnchorStyles.Top;
     btnMinus_app.Location = new Point(0x1d9, 0x10);
     btnMinus_app.Size = new Size(0x19, 0x17);
     btnMinus_app.TabIndex = 5;
     btnMinus_app.Text = "-";
     btnMinus_app.Click += btnMinus_app_Click;
     lblUserApps_Path.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
     lblUserApps_Path.AutoSize = true;
     lblUserApps_Path.Location = new Point(6, 0x164);
     lblUserApps_Path.Size = new Size(0x21, 13);
     lblUserApps_Args.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
     lblUserApps_Args.AutoSize = true;
     lblUserApps_Args.Location = new Point(6, 380);
     lblUserApps_Args.Size = new Size(0x3f, 13);
     lblUserApps_Working.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
     lblUserApps_Working.AutoSize = true;
     lblUserApps_Working.Location = new Point(6, 0x194);
     lblUserApps_Working.Size = new Size(0x61, 13);
     lblUserApps_Key.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
     lblUserApps_Key.AutoSize = true;
     lblUserApps_Key.Location = new Point(6, 0x1ac);
     lblUserApps_Key.Size = new Size(0x61, 13);
     tbPath.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom;
     tbPath.Enabled = false;
     tbPath.Location = new Point(0x6b, 0x161);
     tbPath.Size = new Size(0x149, 0x15);
     tbPath.MaxLength = 260;
     tbPath.TabIndex = 7;
     tbPath.TextChanged += tbsUserApps_TextChanged;
     tbPath.KeyPress += textBoxesPath_KeyPress;
     tbArgs.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom;
     tbArgs.Enabled = false;
     tbArgs.Location = new Point(0x6b, 0x179);
     tbArgs.Size = new Size(360, 0x15);
     tbArgs.MaxLength = 260;
     tbArgs.TabIndex = 10;
     tbArgs.TextChanged += tbsUserApps_TextChanged;
     tbWorking.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom;
     tbWorking.Enabled = false;
     tbWorking.Location = new Point(0x6b, 0x191);
     tbWorking.Size = new Size(360, 0x15);
     tbWorking.MaxLength = 260;
     tbWorking.TabIndex = 12;
     tbWorking.TextChanged += tbsUserApps_TextChanged;
     tbWorking.KeyPress += textBoxesPath_KeyPress;
     chbUserAppKey.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
     chbUserAppKey.AutoSize = true;
     chbUserAppKey.Enabled = false;
     chbUserAppKey.Location = new Point(0x6b, 420);
     chbUserAppKey.TabIndex = 14;
     chbUserAppKey.CheckedChanged += chbUserAppKey_CheckedChanged;
     tbUserAppKey.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom;
     tbUserAppKey.Enabled = false;
     tbUserAppKey.Location = new Point(0x7f, 0x1a9);
     tbUserAppKey.Size = new Size(340, 0x15);
     tbUserAppKey.TextAlign = HorizontalAlignment.Center;
     tbUserAppKey.TabIndex = 15;
     tbUserAppKey.PreviewKeyDown += tbUserAppKey_PreviewKeyDown;
     tbUserAppKey.KeyPress += tbUserAppKey_KeyPress;
     btnOFD_app.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
     btnOFD_app.Enabled = false;
     btnOFD_app.Location = new Point(0x1ba, 0x161);
     btnOFD_app.Size = new Size(0x19, 0x15);
     btnOFD_app.TabIndex = 8;
     btnOFD_app.Text = "...";
     btnOFD_app.UseVisualStyleBackColor = true;
     btnOFD_app.Click += btnOFD_app_Click;
     btnBFD_app.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
     btnBFD_app.Enabled = false;
     btnBFD_app.Location = new Point(0x1d9, 0x161);
     btnBFD_app.Size = new Size(0x19, 0x15);
     btnBFD_app.TabIndex = 9;
     btnBFD_app.Text = ".";
     btnBFD_app.UseVisualStyleBackColor = true;
     btnBFD_app.Click += btnBFD_app_Click;
     btnAddToken_Arg.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
     btnAddToken_Arg.Location = new Point(0x1d9, 0x179);
     btnAddToken_Arg.Enabled = false;
     btnAddToken_Arg.Size = new Size(0x19, 0x15);
     btnAddToken_Arg.TabIndex = 11;
     btnAddToken_Arg.Text = "%";
     btnAddToken_Arg.UseVisualStyleBackColor = true;
     btnAddToken_Arg.Click += btnAddToken_Arg_Click;
     btnAddToken_Wrk.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
     btnAddToken_Wrk.Enabled = false;
     btnAddToken_Wrk.Location = new Point(0x1d9, 0x191);
     btnAddToken_Wrk.Size = new Size(0x19, 0x15);
     btnAddToken_Wrk.TabIndex = 13;
     btnAddToken_Wrk.Text = "%";
     btnAddToken_Wrk.UseVisualStyleBackColor = true;
     btnAddToken_Wrk.Click += btnAddToken_Wrk_Click;
     cmsAddToken.ShowImageMargin = false;
     cmsAddToken.ItemClicked += cmsAddToken_ItemClicked;
     tabPage9_Misc.Controls.Add(chbForceSysListView);
     tabPage9_Misc.Controls.Add(chbAlwaysShowHeader);
     tabPage9_Misc.Controls.Add(chbHideMenu);
     tabPage9_Misc.Controls.Add(chbBSUpOneLvl);
     tabPage9_Misc.Controls.Add(chbNoFulRowSelect);
     tabPage9_Misc.Controls.Add(chbGridLine);
     tabPage9_Misc.Controls.Add(chbAlternateColor);
     tabPage9_Misc.Controls.Add(chbShowPreview);
     tabPage9_Misc.Controls.Add(chbPreviewMode);
     tabPage9_Misc.Controls.Add(chbPreviewInfo);
     tabPage9_Misc.Controls.Add(chbSubDirTip);
     tabPage9_Misc.Controls.Add(chbSubDirTipMode);
     tabPage9_Misc.Controls.Add(chbSubDirTipModeHidden);
     tabPage9_Misc.Controls.Add(chbSubDirTipModeSystem);
     tabPage9_Misc.Controls.Add(chbSubDirTipModeFile);
     tabPage9_Misc.Controls.Add(chbSubDirTipPreview);
     tabPage9_Misc.Controls.Add(chbSelectWithoutExt);
     tabPage9_Misc.Controls.Add(chbF2Selection);
     tabPage9_Misc.Controls.Add(chbCursorLoop);
     tabPage9_Misc.Controls.Add(btnAlternateColor);
     tabPage9_Misc.Controls.Add(btnAlternateColor_Text);
     tabPage9_Misc.Controls.Add(btnAlternate_Default);
     tabPage9_Misc.Controls.Add(btnAddImgExt);
     tabPage9_Misc.Controls.Add(btnDelImgExt);
     tabPage9_Misc.Controls.Add(btnDefaultImgExt);
     tabPage9_Misc.Controls.Add(btnPreviewFont);
     tabPage9_Misc.Controls.Add(btnPreviewFontDefault);
     tabPage9_Misc.Controls.Add(cmbImgExts);
     tabPage9_Misc.Controls.Add(btnAddTextExt);
     tabPage9_Misc.Controls.Add(btnDelTextExt);
     tabPage9_Misc.Controls.Add(btnDefaultTextExt);
     tabPage9_Misc.Controls.Add(cmbTextExts);
     tabPage9_Misc.Controls.Add(btnPayPal);
     tabPage9_Misc.Controls.Add(nudPreviewMaxHeight);
     tabPage9_Misc.Controls.Add(nudPreviewMaxWidth);
     tabPage9_Misc.Controls.Add(lblPreviewHeight);
     tabPage9_Misc.Controls.Add(lblPreviewWidth);
     tabPage9_Misc.Location = new Point(4, 0x16);
     tabPage9_Misc.Padding = new Padding(3);
     tabPage9_Misc.Size = new Size(0x1ff, 0x1d7);
     tabPage9_Misc.TabIndex = 6;
     tabPage9_Misc.UseVisualStyleBackColor = true;
     btnPayPal.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
     btnPayPal.BackgroundImage = Resources_String.paypalBtn;
     btnPayPal.BackgroundImageLayout = ImageLayout.Center;
     btnPayPal.Location = new Point(0x1a8, 0x17b);
     btnPayPal.Size = new Size(0x47, 0x4c);
     btnPayPal.Cursor = Cursors.Hand;
     btnPayPal.TabIndex = 0x20;
     btnPayPal.UseVisualStyleBackColor = false;
     btnPayPal.Click += btnPayPal_Click;
     chbCursorLoop.AutoSize = true;
     chbCursorLoop.Location = new Point(0x1b, 0x1e1);
     chbCursorLoop.TabIndex = 0x1f;
     chbF2Selection.AutoSize = true;
     chbF2Selection.Location = new Point(0x1b, 0x1c9);
     chbF2Selection.TabIndex = 30;
     chbSelectWithoutExt.AutoSize = true;
     chbSelectWithoutExt.Location = new Point(0x1b, 0x1b1);
     chbSelectWithoutExt.TabIndex = 0x1d;
     chbSubDirTipModeSystem.AutoSize = true;
     chbSubDirTipModeSystem.Location = new Point(0x2d, 0x193);
     chbSubDirTipModeSystem.TabIndex = 0x1c;
     chbSubDirTipModeFile.AutoSize = true;
     chbSubDirTipModeFile.Location = new Point(0xd7, 0x179);
     chbSubDirTipModeFile.TabIndex = 0x1b;
     chbSubDirTipModeHidden.AutoSize = true;
     chbSubDirTipModeHidden.Location = new Point(0x2d, 0x179);
     chbSubDirTipModeHidden.TabIndex = 0x1a;
     chbSubDirTipPreview.AutoSize = true;
     chbSubDirTipPreview.Location = new Point(0xd7, 0x15f);
     chbSubDirTipPreview.TabIndex = 0x19;
     chbSubDirTipMode.AutoSize = true;
     chbSubDirTipMode.Location = new Point(0x2d, 0x15f);
     chbSubDirTipMode.TabIndex = 0x18;
     chbSubDirTip.AutoSize = true;
     chbSubDirTip.Location = new Point(0x1b, 330);
     chbSubDirTip.TabIndex = 0x17;
     chbSubDirTip.CheckedChanged += chbSubDirTip_CheckedChanged;
     btnPreviewFontDefault.Location = new Point(0x191, 0x127);
     btnPreviewFontDefault.Size = new Size(100, 0x17);
     btnPreviewFontDefault.TabIndex = 0x16;
     btnPreviewFontDefault.Click += btnPreviewFont_Click;
     btnPreviewFont.Location = new Point(0x123, 0x127);
     btnPreviewFont.Size = new Size(100, 0x17);
     btnPreviewFont.TabIndex = 0x15;
     btnPreviewFont.Click += btnPreviewFont_Click;
     btnDefaultTextExt.Location = new Point(0x191, 0x10d);
     btnDefaultTextExt.Size = new Size(100, 0x17);
     btnDefaultTextExt.TabIndex = 20;
     btnDefaultTextExt.Click += btnDefaultTextExt_Click;
     btnDelTextExt.Location = new Point(0x123, 0x10d);
     btnDelTextExt.Size = new Size(100, 0x17);
     btnDelTextExt.TabIndex = 0x13;
     btnDelTextExt.Click += btnDelPreiviewExt_Click;
     btnAddTextExt.Location = new Point(0xb5, 0x10d);
     btnAddTextExt.Size = new Size(100, 0x17);
     btnAddTextExt.TabIndex = 0x12;
     btnAddTextExt.Click += btnAddPreviewExt_Click;
     cmbTextExts.Location = new Point(0x2d, 0x10d);
     cmbTextExts.Size = new Size(130, 0x17);
     cmbTextExts.TabIndex = 0x11;
     cmbTextExts.SelectedIndexChanged += comboBoxes_SelectedIndexChanged;
     cmbTextExts.KeyPress += comboBoxPreviewExts_KeyPress;
     btnDefaultImgExt.Location = new Point(0x191, 0xf3);
     btnDefaultImgExt.Size = new Size(100, 0x17);
     btnDefaultImgExt.TabIndex = 0x10;
     btnDefaultImgExt.Click += btnDefaultImgExt_Click;
     btnDelImgExt.Location = new Point(0x123, 0xf3);
     btnDelImgExt.Size = new Size(100, 0x17);
     btnDelImgExt.TabIndex = 15;
     btnDelImgExt.Click += btnDelPreiviewExt_Click;
     btnAddImgExt.Location = new Point(0xb5, 0xf3);
     btnAddImgExt.Size = new Size(100, 0x17);
     btnAddImgExt.TabIndex = 14;
     btnAddImgExt.Click += btnAddPreviewExt_Click;
     cmbImgExts.Location = new Point(0x2d, 0xf3);
     cmbImgExts.Size = new Size(130, 0x17);
     cmbImgExts.TabIndex = 13;
     cmbImgExts.SelectedIndexChanged += comboBoxes_SelectedIndexChanged;
     cmbImgExts.KeyPress += comboBoxPreviewExts_KeyPress;
     lblPreviewWidth.Location = new Point(0x129, 0xbf);
     lblPreviewWidth.Size = new Size(0x62, 0x15);
     lblPreviewWidth.TextAlign = ContentAlignment.MiddleRight;
     lblPreviewHeight.Location = new Point(0x129, 0xd9);
     lblPreviewHeight.Size = new Size(0x62, 0x15);
     lblPreviewHeight.TextAlign = ContentAlignment.MiddleRight;
     nudPreviewMaxWidth.Location = new Point(0x191, 0xbf);
     int[] numArray22 = new int[4];
     numArray22[0] = 0x780;
     nudPreviewMaxWidth.Maximum = new decimal(numArray22);
     int[] numArray23 = new int[4];
     numArray23[0] = 0x80;
     nudPreviewMaxWidth.Minimum = new decimal(numArray23);
     nudPreviewMaxWidth.Size = new Size(0x3e, 0x15);
     nudPreviewMaxWidth.TabIndex = 11;
     nudPreviewMaxWidth.TextAlign = HorizontalAlignment.Center;
     int[] numArray24 = new int[4];
     numArray24[0] = 0x200;
     nudPreviewMaxWidth.Value = new decimal(numArray24);
     nudPreviewMaxHeight.Location = new Point(0x191, 0xd9);
     int[] numArray25 = new int[4];
     numArray25[0] = 0x4b0;
     nudPreviewMaxHeight.Maximum = new decimal(numArray25);
     int[] numArray26 = new int[4];
     numArray26[0] = 0x60;
     nudPreviewMaxHeight.Minimum = new decimal(numArray26);
     nudPreviewMaxHeight.Size = new Size(0x3e, 0x15);
     nudPreviewMaxHeight.TabIndex = 12;
     nudPreviewMaxHeight.TextAlign = HorizontalAlignment.Center;
     int[] numArray27 = new int[4];
     numArray27[0] = 0x100;
     nudPreviewMaxHeight.Value = new decimal(numArray27);
     chbPreviewInfo.AutoSize = true;
     chbPreviewInfo.Location = new Point(0x2d, 0xd7);
     chbPreviewInfo.TabIndex = 10;
     chbPreviewMode.AutoSize = true;
     chbPreviewMode.Location = new Point(0x2d, 0xbf);
     chbPreviewMode.TabIndex = 9;
     chbShowPreview.AutoSize = true;
     chbShowPreview.Location = new Point(0x1b, 170);
     chbShowPreview.TabIndex = 8;
     chbShowPreview.CheckedChanged += chbShowPreviewTooltip_CheckedChanged;
     btnAlternate_Default.Enabled = false;
     btnAlternate_Default.Location = new Point(0x191, 0x87);
     btnAlternate_Default.Size = new Size(100, 0x17);
     btnAlternate_Default.TabIndex = 7;
     btnAlternate_Default.Click += btnAlternateColor_Click;
     btnAlternateColor_Text.Enabled = false;
     btnAlternateColor_Text.Location = new Point(0x123, 0x87);
     btnAlternateColor_Text.Size = new Size(100, 0x17);
     btnAlternateColor_Text.TabIndex = 6;
     btnAlternateColor_Text.Click += btnAlternateColor_Click;
     btnAlternateColor.Enabled = false;
     btnAlternateColor.Location = new Point(0xb5, 0x87);
     btnAlternateColor.Size = new Size(100, 0x17);
     btnAlternateColor.TabIndex = 5;
     btnAlternateColor.Click += btnAlternateColor_Click;
     chbAlternateColor.AutoSize = true;
     chbAlternateColor.Location = new Point(0x1b, 0x70);
     chbAlternateColor.TabIndex = 4;
     chbAlternateColor.CheckedChanged += chbAlternateColor_CheckedChanged;
     chbGridLine.AutoSize = true;
     chbGridLine.Location = new Point(0x1b, 0x58);
     chbGridLine.TabIndex = 3;
     chbNoFulRowSelect.AutoSize = true;
     chbNoFulRowSelect.Location = new Point(0x1b, 0x40);
     chbNoFulRowSelect.TabIndex = 2;
     chbBSUpOneLvl.AutoSize = true;
     chbBSUpOneLvl.Location = new Point(0x1b, 40);
     chbBSUpOneLvl.TabIndex = 1;
     chbHideMenu.AutoSize = true;
     chbHideMenu.Location = new Point(0x1b, 0x10);
     chbHideMenu.TabIndex = 0;
     chbForceSysListView.AutoSize = true;
     chbForceSysListView.Location = new Point(240, 16);
     chbForceSysListView.TabIndex = 0;
     chbAlwaysShowHeader.AutoSize = true;
     chbAlwaysShowHeader.Location = new Point(240, 40);
     chbAlwaysShowHeader.TabIndex = 0;
     tabPage7_Plug.Controls.Add(btnBrowsePlugin);
     tabPage7_Plug.Controls.Add(pluginView);
     tabPage7_Plug.Controls.Add(lblPluginLang);
     tabPage7_Plug.Controls.Add(textBoxPluginLang);
     tabPage7_Plug.Controls.Add(btnBrowsePluginLang);
     tabPage7_Plug.Location = new Point(4, 0x16);
     tabPage7_Plug.Padding = new Padding(3);
     tabPage7_Plug.Size = new Size(0x1ff, 0x1d7);
     tabPage7_Plug.TabIndex = 2;
     tabPage7_Plug.UseVisualStyleBackColor = true;
     btnBrowsePlugin.AutoSize = true;
     btnBrowsePlugin.Location = new Point(5, 0x10);
     btnBrowsePlugin.TabIndex = 0;
     btnBrowsePlugin.UseVisualStyleBackColor = true;
     btnBrowsePlugin.Click += btnBrowsePlugin_Click;
     pluginView.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
     pluginView.ColumnCount = 1;
     pluginView.ColumnStyles.Add(new ColumnStyle());
     pluginView.Location = new Point(5, 0x2d);
     pluginView.Size = new Size(0x1ed, 0x156);
     pluginView.TabIndex = 1;
     lblPluginLang.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
     lblPluginLang.AutoSize = true;
     lblPluginLang.Location = new Point(0x1b, 0x194);
     textBoxPluginLang.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom;
     textBoxPluginLang.Location = new Point(0x2d, 0x1ac);
     textBoxPluginLang.Size = new Size(0x174, 0x15);
     textBoxPluginLang.MaxLength = 260;
     textBoxPluginLang.TabIndex = 2;
     textBoxPluginLang.KeyPress += textBoxesPath_KeyPress;
     btnBrowsePluginLang.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
     btnBrowsePluginLang.Location = new Point(0x1a7, 0x1a9);
     btnBrowsePluginLang.Size = new Size(0x22, 0x19);
     btnBrowsePluginLang.TabIndex = 3;
     btnBrowsePluginLang.Text = "...";
     btnBrowsePluginLang.Click += btnBrowsePluginLang_Click;
     tabPage8_Keys.Controls.Add(btnCopyKeys);
     tabPage8_Keys.Controls.Add(listViewKeyboard);
     tabPage8_Keys.Location = new Point(4, 0x16);
     tabPage8_Keys.Padding = new Padding(3);
     tabPage8_Keys.Size = new Size(0x1ff, 0x1d7);
     tabPage8_Keys.TabIndex = 2;
     tabPage8_Keys.UseVisualStyleBackColor = true;
     btnCopyKeys.Anchor = AnchorStyles.Left | AnchorStyles.Top;
     btnCopyKeys.Location = new Point(5, 0x10);
     btnCopyKeys.AutoSize = true;
     btnCopyKeys.TabIndex = 0;
     btnCopyKeys.UseVisualStyleBackColor = true;
     btnCopyKeys.Click += btnCopyKeys_Click;
     listViewKeyboard.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
     listViewKeyboard.CheckBoxes = true;
     listViewKeyboard.Columns.AddRange(new ColumnHeader[] { clmKeys_Action, clmKeys_Key });
     listViewKeyboard.FullRowSelect = true;
     listViewKeyboard.GridLines = true;
     listViewKeyboard.HeaderStyle = ColumnHeaderStyle.Nonclickable;
     listViewKeyboard.Location = new Point(5, 0x2d);
     listViewKeyboard.MultiSelect = false;
     listViewKeyboard.Size = new Size(0x1ed, 0x191);
     listViewKeyboard.ShowItemToolTips = true;
     listViewKeyboard.TabIndex = 1;
     listViewKeyboard.UseCompatibleStateImageBehavior = false;
     listViewKeyboard.View = View.Details;
     listViewKeyboard.PreviewKeyDown += listViewKeyboard_PreviewKeyDown;
     listViewKeyboard.KeyPress += listViewKeyboard_KeyPress;
     clmKeys_Action.Text = "Action";
     clmKeys_Action.Width = 0x15c;
     clmKeys_Key.Text = "Key";
     clmKeys_Key.TextAlign = HorizontalAlignment.Center;
     clmKeys_Key.Width = 120;
     tabPageA_Path.Controls.Add(listView_NoCapture);
     tabPageA_Path.Controls.Add(btnOFD_NoCapture);
     tabPageA_Path.Controls.Add(btnAdd_NoCapture);
     tabPageA_Path.Controls.Add(btnRemove_NoCapture);
     tabPageA_Path.Controls.Add(cmbSpclFol_NoCapture);
     tabPageA_Path.Controls.Add(btnAddSpcFol_NoCapture);
     tabPageA_Path.Location = new Point(4, 0x16);
     tabPageA_Path.Padding = new Padding(3);
     tabPageA_Path.Size = new Size(0x1ff, 0x1d7);
     tabPageA_Path.TabIndex = 2;
     tabPageA_Path.UseVisualStyleBackColor = true;
     listView_NoCapture.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
     listView_NoCapture.Columns.AddRange(new ColumnHeader[] { clmnHeader_NoCapture });
     listView_NoCapture.HeaderStyle = ColumnHeaderStyle.Nonclickable;
     listView_NoCapture.HideSelection = false;
     listView_NoCapture.LabelEdit = true;
     listView_NoCapture.Location = new Point(5, 0x2d);
     listView_NoCapture.Size = new Size(0x1ed, 0xa3);
     listView_NoCapture.FullRowSelect = true;
     listView_NoCapture.TabIndex = 8;
     listView_NoCapture.UseCompatibleStateImageBehavior = false;
     listView_NoCapture.View = View.Details;
     listView_NoCapture.ItemActivate += listView_NoCapture_ItemActivate;
     listView_NoCapture.SelectedIndexChanged += listView_NoCapture_SelectedIndexChanged;
     listView_NoCapture.KeyDown += listView_NoCapture_KeyDown;
     listView_NoCapture.BeforeLabelEdit += listView_NoCapture_BeforeLabelEdit;
     listView_NoCapture.AfterLabelEdit += listView_NoCapture_AfterLabelEdit;
     clmnHeader_NoCapture.Width = 0x1d8;
     btnOFD_NoCapture.Anchor = AnchorStyles.Right | AnchorStyles.Top;
     btnOFD_NoCapture.Location = new Point(0x19b, 0x10);
     btnOFD_NoCapture.Size = new Size(0x19, 0x17);
     btnOFD_NoCapture.TabIndex = 0;
     btnOFD_NoCapture.Text = "...";
     btnOFD_NoCapture.UseVisualStyleBackColor = true;
     btnOFD_NoCapture.Click += btnOFD_NoCapture_Click;
     btnAdd_NoCapture.Anchor = AnchorStyles.Right | AnchorStyles.Top;
     btnAdd_NoCapture.Location = new Point(0x1ba, 0x10);
     btnAdd_NoCapture.Size = new Size(0x19, 0x17);
     btnAdd_NoCapture.TabIndex = 1;
     btnAdd_NoCapture.Text = "+";
     btnAdd_NoCapture.UseVisualStyleBackColor = true;
     btnAdd_NoCapture.Click += btnAdd_NoCapture_Click;
     btnRemove_NoCapture.Anchor = AnchorStyles.Right | AnchorStyles.Top;
     btnRemove_NoCapture.Enabled = false;
     btnRemove_NoCapture.Location = new Point(0x1d9, 0x10);
     btnRemove_NoCapture.Size = new Size(0x19, 0x17);
     btnRemove_NoCapture.TabIndex = 2;
     btnRemove_NoCapture.Text = "-";
     btnRemove_NoCapture.UseVisualStyleBackColor = true;
     btnRemove_NoCapture.Click += btnRemove_NoCapture_Click;
     cmbSpclFol_NoCapture.Anchor = AnchorStyles.Left | AnchorStyles.Top;
     cmbSpclFol_NoCapture.DropDownStyle = ComboBoxStyle.DropDownList;
     cmbSpclFol_NoCapture.Location = new Point(5, 0xd4);
     cmbSpclFol_NoCapture.Size = new Size(150, 0x15);
     cmbSpclFol_NoCapture.TabIndex = 3;
     btnAddSpcFol_NoCapture.Anchor = AnchorStyles.Left | AnchorStyles.Top;
     btnAddSpcFol_NoCapture.Location = new Point(0x9e, 0xd3);
     btnAddSpcFol_NoCapture.Size = new Size(0x19, 0x17);
     btnAddSpcFol_NoCapture.Text = "+";
     btnAddSpcFol_NoCapture.TabIndex = 4;
     btnAddSpcFol_NoCapture.Click += btnAddSpcFol_NoCapture_Click;
     AutoScaleDimensions = new SizeF(6f, 13f);
     AutoScaleMode = AutoScaleMode.Font;
     ClientSize = new Size(0x211, 0x269);
     MinimumSize = new Size(0x221, 0x28e);
     Controls.Add(tabControl1);
     Controls.Add(lblVer);
     Controls.Add(btnOK);
     Controls.Add(btnCancel);
     Controls.Add(btnApply);
     MaximizeBox = false;
     ShowIcon = false;
     StartPosition = FormStartPosition.CenterParent;
     Text = "QTTabBar Options";
     FormClosing += OptionsDialog_FormClosing;
     tabControl1.ResumeLayout(false);
     tabPage1_Gnrl.ResumeLayout(false);
     tabPage1_Gnrl.PerformLayout();
     tabPage2_Tabs.ResumeLayout(false);
     tabPage2_Tabs.PerformLayout();
     tabPage3_Wndw.ResumeLayout(false);
     tabPage3_Wndw.PerformLayout();
     tabPage4_View.ResumeLayout(false);
     tabPage4_View.PerformLayout();
     tabPage5_Grps.ResumeLayout(false);
     tabPage5_Grps.PerformLayout();
     tabPage6_Apps.ResumeLayout(false);
     tabPage6_Apps.PerformLayout();
     tabPage7_Plug.ResumeLayout(false);
     tabPage7_Plug.PerformLayout();
     tabPage8_Keys.ResumeLayout(false);
     tabPage8_Keys.PerformLayout();
     tabPage9_Misc.ResumeLayout(false);
     tabPage9_Misc.PerformLayout();
     tabPageA_Path.ResumeLayout(false);
     tabPageA_Path.PerformLayout();
     nudMaxRecentFile.EndInit();
     nudMaxUndo.EndInit();
     nudNetworkTimeOut.EndInit();
     nudTabWidthMin.EndInit();
     nudTabWidthMax.EndInit();
     nudTabHeight.EndInit();
     nudTabWidth.EndInit();
     nudPreviewMaxHeight.EndInit();
     nudPreviewMaxWidth.EndInit();
     ResumeLayout(false);
     PerformLayout();
 }
        /// <summary>
        /// Constructor
        /// </summary>
        public TradeSettings()
        {
            PnlSettings = new FancyPanel();

            LblCloseAdvance = new Label();
            LblSlippageEntry = new Label();

            CbxLongLogicPrice = new ComboBox();
            ChbAutoSlippage = new CheckBox();
            NUDCloseAdvance = new NumericUpDown();
            NUDSlippageEntry = new NumericUpDown();
            NUDSlippageExit = new NumericUpDown();
            LblSlippageExit = new Label();
            LblLongLogicPrice = new Label();
            LblMinChartBars = new Label();
            NUDMinChartBars = new NumericUpDown();

            BtnDefault = new Button();
            BtnCancel = new Button();
            BtnAccept = new Button();

            MaximizeBox = false;
            MinimizeBox = false;
            ShowInTaskbar = false;
            Icon = Data.Icon;
            BackColor = LayoutColors.ColorFormBack;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            AcceptButton = BtnAccept;
            Text = Language.T("Trade Settings");

            // pnlAveraging
            PnlSettings.Parent = this;

            // ComboBox Long Logic Price
            CbxLongLogicPrice.Parent = PnlSettings;
            CbxLongLogicPrice.DropDownStyle = ComboBoxStyle.DropDownList;
            CbxLongLogicPrice.Items.AddRange(new object[] {"Bid", "Ask", "Chart"});
            CbxLongLogicPrice.Text = Configs.LongTradeLogicPrice;

            // Label close advance
            LblCloseAdvance.Parent = PnlSettings;
            LblCloseAdvance.ForeColor = LayoutColors.ColorControlText;
            LblCloseAdvance.BackColor = Color.Transparent;
            LblCloseAdvance.AutoSize = true;
            LblCloseAdvance.Text = Language.T("'Bar Closing' time advance in seconds");

            // Check Box Auto Slippage
            ChbAutoSlippage.Parent = PnlSettings;
            ChbAutoSlippage.ForeColor = LayoutColors.ColorControlText;
            ChbAutoSlippage.BackColor = Color.Transparent;
            ChbAutoSlippage.AutoSize = true;
            ChbAutoSlippage.Checked = Configs.AutoSlippage;
            ChbAutoSlippage.Text = Language.T("Auto slippage depending on the spread.");
            ChbAutoSlippage.CheckedChanged += ChbAutoSlippageCheckedChanged;

            // Label Entry slippage
            LblSlippageEntry.Parent = PnlSettings;
            LblSlippageEntry.ForeColor = LayoutColors.ColorControlText;
            LblSlippageEntry.BackColor = Color.Transparent;
            LblSlippageEntry.AutoSize = true;
            LblSlippageEntry.Text = Language.T("Slippage for entry orders");

            // Label Entry slippage
            LblSlippageExit.Parent = PnlSettings;
            LblSlippageExit.ForeColor = LayoutColors.ColorControlText;
            LblSlippageExit.BackColor = Color.Transparent;
            LblSlippageExit.AutoSize = true;
            LblSlippageExit.Text = Language.T("Slippage for exit orders");

            // NumericUpDown Entry Lots
            NUDCloseAdvance.Parent = PnlSettings;
            NUDCloseAdvance.BeginInit();
            NUDCloseAdvance.Minimum = 1;
            NUDCloseAdvance.Maximum = 15;
            NUDCloseAdvance.Increment = 1;
            NUDCloseAdvance.Value = Configs.BarCloseAdvance;
            NUDCloseAdvance.DecimalPlaces = 0;
            NUDCloseAdvance.TextAlign = HorizontalAlignment.Center;
            NUDCloseAdvance.EndInit();

            // Label lblLongLogicPrice
            LblLongLogicPrice.Parent = PnlSettings;
            LblLongLogicPrice.ForeColor = LayoutColors.ColorControlText;
            LblLongLogicPrice.BackColor = Color.Transparent;
            LblLongLogicPrice.AutoSize = true;
            LblLongLogicPrice.Text = Language.T("Long logic rules base price");

            // NUD Entry slippage
            NUDSlippageEntry.Parent = PnlSettings;
            NUDSlippageEntry.BeginInit();
            NUDSlippageEntry.Minimum = 0;
            NUDSlippageEntry.Maximum = 1000;
            NUDSlippageEntry.Increment = 1;
            NUDSlippageEntry.Value = Configs.SlippageEntry;
            NUDSlippageEntry.DecimalPlaces = 0;
            NUDSlippageEntry.TextAlign = HorizontalAlignment.Center;
            NUDSlippageEntry.Enabled = !Configs.AutoSlippage;
            NUDSlippageEntry.EndInit();

            // NUD Exit slippage
            NUDSlippageExit.Parent = PnlSettings;
            NUDSlippageExit.BeginInit();
            NUDSlippageExit.Minimum = 0;
            NUDSlippageExit.Maximum = 1000;
            NUDSlippageExit.Increment = 1;
            NUDSlippageExit.Value = Configs.SlippageExit;
            NUDSlippageExit.DecimalPlaces = 0;
            NUDSlippageExit.TextAlign = HorizontalAlignment.Center;
            NUDSlippageExit.Enabled = !Configs.AutoSlippage;
            NUDSlippageExit.EndInit();

            // Label lblMinChartBars
            LblMinChartBars.Parent = PnlSettings;
            LblMinChartBars.ForeColor = LayoutColors.ColorControlText;
            LblMinChartBars.BackColor = Color.Transparent;
            LblMinChartBars.AutoSize = true;
            LblMinChartBars.Text = Language.T("Minimum number of bars in the chart");

            // NUD Exit slippage
            NUDMinChartBars.Parent = PnlSettings;
            NUDMinChartBars.BeginInit();
            NUDMinChartBars.Minimum = 300;
            NUDMinChartBars.Maximum = 10000;
            NUDMinChartBars.Increment = 1;
            NUDMinChartBars.Value = Configs.MinChartBars;
            NUDMinChartBars.DecimalPlaces = 0;
            NUDMinChartBars.TextAlign = HorizontalAlignment.Center;
            NUDMinChartBars.EndInit();

            //Button Default
            BtnDefault.Parent = this;
            BtnDefault.Name = "Default";
            BtnDefault.Text = Language.T("Default");
            BtnDefault.Click += BtnDefaultClick;
            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.Click += BtnAcceptClick;
            BtnAccept.DialogResult = DialogResult.OK;
            BtnAccept.UseVisualStyleBackColor = true;
        }
        /// <summary>
        ///     Constructor
        /// </summary>
        public AccountSettings()
        {
            PnlBase = new FancyPanel();

            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();

            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 object[] {"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 object[]
                {"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 += BtnDefaultClick;
            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;
        }
        public void SetCriteriaPanel()
        {
            chbAmbiguousBars = new CheckBox
                {
                    Parent = this,
                    ForeColor = ForeColor,
                    BackColor = Color.Transparent,
                    Text = Language.T("Maximum number of ambiguous bars"),
                    Checked = true,
                    AutoSize = true
                };

            nudAmbiguousBars = new NumericUpDown {Parent = this, TextAlign = HorizontalAlignment.Center};
            nudAmbiguousBars.BeginInit();
            nudAmbiguousBars.Minimum = 0;
            nudAmbiguousBars.Maximum = 100;
            nudAmbiguousBars.Increment = 1;
            nudAmbiguousBars.Value = 10;
            nudAmbiguousBars.EndInit();

            chbMinProfitPerDay = new CheckBox
                {
                    Parent = this,
                    ForeColor = ForeColor,
                    BackColor = Color.Transparent,
                    Text = Language.T("Minimum Profit Per Day") + " [" + Configs.AccountCurrency + "]",
                    Checked = true,
                    AutoSize = true
                };

            nudMinProfitPerDay = new NumericUpDown {Parent = this, TextAlign = HorizontalAlignment.Center};
            nudMinProfitPerDay.BeginInit();
            nudMinProfitPerDay.Minimum = 1;
            nudMinProfitPerDay.Maximum = 500;
            nudMinProfitPerDay.Increment = 1;
            nudMinProfitPerDay.Value = 1;
            nudMinProfitPerDay.EndInit();

            chbMaxDrawdown = new CheckBox
                {
                    Parent = this,
                    ForeColor = ForeColor,
                    BackColor = Color.Transparent,
                    Text = Language.T("Maximum equity drawdown") + " [" +
                           (Configs.AccountInMoney ? Configs.AccountCurrency + "]" : Language.T("points") + "]"),
                    Checked = false,
                    AutoSize = true
                };

            nudMaxDrawdown = new NumericUpDown {Parent = this, TextAlign = HorizontalAlignment.Center};
            nudMaxDrawdown.BeginInit();
            nudMaxDrawdown.Minimum = 0;
            nudMaxDrawdown.Maximum = Configs.InitialAccount;
            nudMaxDrawdown.Increment = 10;
            nudMaxDrawdown.Value = (decimal) Math.Round(Configs.InitialAccount/4.0);
            nudMaxDrawdown.EndInit();

            chbEquityPercent = new CheckBox
                {
                    Parent = this,
                    ForeColor = ForeColor,
                    BackColor = Color.Transparent,
                    Text =
                        Language.T("Maximum equity drawdown") + " [% " + Configs.AccountCurrency +
                        "]",
                    Checked = true,
                    AutoSize = true
                };

            nudEquityPercent = new NumericUpDown {Parent = this, TextAlign = HorizontalAlignment.Center};
            nudEquityPercent.BeginInit();
            nudEquityPercent.Minimum = 1;
            nudEquityPercent.Maximum = 100;
            nudEquityPercent.Increment = 1;
            nudEquityPercent.Value = 25;
            nudEquityPercent.EndInit();

            chbMinTrades = new CheckBox
                {
                    Parent = this,
                    ForeColor = ForeColor,
                    BackColor = Color.Transparent,
                    Text = Language.T("Minimum number of trades"),
                    Checked = true,
                    AutoSize = true
                };

            nudMinTrades = new NumericUpDown {Parent = this, TextAlign = HorizontalAlignment.Center};
            nudMinTrades.BeginInit();
            nudMinTrades.Minimum = 10;
            nudMinTrades.Maximum = 1000;
            nudMinTrades.Increment = 10;
            nudMinTrades.Value = 100;
            nudMinTrades.EndInit();

            chbMaxTrades = new CheckBox
                {
                    Parent = this,
                    ForeColor = ForeColor,
                    BackColor = Color.Transparent,
                    Text = Language.T("Maximum number of trades"),
                    Checked = false,
                    AutoSize = true
                };

            nudMaxTrades = new NumericUpDown {Parent = this, TextAlign = HorizontalAlignment.Center};
            nudMaxTrades.BeginInit();
            nudMaxTrades.Minimum = 10;
            nudMaxTrades.Maximum = 10000;
            nudMaxTrades.Increment = 10;
            nudMaxTrades.Value = 1000;
            nudMaxTrades.EndInit();

            chbWinLossRatio = new CheckBox
                {
                    Parent = this,
                    ForeColor = ForeColor,
                    BackColor = Color.Transparent,
                    Text = Language.T("Minimum win / loss trades ratio"),
                    Checked = false,
                    AutoSize = true
                };

            nudWinLossRatio = new NumericUpDown {Parent = this, TextAlign = HorizontalAlignment.Center};
            nudWinLossRatio.BeginInit();
            nudWinLossRatio.Minimum = 0.10M;
            nudWinLossRatio.Maximum = 1;
            nudWinLossRatio.Increment = 0.01M;
            nudWinLossRatio.Value = 0.30M;
            nudWinLossRatio.DecimalPlaces = 2;
            nudWinLossRatio.EndInit();

            chbMinSharpeRatio = new CheckBox
                {
                    Parent = this,
                    ForeColor = ForeColor,
                    BackColor = Color.Transparent,
                    Text = Language.T("Minimum Sharpe ratio"),
                    Checked = false,
                    AutoSize = true
                };

            nudMinSharpeRatio = new NumericUpDown {Parent = this, TextAlign = HorizontalAlignment.Center};
            nudMinSharpeRatio.BeginInit();
            nudMinSharpeRatio.Minimum = 0.1M;
            nudMinSharpeRatio.Maximum = 10.0M;
            nudMinSharpeRatio.Increment = 0.1M;
            nudMinSharpeRatio.Value = 0.2M;
            nudMinSharpeRatio.DecimalPlaces = 1;
            nudMinSharpeRatio.EndInit();

            chbMaxConsecLosses = new CheckBox
                {
                    Parent = this,
                    ForeColor = ForeColor,
                    BackColor = Color.Transparent,
                    Text = Language.T("Max consecutive losses"),
                    Checked = false,
                    AutoSize = true
                };

            nudMaxConsecLosses = new NumericUpDown {Parent = this, TextAlign = HorizontalAlignment.Center};
            nudMaxConsecLosses.BeginInit();
            nudMaxConsecLosses.Minimum = 1;
            nudMaxConsecLosses.Maximum = 100;
            nudMaxConsecLosses.Increment = 1;
            nudMaxConsecLosses.Value = 5;
            nudMaxConsecLosses.EndInit();

            chbMaxRedGreenDeviation = new CheckBox
                {
                    Parent = this,
                    ForeColor = ForeColor,
                    BackColor = Color.Transparent,
                    Text = Language.T("Max long/short balance deviation"),
                    Checked = false,
                    AutoSize = true
                };

            nudMaxRedGreenDeviation = new NumericUpDown {Parent = this, TextAlign = HorizontalAlignment.Center};
            nudMaxRedGreenDeviation.BeginInit();
            nudMaxRedGreenDeviation.Minimum = 1;
            nudMaxRedGreenDeviation.Maximum = 100;
            nudMaxRedGreenDeviation.Value = 40;
            nudMaxRedGreenDeviation.EndInit();
            toolTip.SetToolTip(nudMaxRedGreenDeviation, Language.T("Deviation percent."));

            chbOOSPatternFilter = new CheckBox
                {
                    Parent = this,
                    ForeColor = ForeColor,
                    BackColor = Color.Transparent,
                    Text = Language.T("Filter bad OOS performance"),
                    Checked = false,
                    AutoSize = true
                };

            nudoosPatternPercent = new NumericUpDown
                {
                    Parent = this,
                    TextAlign = HorizontalAlignment.Center
                };
            nudoosPatternPercent.BeginInit();
            nudoosPatternPercent.Minimum = 1;
            nudoosPatternPercent.Maximum = 50;
            nudoosPatternPercent.Value = 20;
            nudoosPatternPercent.EndInit();
            toolTip.SetToolTip(nudoosPatternPercent, Language.T("Deviation percent."));

            chbSmoothBalanceLines = new CheckBox
                {
                    Parent = this,
                    ForeColor = ForeColor,
                    BackColor = Color.Transparent,
                    Text = Language.T("Filter non-linear balance pattern"),
                    Checked = false,
                    AutoSize = true
                };

            nudSmoothBalancePercent = new NumericUpDown
                {
                    Parent = this,
                    TextAlign = HorizontalAlignment.Center
                };
            nudSmoothBalancePercent.BeginInit();
            nudSmoothBalancePercent.Minimum = 1;
            nudSmoothBalancePercent.Maximum = 50;
            nudSmoothBalancePercent.Value = 20;
            nudSmoothBalancePercent.EndInit();
            toolTip.SetToolTip(nudSmoothBalancePercent, Language.T("Deviation percent."));

            nudSmoothBalanceCheckPoints = new NumericUpDown
                {
                    Parent = this,
                    TextAlign = HorizontalAlignment.Center
                };
            nudSmoothBalanceCheckPoints.BeginInit();
            nudSmoothBalanceCheckPoints.Minimum = 1;
            nudSmoothBalanceCheckPoints.Maximum = 50;
            nudSmoothBalanceCheckPoints.Value = 1;
            nudSmoothBalanceCheckPoints.EndInit();
            toolTip.SetToolTip(nudSmoothBalanceCheckPoints, Language.T("Check points count."));

            Resize += CriteriaControls_Resize;
        }
        /// <summary>
        /// Sets controls in panel Limitations
        /// </summary>
        void SetPanelLimitations()
        {
            btnShowSettings.Parent                  = pnlLimitations;
            btnShowSettings.BackgroundImage         = Properties.Resources.toggle_journal;
            btnShowSettings.BackgroundImageLayout   = ImageLayout.Center;
            btnShowSettings.Cursor                  = Cursors.Arrow;
            btnShowSettings.TabIndex                = 0;
            btnShowSettings.UseVisualStyleBackColor = true;
            btnShowSettings.Click                  += new EventHandler(BtnShowParams_Click);
            toolTip.SetToolTip(btnShowSettings, Language.T("Parameters"));

            chbAmbiguousBars = new CheckBox();
            chbAmbiguousBars.Parent    = pnlLimitations;
            chbAmbiguousBars.ForeColor = colorText;
            chbAmbiguousBars.BackColor = Color.Transparent;
            chbAmbiguousBars.Text      = Language.T("Maximum number of ambiguous bars");
            chbAmbiguousBars.Checked   = false;
            chbAmbiguousBars.AutoSize  = true;

            nudAmbiguousBars = new NumericUpDown();
            nudAmbiguousBars.Parent    = pnlLimitations;
            nudAmbiguousBars.TextAlign = HorizontalAlignment.Center;
            nudAmbiguousBars.BeginInit();
            nudAmbiguousBars.Minimum   = 0;
            nudAmbiguousBars.Maximum   = 100;
            nudAmbiguousBars.Increment = 1;
            nudAmbiguousBars.Value     = 10;
            nudAmbiguousBars.EndInit();

            chbMaxDrawdown = new CheckBox();
            chbMaxDrawdown.Parent    = pnlLimitations;
            chbMaxDrawdown.ForeColor = colorText;
            chbMaxDrawdown.BackColor = Color.Transparent;
            chbMaxDrawdown.Checked   = false;
            chbMaxDrawdown.Text      = Language.T("Maximum equity drawdown") + " [" + (Configs.AccountInMoney ? Configs.AccountCurrency + "]" : Language.T("pips") + "]");
            chbMaxDrawdown.AutoSize  = true;

            nudMaxDrawdown = new NumericUpDown();
            nudMaxDrawdown.Parent    = pnlLimitations;
            nudMaxDrawdown.TextAlign = HorizontalAlignment.Center;
            nudMaxDrawdown.BeginInit();
            nudMaxDrawdown.Minimum   = 0;
            nudMaxDrawdown.Maximum   = Configs.InitialAccount;
            nudMaxDrawdown.Increment = 10;
            nudMaxDrawdown.Value     = Configs.InitialAccount / 4;
            nudMaxDrawdown.EndInit();

            chbEquityPercent = new CheckBox();
            chbEquityPercent.Parent    = pnlLimitations;
            chbEquityPercent.ForeColor = colorText;
            chbEquityPercent.BackColor = Color.Transparent;
            chbEquityPercent.Text      = Language.T("Maximum equity drawdown") + " [%]";
            chbEquityPercent.Checked   = false;
            chbEquityPercent.AutoSize  = true;

            nudEquityPercent = new NumericUpDown();
            nudEquityPercent.Parent    = pnlLimitations;
            nudEquityPercent.TextAlign = HorizontalAlignment.Center;
            nudEquityPercent.BeginInit();
            nudEquityPercent.Minimum   = 1;
            nudEquityPercent.Maximum   = 100;
            nudEquityPercent.Increment = 1;
            nudEquityPercent.Value     = 25;
            nudEquityPercent.EndInit();

            chbMinTrades = new CheckBox();
            chbMinTrades.Parent    = pnlLimitations;
            chbMinTrades.ForeColor = colorText;
            chbMinTrades.BackColor = Color.Transparent;
            chbMinTrades.Text      = Language.T("Minimum number of trades");
            chbMinTrades.Checked   = true;
            chbMinTrades.AutoSize  = true;

            nudMinTrades = new NumericUpDown();
            nudMinTrades.Parent    = pnlLimitations;
            nudMinTrades.TextAlign = HorizontalAlignment.Center;
            nudMinTrades.BeginInit();
            nudMinTrades.Minimum   = 10;
            nudMinTrades.Maximum   = 1000;
            nudMinTrades.Increment = 10;
            nudMinTrades.Value     = 100;
            nudMinTrades.EndInit();

            chbMaxTrades = new CheckBox();
            chbMaxTrades.Parent    = pnlLimitations;
            chbMaxTrades.ForeColor = colorText;
            chbMaxTrades.BackColor = Color.Transparent;
            chbMaxTrades.Text      = Language.T("Maximum number of trades");
            chbMaxTrades.Checked   = false;
            chbMaxTrades.AutoSize  = true;

            nudMaxTrades = new NumericUpDown();
            nudMaxTrades.Parent    = pnlLimitations;
            nudMaxTrades.TextAlign = HorizontalAlignment.Center;
            nudMaxTrades.BeginInit();
            nudMaxTrades.Minimum   = 10;
            nudMaxTrades.Maximum   = 10000;
            nudMaxTrades.Increment = 10;
            nudMaxTrades.Value     = 1000;
            nudMaxTrades.EndInit();

            chbWinLossRatio = new CheckBox();
            chbWinLossRatio.Parent    = pnlLimitations;
            chbWinLossRatio.ForeColor = colorText;
            chbWinLossRatio.BackColor = Color.Transparent;
            chbWinLossRatio.Text      = Language.T("Minimum win / loss trades ratio");
            chbWinLossRatio.Checked   = false;
            chbWinLossRatio.AutoSize  = true;

            nudWinLossRatio = new NumericUpDown();
            nudWinLossRatio.Parent    = pnlLimitations;
            nudWinLossRatio.TextAlign = HorizontalAlignment.Center;
            nudWinLossRatio.BeginInit();
            nudWinLossRatio.Minimum       = 0.10M;
            nudWinLossRatio.Maximum       = 1;
            nudWinLossRatio.Increment     = 0.01M;
            nudWinLossRatio.Value         = 0.30M;
            nudWinLossRatio.DecimalPlaces = 2;
            nudWinLossRatio.EndInit();

            return;
        }
Exemple #31
0
 /// <summary>
 ///		Required method for Designer support - do not modify
 ///		the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components       = new System.ComponentModel.Container();
     this.label1           = new System.Windows.Forms.Label();
     this.label2           = new System.Windows.Forms.Label();
     this.numericUpDown    = new System.Windows.Forms.NumericUpDown();
     this.domainUpDown     = new System.Windows.Forms.DomainUpDown();
     this.btnGetSelections = new System.Windows.Forms.Button();
     this.lblCurrSel       = new System.Windows.Forms.Label();
     numericUpDown.BeginInit();
     //@this.TrayHeight = 0;
     //@this.TrayLargeIcon = false;
     //@this.TrayAutoArrange = true;
     label1.Location                   = new System.Drawing.Point(8, 24);
     label1.Text                       = "Domain UpDown Control";
     label1.Size                       = new System.Drawing.Size(224, 32);
     label1.Font                       = new System.Drawing.Font("Verdana", 12);
     label1.TabIndex                   = 2;
     label2.Location                   = new System.Drawing.Point(8, 80);
     label2.Text                       = "Numeric UpDown Control";
     label2.Size                       = new System.Drawing.Size(232, 32);
     label2.Font                       = new System.Drawing.Font("Verdana", 12);
     label2.TabIndex                   = 3;
     numericUpDown.Location            = new System.Drawing.Point(264, 80);
     numericUpDown.Maximum             = new decimal(5000);
     numericUpDown.Size                = new System.Drawing.Size(168, 20);
     numericUpDown.ThousandsSeparator  = true;
     numericUpDown.TabIndex            = 1;
     numericUpDown.UpDownAlign         = System.Windows.Forms.LeftRightAlignment.Left;
     numericUpDown.ValueChanged       += new System.EventHandler(this.numericUpDown_ValueChanged);
     domainUpDown.Location             = new System.Drawing.Point(264, 24);
     domainUpDown.Text                 = "domainUpDown1";
     domainUpDown.Size                 = new System.Drawing.Size(168, 20);
     domainUpDown.TabIndex             = 0;
     domainUpDown.Sorted               = true;
     domainUpDown.Wrap                 = true;
     domainUpDown.SelectedItemChanged += new System.EventHandler(this.domainUpDown_SelectedItemChanged);
     domainUpDown.Items.AddRange(new object[4] {
         "Another Boring String named B", "Boring String A", "BORING String C", "Final Boring string (D)"
     });
     btnGetSelections.Location = new System.Drawing.Point(16, 136);
     btnGetSelections.Size     = new System.Drawing.Size(136, 24);
     btnGetSelections.TabIndex = 4;
     btnGetSelections.Text     = "Get Current Selections";
     btnGetSelections.Click   += new System.EventHandler(this.btnGetSelections_Click);
     lblCurrSel.Location       = new System.Drawing.Point(176, 120);
     lblCurrSel.Size           = new System.Drawing.Size(256, 48);
     lblCurrSel.BorderStyle    = System.Windows.Forms.BorderStyle.FixedSingle;
     lblCurrSel.TabIndex       = 5;
     lblCurrSel.BackColor      = System.Drawing.Color.Linen;
     this.Text = "Spin Controls";
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(448, 181);
     this.Controls.Add(this.lblCurrSel);
     this.Controls.Add(this.btnGetSelections);
     this.Controls.Add(this.label2);
     this.Controls.Add(this.label1);
     this.Controls.Add(this.numericUpDown);
     this.Controls.Add(this.domainUpDown);
     numericUpDown.EndInit();
 }