Forex_Strategy_Builder.Dialogs.Generator.Generator.BtnSlotSize_Click C# (CSharp) Method

BtnSlotSize_Click() protected method

Changes the slot size
protected BtnSlotSize_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        protected virtual void BtnSlotSize_Click(object sender, EventArgs e)
        {
            int iTag = (int)((ToolStripButton)sender).Tag;

            if (iTag == 1)
            {
                if (strategyLayout.SlotMinMidMax == SlotSizeMinMidMax.min ||
                    strategyLayout.SlotMinMidMax == SlotSizeMinMidMax.mid)
                {
                    tsbtStrategySize1.Image       = Properties.Resources.slot_size_mid;
                    tsbtStrategySize1.ToolTipText = Language.T("Show regular info in the slots.");
                    tsbtStrategySize2.Image       = Properties.Resources.slot_size_min;
                    tsbtStrategySize2.ToolTipText = Language.T("Show minimum info in the slots.");
                    strategyLayout.SlotMinMidMax  = SlotSizeMinMidMax.max;
                }
                else if (strategyLayout.SlotMinMidMax == SlotSizeMinMidMax.max)
                {
                    tsbtStrategySize1.Image       = Properties.Resources.slot_size_max;
                    tsbtStrategySize1.ToolTipText = Language.T("Show detailed info in the slots.");
                    tsbtStrategySize2.Image       = Properties.Resources.slot_size_min;
                    tsbtStrategySize2.ToolTipText = Language.T("Show minimum info in the slots.");
                    strategyLayout.SlotMinMidMax  = SlotSizeMinMidMax.mid;
                }
            }
            else
            {
                if (strategyLayout.SlotMinMidMax == SlotSizeMinMidMax.min)
                {
                    tsbtStrategySize1.Image       = Properties.Resources.slot_size_max;
                    tsbtStrategySize1.ToolTipText = Language.T("Show detailed info in the slots.");
                    tsbtStrategySize2.Image       = Properties.Resources.slot_size_min;
                    tsbtStrategySize2.ToolTipText = Language.T("Show minimum info in the slots.");
                    strategyLayout.SlotMinMidMax  = SlotSizeMinMidMax.mid;
                }
                else if (strategyLayout.SlotMinMidMax == SlotSizeMinMidMax.mid ||
                         strategyLayout.SlotMinMidMax == SlotSizeMinMidMax.max)
                {
                    tsbtStrategySize1.Image       = Properties.Resources.slot_size_max;
                    tsbtStrategySize1.ToolTipText = Language.T("Show detailed info in the slots.");
                    tsbtStrategySize2.Image       = Properties.Resources.slot_size_mid;
                    tsbtStrategySize2.ToolTipText = Language.T("Show regular info in the slots.");
                    strategyLayout.SlotMinMidMax  = SlotSizeMinMidMax.min;
                }
            }

            strategyLayout.RearangeStrategyControls();
        }