public static void Main(params string[] input) { splashScreenId = WinApi.GetWindowId(null, "FST Launcher"); 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()); }
/// <summary> /// Loads a color scheme. /// </summary> private void LoadColorScheme() { string colorSchemeFile = Path.Combine(Data.ColorDir, Configs.ColorScheme + ".xml"); if (File.Exists(colorSchemeFile)) { LayoutColors.LoadColorScheme(colorSchemeFile); SetColors(); } }