aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2020-08-25 10:08:01 +0300
committerAvi Levkovich <avi@twine-s.com>2020-08-25 10:08:01 +0300
commit338edba081dba2a2aefb634811be1cc84ec93d64 (patch)
tree0021538796c254a8eab8527e8461a2e831e68c1c /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs
parent49ddda1cc22d6cbb72f499b37e5db32c95252dfa (diff)
downloadTango-338edba081dba2a2aefb634811be1cc84ec93d64.tar.gz
Tango-338edba081dba2a2aefb634811be1cc84ec93d64.zip
merge
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs25
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()