aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2020-08-16 23:34:17 +0300
committerShlomo Hecht <shlomo@twine-s.com>2020-08-16 23:34:17 +0300
commit7d232db20da74279dbb691beae2e771c290c038e (patch)
tree03583b90b871f00047bbf319b18936ad746e1430 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
parent5260452ded0983a5f71692625cafe2f2897178ef (diff)
parent721b364fc9845e448658ef6ab5486a00bc0a53bf (diff)
downloadTango-7d232db20da74279dbb691beae2e771c290c038e.tar.gz
Tango-7d232db20da74279dbb691beae2e771c290c038e.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.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()