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

PnlSlot_Click() private method

Lock, link, or unlock the strategy slot.
private PnlSlot_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        void PnlSlot_Click(object sender, EventArgs e)
        {
            if (isGenerating)
                return;

            int slot = (int)((Panel)sender).Tag;

            if (strategyBest.Slot[slot].SlotStatus == StrategySlotStatus.Open)
                strategyBest.Slot[slot].SlotStatus = StrategySlotStatus.Locked;
            else if (strategyBest.Slot[slot].SlotStatus == StrategySlotStatus.Locked)
                strategyBest.Slot[slot].SlotStatus = StrategySlotStatus.Linked;
            else if (strategyBest.Slot[slot].SlotStatus == StrategySlotStatus.Linked)
                strategyBest.Slot[slot].SlotStatus = StrategySlotStatus.Open;

            strategyLayout.RepaintStrategyControls(strategyBest);

            return;
        }