Account Settings
Inheritance: System.Windows.Forms.Form
Esempio n. 1
0
// ---------------------------------------------------------- //

        /// <summary>
        /// Edits the Strategy Properties Slot
        /// </summary>
        void EditStrategyProperties()
        {
            Data.IsStrategyReady = false;
            Data.StackStrategy.Push(Data.Strategy.Clone());

            Strategy_Properties strategyProperties = new Strategy_Properties();

            strategyProperties.ShowDialog();

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

            Data.IsStrategyReady = true;

            return;
        }
        // ---------------------------------------------------------- //
        /// <summary>
        /// Edits the Strategy Properties Slot
        /// </summary>
        void EditStrategyProperties()
        {
            Data.IsStrategyReady = false;
            Data.StackStrategy.Push(Data.Strategy.Clone());

            Strategy_Properties strategyProperties = new Strategy_Properties();
            strategyProperties.ShowDialog();

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

            Data.IsStrategyReady = true;

            return;
        }