aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-03-01 14:24:25 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-03-01 14:24:25 +0200
commit6e2eeb6829b2b1bf5e1e5334b9dad84f10ce2bc1 (patch)
treed423e90c51f380d8207a2d91cbf444a4cbcc698b /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
parentf185c2ba392d7a05079ca1c3e27521bac053a103 (diff)
downloadTango-6e2eeb6829b2b1bf5e1e5334b9dad84f10ce2bc1.tar.gz
Tango-6e2eeb6829b2b1bf5e1e5334b9dad84f10ce2bc1.zip
Upgraded protobuf from 4.1 to 5.1 ?
Implemented a workaround for protobuf ToByteString bug. Lowered Transporter Push/Pull Interval from 2 to 1 mili. Set No Alpha Channel as default on color canvas. Fixed issue with single graphs colors on technician module.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs50
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj4
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/packages.config2
3 files changed, 35 insertions, 21 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 112fde2cf..b2f869d4c 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs
@@ -4,8 +4,10 @@ using System.Configuration;
using System.Data;
using System.Diagnostics;
using System.Linq;
+using System.Threading;
using System.Threading.Tasks;
using System.Windows;
+using Tango.Core.Helpers;
using Tango.Integration.Observables;
using Tango.Logging;
using Tango.MachineStudio.UI.Windows;
@@ -56,26 +58,38 @@ namespace Tango.MachineStudio.UI
/// <param name="e">The <see cref="ApplicationCrashedEventArgs"/> instance containing the event data.</param>
private void ExceptionTrapper_ApplicationCrashed(object sender, ApplicationCrashedEventArgs e)
{
- ExceptionWindow exWin = new ExceptionWindow(e.Exception);
- exWin.ShowDialog();
-
- switch (exWin.Resolution)
+ try
{
- case ExceptionResolutions.Ignore:
- e.TryRecover = true;
- break;
- case ExceptionResolutions.Restart:
- e.TryRecover = false;
- LogManager.Log("User selection was to restart the application. Restarting...");
- Process.Start(Application.ResourceAssembly.Location);
- Environment.Exit(0);
- break;
- case ExceptionResolutions.Shutdown:
- e.TryRecover = false;
- LogManager.Log("User selection was to shutdown the application. Restarting...");
- Environment.Exit(0);
- break;
+ if (Application.Current == null)
+ {
+ new Application { ShutdownMode = ShutdownMode.OnExplicitShutdown };
+ }
}
+ catch { }
+
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ ExceptionWindow exWin = new ExceptionWindow(e.Exception);
+ exWin.ShowDialog();
+
+ switch (exWin.Resolution)
+ {
+ case ExceptionResolutions.Ignore:
+ e.TryRecover = true;
+ break;
+ case ExceptionResolutions.Restart:
+ e.TryRecover = false;
+ LogManager.Log("User selection was to restart the application. Restarting...");
+ Process.Start(Application.ResourceAssembly.Location);
+ Environment.Exit(0);
+ break;
+ case ExceptionResolutions.Shutdown:
+ e.TryRecover = false;
+ LogManager.Log("User selection was to shutdown the application. Restarting...");
+ Environment.Exit(0);
+ break;
+ }
+ });
}
#endregion
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj
index 1d81aea5d..2b4fc3253 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj
@@ -63,8 +63,8 @@
<Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
<HintPath>..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
</Reference>
- <Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath>
+ <Reference Include="Google.Protobuf, Version=3.5.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\Google.Protobuf.3.5.1\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
<HintPath>..\..\packages\Ionic.Zip.1.9.1.8\lib\Ionic.Zip.dll</HintPath>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/packages.config b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/packages.config
index 5dcc330a7..60d8edcc2 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/packages.config
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/packages.config
@@ -5,7 +5,7 @@
<package id="EntityFramework" version="6.0.0" targetFramework="net46" />
<package id="FluentFTP" version="19.1.2" targetFramework="net46" />
<package id="FontAwesome.WPF" version="4.7.0.9" targetFramework="net46" />
- <package id="Google.Protobuf" version="3.4.1" targetFramework="net46" />
+ <package id="Google.Protobuf" version="3.5.1" targetFramework="net46" />
<package id="Ionic.Zip" version="1.9.1.8" targetFramework="net46" />
<package id="MahApps.Metro" version="1.5.0" targetFramework="net46" />
<package id="MaterialDesignColors" version="1.1.2" targetFramework="net46" />