Exemplo n.º 1
0
        public static void Main(params string[] input)
        {
            UpdateSplashScreeStatus("Loading...");
            Data.Start();
            Configs.LoadConfigs();

            CheckIfStartedFromCmdLine(input);
            if (Data.IsAutoStart)
            {
                SetAutostartSettings();
            }

            // Checks if this is the only running copy of FST.
            if (!Configs.MultipleInstances)
            {
                Process[] procs = Process.GetProcessesByName(Data.ProgramName);
                if (procs.Length > 1)
                {
                    RemoveSplashScreen();
                    MessageBox.Show(
                        "Forex Strategy Trader is already running! You can allow multiple instances of the program from Tools menu.",
                        Data.ProgramName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

                    return;
                }
            }

            Language.InitLanguages();
            LayoutColors.InitColorSchemes();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Actions());
        }