Set the default culture

This commit is contained in:
Lars Brubaker 2018-01-03 10:46:39 -08:00
parent 5644f31a15
commit a5f97fe12c
4 changed files with 25 additions and 1 deletions

View file

@ -1,6 +1,8 @@
using System;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Threading;
namespace MatterHackers.MatterControl.Launcher
{
@ -13,6 +15,14 @@ namespace MatterHackers.MatterControl.Launcher
[STAThread]
public static void Main(string[] args)
{
// this sets the global culture for the app and all new threads
CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;
CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.InvariantCulture;
// and make sure tha appl is set correctly
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture;
if (args.Length == 2 && File.Exists(args[0]))
{
ProcessStartInfo runAppLauncherStartInfo = new ProcessStartInfo();