diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2020-08-13 19:51:57 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2020-08-13 19:51:57 +0300 |
| commit | 33f4369a4a30c3e4e9b96d4b8f22aa8f537e7796 (patch) | |
| tree | 68c91cc970bde94d01a119bc1a404bd442250b88 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI | |
| parent | 2bd7dc98153dd2f0eff5bdaabd89592313ee571e (diff) | |
| parent | f0c574a21a02968b227963ae728a2c25801c94ea (diff) | |
| download | Tango-33f4369a4a30c3e4e9b96d4b8f22aa8f537e7796.tar.gz Tango-33f4369a4a30c3e4e9b96d4b8f22aa8f537e7796.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs index 2ea0ebd38..7eab5066a 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs @@ -25,6 +25,8 @@ using Tango.Core; using Tango.BL; using Tango.Integration.Operation; using System.Net; +using System.Globalization; +using System.Windows.Markup; namespace Tango.MachineStudio.UI { @@ -40,6 +42,18 @@ namespace Tango.MachineStudio.UI protected override void OnStartup(StartupEventArgs e) { + //Set culture info. + var enUSCulture = new CultureInfo("en-US"); + + Thread.CurrentThread.CurrentCulture = enUSCulture; + Thread.CurrentThread.CurrentUICulture = enUSCulture; + CultureInfo.DefaultThreadCurrentCulture = enUSCulture; + CultureInfo.DefaultThreadCurrentUICulture = enUSCulture; + + FrameworkElement.LanguageProperty.OverrideMetadata( + typeof(FrameworkElement), + new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag))); + StartupArgs = e.Args; #if DEBUG @@ -88,6 +102,17 @@ namespace Tango.MachineStudio.UI ApplyEFCacheSettings(); WebRequest.DefaultWebProxy = null; + + GetLastApplicationCrashFromWindows(); + } + + private async void GetLastApplicationCrashFromWindows() + { + var logItem = await exceptionTrapper.GetLastApplicationCrashEventLog(); + if (logItem != null) + { + LogManager.Log(logItem); + } } private void ApplyEFCacheSettings() |
