public BaseTest() { var thread = new Thread( s => ((CultureState)s).Result = Thread.CurrentThread.CurrentCulture); var state = new CultureState(); thread.Start(state); thread.Join(); CultureInfo culture = state.Result; Localizer.SetCulture(culture); Localizer.Initialize(); DatabaseData.Instance.AccessConnectionString = ConfigurationManager.ConnectionStrings["AccessFileName"].ConnectionString; }
public static void Main() { AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Thread.CurrentThread.CurrentCulture.ClearCachedData(); var thread = new Thread( s => ((CultureState)s).Result = Thread.CurrentThread.CurrentCulture); var state = new CultureState(); thread.Start(state); thread.Join(); CultureInfo culture = state.Result; Localizer.SetCulture(culture); Localizer.Initialize(); Application.Run(new Shell()); }