From 6e2eeb6829b2b1bf5e1e5334b9dad84f10ce2bc1 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 1 Mar 2018 14:24:25 +0200 Subject: 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. --- .../Tango.MachineStudio.Developer.csproj | 4 +- .../Tango.MachineStudio.Developer/packages.config | 2 +- .../Tango.MachineStudio.Stubs.csproj | 4 +- .../Tango.MachineStudio.Stubs/packages.config | 2 +- .../Tango.MachineStudio.Synchronization.csproj | 4 +- .../packages.config | 2 +- .../Editors/MultiGraphElementEditor.xaml | 4 -- .../Editors/SingleGraphElementEditor.xaml | 6 +-- .../Tango.MachineStudio.Technician.csproj | 4 +- .../TechItems/SingleGraphItem.cs | 2 + .../TechItems/TechItem.cs | 1 + .../Tango.MachineStudio.Technician/packages.config | 2 +- .../Tango.MachineStudio.UI/App.xaml.cs | 50 ++++++++++++++-------- .../Tango.MachineStudio.UI.csproj | 4 +- .../Tango.MachineStudio.UI/packages.config | 2 +- 15 files changed, 51 insertions(+), 42 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj index 2efcabb4b..8af895651 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj @@ -49,8 +49,8 @@ ..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll - - ..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll + + ..\..\..\packages\Google.Protobuf.3.5.1\lib\net45\Google.Protobuf.dll ..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/packages.config index c3235a090..4ec358a9a 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/packages.config +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/packages.config @@ -3,7 +3,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Tango.MachineStudio.Stubs.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Tango.MachineStudio.Stubs.csproj index c9670d1be..3863da133 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Tango.MachineStudio.Stubs.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Tango.MachineStudio.Stubs.csproj @@ -43,8 +43,8 @@ ..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll - - ..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll + + ..\..\..\packages\Google.Protobuf.3.5.1\lib\net45\Google.Protobuf.dll ..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/packages.config index a29d1ec82..cd796d5b0 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/packages.config +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/packages.config @@ -2,7 +2,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Tango.MachineStudio.Synchronization.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Tango.MachineStudio.Synchronization.csproj index 2a95dc082..b4e6b6373 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Tango.MachineStudio.Synchronization.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Tango.MachineStudio.Synchronization.csproj @@ -51,8 +51,8 @@ ..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll - - ..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll + + ..\..\..\packages\Google.Protobuf.3.5.1\lib\net45\Google.Protobuf.dll ..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/packages.config index 1fa8e3268..761bba2f1 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/packages.config +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/packages.config @@ -3,7 +3,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml index 51bb3ff9c..bae36e665 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml @@ -32,10 +32,6 @@ - - - - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml index a0dd0f697..fc7b02870 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml @@ -30,12 +30,8 @@ - + - - - - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj index 08c1980f4..f5c28d901 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj @@ -43,8 +43,8 @@ ..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll - - ..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll + + ..\..\..\packages\Google.Protobuf.3.5.1\lib\net45\Google.Protobuf.dll ..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs index 9b19f0861..2473d4798 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Windows.Media; using System.Xml.Serialization; using Tango.Integration.Observables; using Tango.MachineStudio.Technician.Editors; @@ -57,6 +58,7 @@ namespace Tango.MachineStudio.Technician.TechItems Name = "Single Channel Graph"; Description = "Single channel real-time graph"; Image = ResourceHelper.GetImageFromResources("Images/single-graph.png"); + Color = Colors.DodgerBlue; } /// diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs index 254c141b6..d4e535678 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs @@ -184,6 +184,7 @@ namespace Tango.MachineStudio.Technician.TechItems { _colorNumber = value; _color = ColorHelper.IntegerToColor(value); + _color.A = 255; RaisePropertyChanged(nameof(Color)); } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/packages.config index dc7f6404d..30fa3386f 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/packages.config +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/packages.config @@ -2,7 +2,7 @@ - + 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 /// The instance containing the event data. 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 @@ ..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll - - ..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll + + ..\..\packages\Google.Protobuf.3.5.1\lib\net45\Google.Protobuf.dll ..\..\packages\Ionic.Zip.1.9.1.8\lib\Ionic.Zip.dll 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 @@ - + -- cgit v1.3.1