Forex_Strategy_Builder.Dialogs.Generator.IndicatorsLayout.ArrangeIndicatorsSlots C# (CSharp) Метод

ArrangeIndicatorsSlots() приватный Метод

Arranges the indicators in the layout.
private ArrangeIndicatorsSlots ( ) : void
Результат void
        void ArrangeIndicatorsSlots()
        {
            List<string> currentIndicators = new List<string>();
            if (currentSlotType == SlotTypes.Open)
                currentIndicators = Indicator_Store.OpenPointIndicators;
            else if (currentSlotType == SlotTypes.OpenFilter)
                currentIndicators = Indicator_Store.OpenFilterIndicators;
            else if (currentSlotType == SlotTypes.Close)
                currentIndicators = Indicator_Store.ClosePointIndicators;
            else if (currentSlotType == SlotTypes.CloseFilter)
                currentIndicators = Indicator_Store.CloseFilterIndicators;

            flowLayoutIndicators.SuspendLayout();
            flowLayoutIndicators.Controls.Clear();
            flowLayoutIndicators.Height = 0;
            foreach (string indicatorName in currentIndicators)
            {
                CheckBox chbxIndicator = new CheckBox();
                chbxIndicator.AutoSize = true;
                chbxIndicator.Checked  = true;
                if (currentSlotType == SlotTypes.Open)
                    chbxIndicator.Checked = !bannedEntryIndicators.Contains(indicatorName);
                else if (currentSlotType == SlotTypes.OpenFilter)
                    chbxIndicator.Checked = !bannedEntryFilterIndicators.Contains(indicatorName);
                else if (currentSlotType == SlotTypes.Close)
                    chbxIndicator.Checked = !bannedExitIndicators.Contains(indicatorName);
                else if (currentSlotType == SlotTypes.CloseFilter)
                    chbxIndicator.Checked = !bannedExitFilterIndicators.Contains(indicatorName);
                chbxIndicator.Margin  = new Padding(margin, margin, 0, 0);
                chbxIndicator.Text    = indicatorName;
                chbxIndicator.Enabled = !isBlocked;
                chbxIndicator.CheckedChanged += new EventHandler(ChbxIndicator_CheckedChanged);
                flowLayoutIndicators.Controls.Add(chbxIndicator);
            }
            flowLayoutIndicators.ResumeLayout();
        }