Forex_Strategy_Builder.Actions.EditSlot C# (CSharp) Method

EditSlot() private method

Edits the Strategy Slot
private EditSlot ( int slot ) : void
slot int
return void
        void EditSlot(int slot)
        {
            Data.IsStrategyReady = false;

            SlotTypes slotType = Data.Strategy.Slot[slot].SlotType;
            bool isSlotExist = Data.Strategy.Slot[slot].IsDefined;
            if (isSlotExist)
                Data.StackStrategy.Push(Data.Strategy.Clone());

            Indicator_Dialog indicatorDialog = new Indicator_Dialog(slot, slotType, isSlotExist);
            indicatorDialog.ShowDialog();

            if (indicatorDialog.DialogResult == DialogResult.OK)
            {
                this.Text = Path.GetFileNameWithoutExtension(Data.StrategyName) + "* - " + Data.ProgramName;
                Data.IsStrategyChanged = true;
                smallIndicatorChart.InitChart();
                smallIndicatorChart.Invalidate();
                RebuildStrategyLayout();
                smallBalanceChart.SetChartData();
                smallBalanceChart.InitChart();
                smallBalanceChart.Invalidate();
                SetupJournal();
                infpnlAccountStatistics.Update(Backtester.AccountStatsParam, Backtester.AccountStatsValue,
                                               Backtester.AccountStatsFlags, Language.T("Account Statistics"));
            }
            else
            {   // Cancel was pressed
                UndoStrategy();
            }

            Data.IsStrategyReady = true;

            return;
        }
Actions