/// <summary>
        /// The default constructor
        /// </summary>
        public Actions()
        {
            StartPosition     = FormStartPosition.CenterScreen;
            Size              = new Size(785, 560);
            MinimumSize       = new Size(600, 370);
            Icon              = Data.Icon;
            Text              = Data.ProgramName;
            FormClosing      += new FormClosingEventHandler(Actions_FormClosing);
            Application.Idle += new EventHandler(Application_Idle);

            // Load a data file
            LoadInstrument(true);

            // Prepare custom indicators
            UpdateSplashScreeStatus("Loading custom indicators...");
            if (Configs.LoadCustomIndicators)
                Custom_Indicators.LoadCustomIndicators();

            // Load a strategy
            UpdateSplashScreeStatus("Loading strategy...");
            string sStrategyPath = Data.StrategyPath;
            if (Configs.RememberLastStr && Configs.LastStrategy != "")
            {
                string sLastStrategy = Path.GetDirectoryName(Configs.LastStrategy);
                if (sLastStrategy != "")
                    sLastStrategy = Configs.LastStrategy;
                else
                {
                    string sPath = Path.Combine(Data.ProgramDir, Data.DefaultStrategyDir);
                    sLastStrategy = Path.Combine(sPath, Configs.LastStrategy);
                }
                if (File.Exists(sLastStrategy))
                    sStrategyPath = sLastStrategy;
            }

            if (OpenStrategy(sStrategyPath) == 0)
            {
                CalculateStrategy(true);
                AfterStrategyOpening();
            }

            ChangeTabPage(Configs.LastTab);

            Live_Content liveContent = new Live_Content(Data.SystemDir, miLiveContent, miForex, pnlUsefulLinks, pnlForexBrokers);

            // Starting tips
            if (Configs.ShowStartingTip)
            {
                Starting_Tips startingTips = new Starting_Tips();
                startingTips.Show();
            }

            UpdateSplashScreeStatus("Loading user interface...");

            return;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// The default constructor
        /// </summary>
        public Actions()
        {
            StartPosition     = FormStartPosition.CenterScreen;
            Size              = new Size(785, 560);
            MinimumSize       = new Size(600, 370);
            Icon              = Data.Icon;
            Text              = Data.ProgramName;
            FormClosing      += new FormClosingEventHandler(Actions_FormClosing);
            Application.Idle += new EventHandler(Application_Idle);

            // Load a data file
            LoadInstrument(true);

            // Prepare custom indicators
            UpdateSplashScreeStatus("Loading custom indicators...");
            if (Configs.LoadCustomIndicators)
            {
                Custom_Indicators.LoadCustomIndicators();
            }

            // Load a strategy
            UpdateSplashScreeStatus("Loading strategy...");
            string sStrategyPath = Data.StrategyPath;

            if (Configs.RememberLastStr && Configs.LastStrategy != "")
            {
                string sLastStrategy = Path.GetDirectoryName(Configs.LastStrategy);
                if (sLastStrategy != "")
                {
                    sLastStrategy = Configs.LastStrategy;
                }
                else
                {
                    string sPath = Path.Combine(Data.ProgramDir, Data.DefaultStrategyDir);
                    sLastStrategy = Path.Combine(sPath, Configs.LastStrategy);
                }
                if (File.Exists(sLastStrategy))
                {
                    sStrategyPath = sLastStrategy;
                }
            }

            if (OpenStrategy(sStrategyPath) == 0)
            {
                CalculateStrategy(true);
                AfterStrategyOpening();
            }

            ChangeTabPage(Configs.LastTab);

            Live_Content liveContent = new Live_Content(Data.SystemDir, miLiveContent, miForex, pnlUsefulLinks, pnlForexBrokers);

            // Starting tips
            if (Configs.ShowStartingTip)
            {
                Starting_Tips startingTips = new Starting_Tips();
                startingTips.Show();
            }

            UpdateSplashScreeStatus("Loading user interface...");

            return;
        }