private static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // This form created for obtain UI synchronization context only using (new Form()) { // Store the shared JoinableTaskContext ThreadHelper.JoinableTaskContext = new JoinableTaskContext(); } // required for translation PluginRegistry.Initialize(); string[] args = Environment.GetCommandLineArgs(); if (args.Length == 1) { Application.Run(new FormTranslate()); } else if (args.Length == 2 && args[1] == "update") { UpdateAllTranslations(); } else if (args.Length == 2 && args[1] == "status") { ShowStatus(); } }
private static void Main() { // This form created for obtain UI synchronization context only using (new Form()) { // Store the shared JoinableTaskContext ThreadHelper.JoinableTaskContext = new JoinableTaskContext(); } // required for translation PluginRegistry.Initialize(); // we will be instantiating a number of forms using their default .ctors // this would lead to InvalidOperationException thrown in GitModuleForm() // set the flag that will stop this from happening GitModuleForm.IsUnitTestActive = true; var neutralItems = TranslationHelpers.LoadNeutralItems(); string filename = Path.Combine(Translator.GetTranslationDir(), "English.xlf"); TranslationHelpers.SaveTranslation(null, neutralItems, filename); var translationsNames = Translator.GetAllTranslations(); foreach (var name in translationsNames) { var translation = Translator.GetTranslation(name); var translateItems = TranslationHelpers.LoadTranslation(translation, neutralItems); filename = Path.Combine(Translator.GetTranslationDir(), name + ".xlf"); TranslationHelpers.SaveTranslation(translation.First().Value.TargetLanguage, translateItems, filename); } }
private static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (EnvUtils.RunningOnWindows()) { NBug.Settings.UIMode = NBug.Enums.UIMode.Full; // Uncomment the following after testing to see that NBug is working as configured NBug.Settings.ReleaseMode = true; NBug.Settings.ExitApplicationImmediately = false; NBug.Settings.WriteLogToDisk = true; NBug.Settings.MaxQueuedReports = 10; NBug.Settings.StopReportingAfter = 90; NBug.Settings.SleepBeforeSend = 30; NBug.Settings.StoragePath = NBug.Enums.StoragePath.WindowsTemp; if (!Debugger.IsAttached) { AppDomain.CurrentDomain.UnhandledException += NBug.Handler.UnhandledException; Application.ThreadException += NBug.Handler.ThreadException; } } // This form created for obtain UI synchronization context only using (new Form()) { // Store the shared JoinableTaskContext ThreadHelper.JoinableTaskContext = new JoinableTaskContext(); } // required for translation PluginRegistry.Initialize(); string[] args = Environment.GetCommandLineArgs(); if (args.Length == 1) { Application.Run(new FormTranslate()); } else if (args.Length == 2 && args[1] == "update") { UpdateAllTranslations(); } else if (args.Length == 2 && args[1] == "status") { ShowStatus(); } }