From 499f4facfe296d984a44e9ce0b6e1eb23ba8d644 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 5 Mar 2019 14:53:49 +0200 Subject: Improvements and bug fixes on PPC. --- Software/DB/PPC/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/PPC/Tango_log.ldf | Bin 53673984 -> 53673984 bytes Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 22675456 -> 22675456 bytes Software/Graphics/Mobile/Menu/events.png | Bin 264 -> 264 bytes Software/Graphics/Mobile/Menu/events@2x.png | Bin 376 -> 379 bytes Software/Graphics/Mobile/Menu/events@3x.png | Bin 506 -> 507 bytes Software/Graphics/Mobile/Menu/jobs.png | Bin 494 -> 469 bytes Software/Graphics/Mobile/Menu/jobs@2x.png | Bin 733 -> 767 bytes Software/Graphics/Mobile/Menu/jobs@3x.png | Bin 1104 -> 1157 bytes Software/Graphics/Mobile/Menu/machine@2x.png | Bin 0 -> 4527 bytes Software/Graphics/Mobile/Menu/machine@3x.png | Bin 0 -> 7042 bytes Software/Graphics/Mobile/Menu/maintenance.png | Bin 776 -> 686 bytes Software/Graphics/Mobile/Menu/maintenance@2x.png | Bin 2256 -> 1276 bytes Software/Graphics/Mobile/Menu/maintenance@3x.png | Bin 4128 -> 1938 bytes Software/Graphics/Mobile/Menu/power-machine.png | Bin 0 -> 2219 bytes Software/Graphics/Mobile/Menu/power-tablet.png | Bin 0 -> 775 bytes Software/Graphics/Mobile/Menu/settings.png | Bin 906 -> 902 bytes Software/Graphics/Mobile/Menu/settings@2x.png | Bin 1811 -> 1883 bytes Software/Graphics/Mobile/Menu/settings@3x.png | Bin 2848 -> 2915 bytes Software/Graphics/Mobile/Menu/storage.png | Bin 350 -> 677 bytes Software/Graphics/Mobile/Menu/storage@2x.png | Bin 512 -> 1177 bytes Software/Graphics/Mobile/Menu/storage@3x.png | Bin 750 -> 1621 bytes Software/Graphics/Mobile/Menu/tablet@2x.png | Bin 0 -> 1532 bytes Software/Graphics/Mobile/Menu/tablet@3x.png | Bin 0 -> 2411 bytes Software/Graphics/Mobile/Menu/update.png | Bin 0 -> 818 bytes Software/Graphics/Mobile/Menu/update@2x.png | Bin 0 -> 1683 bytes Software/Graphics/Mobile/Menu/update@3x.png | Bin 0 -> 2507 bytes Software/Graphics/Mobile/New Job/coats.png | Bin 0 -> 1019 bytes Software/Graphics/Mobile/New Job/coats@2x.png | Bin 0 -> 5459 bytes Software/Graphics/Mobile/New Job/coats@3x.png | Bin 0 -> 10391 bytes Software/Graphics/Mobile/New Job/lab.png | Bin 0 -> 1011 bytes Software/Graphics/Mobile/New Job/lab@2x.png | Bin 0 -> 2167 bytes Software/Graphics/Mobile/New Job/lab@3x.png | Bin 0 -> 3351 bytes Software/Graphics/Mobile/New Job/length.png | Bin 0 -> 504 bytes Software/Graphics/Mobile/New Job/rgb.png | Bin 0 -> 1468 bytes Software/Graphics/Mobile/New Job/rgb@2x.png | Bin 0 -> 2987 bytes Software/Graphics/Mobile/New Job/rgb@3x.png | Bin 0 -> 4505 bytes Software/Graphics/Mobile/New Job/threed@2x.png | Bin 0 -> 1181 bytes Software/Graphics/Mobile/New Job/threed@3x.png | Bin 0 -> 1650 bytes Software/Graphics/Mobile/New Job/twine.png | Bin 0 -> 798 bytes Software/Graphics/Mobile/New Job/twine@2x.png | Bin 0 -> 1439 bytes Software/Graphics/Mobile/New Job/twine@3x.png | Bin 0 -> 2148 bytes .../PPC/Modules/Tango.PPC.Events/EventsModule.cs | 2 +- .../PPC/Modules/Tango.PPC.Events/Images/events.png | Bin 0 -> 379 bytes .../Tango.PPC.Events/Tango.PPC.Events.csproj | 5 +- .../Converters/ColorSpaceToImageConverter.cs | 41 ++++++ .../Tango.PPC.Jobs/Dialogs/JobCreationView.xaml | 98 +++++++------ .../Modules/Tango.PPC.Jobs/Images/NewJob/coats.png | Bin 0 -> 1019 bytes .../Modules/Tango.PPC.Jobs/Images/NewJob/lab.png | Bin 0 -> 1011 bytes .../Modules/Tango.PPC.Jobs/Images/NewJob/rgb.png | Bin 0 -> 1468 bytes .../Modules/Tango.PPC.Jobs/Images/NewJob/twine.png | Bin 0 -> 798 bytes .../PPC/Modules/Tango.PPC.Jobs/Images/jobs.png | Bin 0 -> 767 bytes .../PPC/Modules/Tango.PPC.Jobs/Images/length.png | Bin 0 -> 504 bytes .../PPC/Modules/Tango.PPC.Jobs/JobsModule.cs | 2 +- .../Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj | 15 +- .../Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs | 34 +++-- .../Tango.PPC.Jobs/ViewModels/JobsViewVM.cs | 2 +- .../Tango.PPC.Jobs/Views/JobSummeryView.xaml | 99 +++++++++----- .../PPC/Modules/Tango.PPC.Jobs/Views/JobsView.xaml | 53 +++++++- .../Tango.PPC.MachineSettings/Images/settings.png | Bin 0 -> 1883 bytes .../MachineSettingsModule.cs | 2 +- .../Tango.PPC.MachineSettings.csproj | 5 +- .../ViewModels/MainViewVM.cs | 2 +- .../Modules/Tango.PPC.Storage/Images/storage.png | Bin 0 -> 1177 bytes .../PPC/Modules/Tango.PPC.Storage/StorageModule.cs | 2 +- .../Tango.PPC.Storage/Tango.PPC.Storage.csproj | 3 + .../PPC/Tango.PPC.UI/Images/Menu/power.png | Bin 0 -> 1218 bytes .../PPC/Tango.PPC.UI/Images/Menu/update.png | Bin 0 -> 1683 bytes .../PPC/Tango.PPC.UI/Images/power-machine.png | Bin 0 -> 2219 bytes .../PPC/Tango.PPC.UI/Images/power-tablet.png | Bin 0 -> 775 bytes .../PPC/Tango.PPC.UI/Tango.PPC.UI.csproj | 10 +- .../PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs | 33 ++++- .../PPC/Tango.PPC.UI/Views/LayoutView.xaml | 151 +++++++++++++++++---- .../ColorConversion/TangoColorConverter.cs | 2 +- Software/Visual_Studio/Tango.BL/Entities/Job.cs | 29 ++++ Software/Visual_Studio/Tango.BL/Entities/Rml.cs | 5 + .../ExtensionMethods/ObjectExtensions.cs | 20 +++ .../Tango.Touch/Resources/Colors.xaml | 6 +- .../Visual_Studio/Tango.Touch/Resources/Fonts.xaml | 1 + .../Tango.Touch/Styles/TouchToggleButton.xaml | 2 +- 81 files changed, 491 insertions(+), 133 deletions(-) create mode 100644 Software/Graphics/Mobile/Menu/machine@2x.png create mode 100644 Software/Graphics/Mobile/Menu/machine@3x.png create mode 100644 Software/Graphics/Mobile/Menu/power-machine.png create mode 100644 Software/Graphics/Mobile/Menu/power-tablet.png create mode 100644 Software/Graphics/Mobile/Menu/tablet@2x.png create mode 100644 Software/Graphics/Mobile/Menu/tablet@3x.png create mode 100644 Software/Graphics/Mobile/Menu/update.png create mode 100644 Software/Graphics/Mobile/Menu/update@2x.png create mode 100644 Software/Graphics/Mobile/Menu/update@3x.png create mode 100644 Software/Graphics/Mobile/New Job/coats.png create mode 100644 Software/Graphics/Mobile/New Job/coats@2x.png create mode 100644 Software/Graphics/Mobile/New Job/coats@3x.png create mode 100644 Software/Graphics/Mobile/New Job/lab.png create mode 100644 Software/Graphics/Mobile/New Job/lab@2x.png create mode 100644 Software/Graphics/Mobile/New Job/lab@3x.png create mode 100644 Software/Graphics/Mobile/New Job/length.png create mode 100644 Software/Graphics/Mobile/New Job/rgb.png create mode 100644 Software/Graphics/Mobile/New Job/rgb@2x.png create mode 100644 Software/Graphics/Mobile/New Job/rgb@3x.png create mode 100644 Software/Graphics/Mobile/New Job/threed@2x.png create mode 100644 Software/Graphics/Mobile/New Job/threed@3x.png create mode 100644 Software/Graphics/Mobile/New Job/twine.png create mode 100644 Software/Graphics/Mobile/New Job/twine@2x.png create mode 100644 Software/Graphics/Mobile/New Job/twine@3x.png create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Images/events.png create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToImageConverter.cs create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/coats.png create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/lab.png create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/rgb.png create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/twine.png create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/jobs.png create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/length.png create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Images/settings.png create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Images/storage.png create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Menu/power.png create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Menu/update.png create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/power-machine.png create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/power-tablet.png diff --git a/Software/DB/PPC/Tango.mdf b/Software/DB/PPC/Tango.mdf index 8d64d88b7..423acaa6c 100644 Binary files a/Software/DB/PPC/Tango.mdf and b/Software/DB/PPC/Tango.mdf differ diff --git a/Software/DB/PPC/Tango_log.ldf b/Software/DB/PPC/Tango_log.ldf index 5454b5236..35837b2a1 100644 Binary files a/Software/DB/PPC/Tango_log.ldf and b/Software/DB/PPC/Tango_log.ldf differ diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index 91988629c..6d661b5a7 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index 433433bdb..404861144 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/Graphics/Mobile/Menu/events.png b/Software/Graphics/Mobile/Menu/events.png index 7966aa561..797685867 100644 Binary files a/Software/Graphics/Mobile/Menu/events.png and b/Software/Graphics/Mobile/Menu/events.png differ diff --git a/Software/Graphics/Mobile/Menu/events@2x.png b/Software/Graphics/Mobile/Menu/events@2x.png index 1a557347d..53a767f8e 100644 Binary files a/Software/Graphics/Mobile/Menu/events@2x.png and b/Software/Graphics/Mobile/Menu/events@2x.png differ diff --git a/Software/Graphics/Mobile/Menu/events@3x.png b/Software/Graphics/Mobile/Menu/events@3x.png index 536d7ed05..9a63ae5f9 100644 Binary files a/Software/Graphics/Mobile/Menu/events@3x.png and b/Software/Graphics/Mobile/Menu/events@3x.png differ diff --git a/Software/Graphics/Mobile/Menu/jobs.png b/Software/Graphics/Mobile/Menu/jobs.png index 04e456074..4d9f63fcf 100644 Binary files a/Software/Graphics/Mobile/Menu/jobs.png and b/Software/Graphics/Mobile/Menu/jobs.png differ diff --git a/Software/Graphics/Mobile/Menu/jobs@2x.png b/Software/Graphics/Mobile/Menu/jobs@2x.png index c35200fcb..eb668ad03 100644 Binary files a/Software/Graphics/Mobile/Menu/jobs@2x.png and b/Software/Graphics/Mobile/Menu/jobs@2x.png differ diff --git a/Software/Graphics/Mobile/Menu/jobs@3x.png b/Software/Graphics/Mobile/Menu/jobs@3x.png index 25f30c79b..dd732cbc4 100644 Binary files a/Software/Graphics/Mobile/Menu/jobs@3x.png and b/Software/Graphics/Mobile/Menu/jobs@3x.png differ diff --git a/Software/Graphics/Mobile/Menu/machine@2x.png b/Software/Graphics/Mobile/Menu/machine@2x.png new file mode 100644 index 000000000..32468821d Binary files /dev/null and b/Software/Graphics/Mobile/Menu/machine@2x.png differ diff --git a/Software/Graphics/Mobile/Menu/machine@3x.png b/Software/Graphics/Mobile/Menu/machine@3x.png new file mode 100644 index 000000000..2cd106e57 Binary files /dev/null and b/Software/Graphics/Mobile/Menu/machine@3x.png differ diff --git a/Software/Graphics/Mobile/Menu/maintenance.png b/Software/Graphics/Mobile/Menu/maintenance.png index 5edfe7125..526284750 100644 Binary files a/Software/Graphics/Mobile/Menu/maintenance.png and b/Software/Graphics/Mobile/Menu/maintenance.png differ diff --git a/Software/Graphics/Mobile/Menu/maintenance@2x.png b/Software/Graphics/Mobile/Menu/maintenance@2x.png index 91be3bd10..4f72839ee 100644 Binary files a/Software/Graphics/Mobile/Menu/maintenance@2x.png and b/Software/Graphics/Mobile/Menu/maintenance@2x.png differ diff --git a/Software/Graphics/Mobile/Menu/maintenance@3x.png b/Software/Graphics/Mobile/Menu/maintenance@3x.png index 7d72a12f2..b455924a8 100644 Binary files a/Software/Graphics/Mobile/Menu/maintenance@3x.png and b/Software/Graphics/Mobile/Menu/maintenance@3x.png differ diff --git a/Software/Graphics/Mobile/Menu/power-machine.png b/Software/Graphics/Mobile/Menu/power-machine.png new file mode 100644 index 000000000..5c8608b61 Binary files /dev/null and b/Software/Graphics/Mobile/Menu/power-machine.png differ diff --git a/Software/Graphics/Mobile/Menu/power-tablet.png b/Software/Graphics/Mobile/Menu/power-tablet.png new file mode 100644 index 000000000..34191593c Binary files /dev/null and b/Software/Graphics/Mobile/Menu/power-tablet.png differ diff --git a/Software/Graphics/Mobile/Menu/settings.png b/Software/Graphics/Mobile/Menu/settings.png index 79ccc16d0..2b8149fe4 100644 Binary files a/Software/Graphics/Mobile/Menu/settings.png and b/Software/Graphics/Mobile/Menu/settings.png differ diff --git a/Software/Graphics/Mobile/Menu/settings@2x.png b/Software/Graphics/Mobile/Menu/settings@2x.png index a8f14b940..fa268e53a 100644 Binary files a/Software/Graphics/Mobile/Menu/settings@2x.png and b/Software/Graphics/Mobile/Menu/settings@2x.png differ diff --git a/Software/Graphics/Mobile/Menu/settings@3x.png b/Software/Graphics/Mobile/Menu/settings@3x.png index 8455cdb43..314f3a57a 100644 Binary files a/Software/Graphics/Mobile/Menu/settings@3x.png and b/Software/Graphics/Mobile/Menu/settings@3x.png differ diff --git a/Software/Graphics/Mobile/Menu/storage.png b/Software/Graphics/Mobile/Menu/storage.png index d86d5d3f7..7bd0f77c5 100644 Binary files a/Software/Graphics/Mobile/Menu/storage.png and b/Software/Graphics/Mobile/Menu/storage.png differ diff --git a/Software/Graphics/Mobile/Menu/storage@2x.png b/Software/Graphics/Mobile/Menu/storage@2x.png index 8d90e3f67..619d9de34 100644 Binary files a/Software/Graphics/Mobile/Menu/storage@2x.png and b/Software/Graphics/Mobile/Menu/storage@2x.png differ diff --git a/Software/Graphics/Mobile/Menu/storage@3x.png b/Software/Graphics/Mobile/Menu/storage@3x.png index b62079446..84fbf368c 100644 Binary files a/Software/Graphics/Mobile/Menu/storage@3x.png and b/Software/Graphics/Mobile/Menu/storage@3x.png differ diff --git a/Software/Graphics/Mobile/Menu/tablet@2x.png b/Software/Graphics/Mobile/Menu/tablet@2x.png new file mode 100644 index 000000000..15d5a6fd6 Binary files /dev/null and b/Software/Graphics/Mobile/Menu/tablet@2x.png differ diff --git a/Software/Graphics/Mobile/Menu/tablet@3x.png b/Software/Graphics/Mobile/Menu/tablet@3x.png new file mode 100644 index 000000000..373e5a68c Binary files /dev/null and b/Software/Graphics/Mobile/Menu/tablet@3x.png differ diff --git a/Software/Graphics/Mobile/Menu/update.png b/Software/Graphics/Mobile/Menu/update.png new file mode 100644 index 000000000..9fc933241 Binary files /dev/null and b/Software/Graphics/Mobile/Menu/update.png differ diff --git a/Software/Graphics/Mobile/Menu/update@2x.png b/Software/Graphics/Mobile/Menu/update@2x.png new file mode 100644 index 000000000..45f4608c9 Binary files /dev/null and b/Software/Graphics/Mobile/Menu/update@2x.png differ diff --git a/Software/Graphics/Mobile/Menu/update@3x.png b/Software/Graphics/Mobile/Menu/update@3x.png new file mode 100644 index 000000000..b4891ff0d Binary files /dev/null and b/Software/Graphics/Mobile/Menu/update@3x.png differ diff --git a/Software/Graphics/Mobile/New Job/coats.png b/Software/Graphics/Mobile/New Job/coats.png new file mode 100644 index 000000000..d6cd3ecf2 Binary files /dev/null and b/Software/Graphics/Mobile/New Job/coats.png differ diff --git a/Software/Graphics/Mobile/New Job/coats@2x.png b/Software/Graphics/Mobile/New Job/coats@2x.png new file mode 100644 index 000000000..4ffbc9780 Binary files /dev/null and b/Software/Graphics/Mobile/New Job/coats@2x.png differ diff --git a/Software/Graphics/Mobile/New Job/coats@3x.png b/Software/Graphics/Mobile/New Job/coats@3x.png new file mode 100644 index 000000000..929e86d98 Binary files /dev/null and b/Software/Graphics/Mobile/New Job/coats@3x.png differ diff --git a/Software/Graphics/Mobile/New Job/lab.png b/Software/Graphics/Mobile/New Job/lab.png new file mode 100644 index 000000000..607afd980 Binary files /dev/null and b/Software/Graphics/Mobile/New Job/lab.png differ diff --git a/Software/Graphics/Mobile/New Job/lab@2x.png b/Software/Graphics/Mobile/New Job/lab@2x.png new file mode 100644 index 000000000..4d7cd304d Binary files /dev/null and b/Software/Graphics/Mobile/New Job/lab@2x.png differ diff --git a/Software/Graphics/Mobile/New Job/lab@3x.png b/Software/Graphics/Mobile/New Job/lab@3x.png new file mode 100644 index 000000000..16daceae0 Binary files /dev/null and b/Software/Graphics/Mobile/New Job/lab@3x.png differ diff --git a/Software/Graphics/Mobile/New Job/length.png b/Software/Graphics/Mobile/New Job/length.png new file mode 100644 index 000000000..bad870dcb Binary files /dev/null and b/Software/Graphics/Mobile/New Job/length.png differ diff --git a/Software/Graphics/Mobile/New Job/rgb.png b/Software/Graphics/Mobile/New Job/rgb.png new file mode 100644 index 000000000..dfdf32c8d Binary files /dev/null and b/Software/Graphics/Mobile/New Job/rgb.png differ diff --git a/Software/Graphics/Mobile/New Job/rgb@2x.png b/Software/Graphics/Mobile/New Job/rgb@2x.png new file mode 100644 index 000000000..7fe365375 Binary files /dev/null and b/Software/Graphics/Mobile/New Job/rgb@2x.png differ diff --git a/Software/Graphics/Mobile/New Job/rgb@3x.png b/Software/Graphics/Mobile/New Job/rgb@3x.png new file mode 100644 index 000000000..f9036b7e9 Binary files /dev/null and b/Software/Graphics/Mobile/New Job/rgb@3x.png differ diff --git a/Software/Graphics/Mobile/New Job/threed@2x.png b/Software/Graphics/Mobile/New Job/threed@2x.png new file mode 100644 index 000000000..88b689da1 Binary files /dev/null and b/Software/Graphics/Mobile/New Job/threed@2x.png differ diff --git a/Software/Graphics/Mobile/New Job/threed@3x.png b/Software/Graphics/Mobile/New Job/threed@3x.png new file mode 100644 index 000000000..c357ce56b Binary files /dev/null and b/Software/Graphics/Mobile/New Job/threed@3x.png differ diff --git a/Software/Graphics/Mobile/New Job/twine.png b/Software/Graphics/Mobile/New Job/twine.png new file mode 100644 index 000000000..b1d3da8c5 Binary files /dev/null and b/Software/Graphics/Mobile/New Job/twine.png differ diff --git a/Software/Graphics/Mobile/New Job/twine@2x.png b/Software/Graphics/Mobile/New Job/twine@2x.png new file mode 100644 index 000000000..b59b7100a Binary files /dev/null and b/Software/Graphics/Mobile/New Job/twine@2x.png differ diff --git a/Software/Graphics/Mobile/New Job/twine@3x.png b/Software/Graphics/Mobile/New Job/twine@3x.png new file mode 100644 index 000000000..42b041eb8 Binary files /dev/null and b/Software/Graphics/Mobile/New Job/twine@3x.png differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsModule.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsModule.cs index e1e5c93ec..0ad826546 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsModule.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/EventsModule.cs @@ -47,7 +47,7 @@ namespace Tango.PPC.Events { get { - return ResourceHelper.GetImageFromResources("Images/events-module.png"); + return ResourceHelper.GetImageFromResources("Images/events.png"); } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Images/events.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Images/events.png new file mode 100644 index 000000000..53a767f8e Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Images/events.png differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Tango.PPC.Events.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Tango.PPC.Events.csproj index fa7583e85..815223834 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Tango.PPC.Events.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Tango.PPC.Events.csproj @@ -164,10 +164,13 @@ + + + - + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToImageConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToImageConverter.cs new file mode 100644 index 000000000..a74a87d28 --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToImageConverter.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; +using Tango.BL.Enumerations; +using Tango.SharedUI.Helpers; + +namespace Tango.PPC.Jobs.Converters +{ + public class ColorSpaceToImageConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value != null) + { + ColorSpaces colorSpace = (ColorSpaces)value; + + switch (colorSpace) + { + case ColorSpaces.RGB: + return ResourceHelper.GetImageFromResources("Images/NewJob/rgb.png"); + case ColorSpaces.LAB: + return ResourceHelper.GetImageFromResources("Images/NewJob/lab.png"); + case ColorSpaces.Twine: + return ResourceHelper.GetImageFromResources("Images/NewJob/twine.png"); + default: + return ResourceHelper.GetImageFromResources("Images/NewJob/coats.png"); + } + } + return null; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/JobCreationView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/JobCreationView.xaml index 1f48474aa..0e4f6e38c 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/JobCreationView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/JobCreationView.xaml @@ -9,26 +9,29 @@ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" mc:Ignorable="d" - Background="{StaticResource TangoPrimaryBackgroundBrush}" d:DesignHeight="555" d:DesignWidth="560" Width="550" Height="750" d:DataContext="{d:DesignInstance Type=local:JobCreationViewVM, IsDesignTimeCreatable=False}"> + Background="{StaticResource TangoPrimaryBackgroundBrush}" d:DesignHeight="555" d:DesignWidth="560" Width="570" Height="700" d:DataContext="{d:DesignInstance Type=local:JobCreationViewVM, IsDesignTimeCreatable=False}"> + - - CANCEL - CREATE + + CANCEL + CREATE + + + + New Job + Please select the job application and color space/catalog and press 'create'. - - - NEW JOB - Please select the job application and color space/catalog and press 'CREATE'. - + + @@ -36,10 +39,16 @@ @@ -48,37 +57,50 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/coats.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/coats.png new file mode 100644 index 000000000..d6cd3ecf2 Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/coats.png differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/lab.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/lab.png new file mode 100644 index 000000000..607afd980 Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/lab.png differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/rgb.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/rgb.png new file mode 100644 index 000000000..dfdf32c8d Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/rgb.png differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/twine.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/twine.png new file mode 100644 index 000000000..b1d3da8c5 Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/NewJob/twine.png differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/jobs.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/jobs.png new file mode 100644 index 000000000..eb668ad03 Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/jobs.png differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/length.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/length.png new file mode 100644 index 000000000..bad870dcb Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/length.png differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/JobsModule.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/JobsModule.cs index f15aad70c..b9e121f86 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/JobsModule.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/JobsModule.cs @@ -47,7 +47,7 @@ namespace Tango.PPC.Jobs { get { - return ResourceHelper.GetImageFromResources("Images/jobs-module.png"); + return ResourceHelper.GetImageFromResources("Images/jobs.png"); } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj index 34c4861ab..25d4507f6 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj @@ -155,6 +155,7 @@ TwineCatalogViewer.xaml + @@ -390,10 +391,22 @@ + + + + + + + + + + + + - + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs index 46c6d7ffd..01d83d0d0 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs @@ -32,6 +32,18 @@ namespace Tango.PPC.Jobs.ViewModels set { _job = value; RaisePropertyChangedAuto(); } } + private TimeSpan _estimatedDuration; + /// + /// Gets or sets the duration of the estimated. + /// + + public TimeSpan EstimatedDuration + { + get { return _estimatedDuration; } + set { _estimatedDuration = value; RaisePropertyChangedAuto(); } + } + + /// /// Gets or sets the dye command. /// @@ -57,10 +69,20 @@ namespace Tango.PPC.Jobs.ViewModels /// Handles the job selected message. /// /// The message. - private void HandleJobSelectedMessage(JobSelectedMessage message) + private async void HandleJobSelectedMessage(JobSelectedMessage message) { _context = message.Context; Job = message.Job; + + Job = await new JobBuilder(_context).Set(Job.Guid) + .WithConfiguration() + .WithRML() + .WithUser() + .WithSegments() + .WithBrushStops() + .BuildAsync(); + + EstimatedDuration = await Job.GetEstimatedDuration(); } /// @@ -81,16 +103,8 @@ namespace Tango.PPC.Jobs.ViewModels { LogManager.Log("Start job command pressed. Starting job and navigating to job progress view..."); - Job = await new JobBuilder(_context).Set(Job.Guid) - .WithConfiguration() - .WithRML() - .WithUser() - .WithSegments() - .WithBrushStops() - .BuildAsync(); - PrintingManager.Print(Job, _context); - await NavigationManager.NavigateTo(nameof(JobProgressView)); + await NavigationManager.NavigateTo(false, nameof(JobProgressView)); } catch (Exception ex) { diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs index d29323412..c87d3585b 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs @@ -271,7 +271,7 @@ namespace Tango.PPC.Jobs.ViewModels { LogManager.Log($"Job '{job.Name}' selected."); - if (!directlyToEdit) + if (!directlyToEdit && MachineProvider.MachineOperator.Status == Integration.Operation.MachineStatuses.ReadyToDye) { await NavigationManager.NavigateTo(nameof(JobSummeryView)); } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobSummeryView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobSummeryView.xaml index 27c3cb93a..ac2d5b3be 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobSummeryView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobSummeryView.xaml @@ -26,39 +26,76 @@ - - - - - - - - EDIT - - - - - DYE - - - - - - + + + + + + + + + EDIT + + + + + DYE + + + + + + - - - - - '' - is ready! - - Tap 'DYE' to start the dying process... - + + + + + + - - - + + + + + + + + + + + + + Length + + + + + m + + + + + + + + + Time + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobsView.xaml index 01d0c86a2..ace1d38af 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobsView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobsView.xaml @@ -54,8 +54,38 @@ - - + + + + + - + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Images/settings.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Images/settings.png new file mode 100644 index 000000000..fa268e53a Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Images/settings.png differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/MachineSettingsModule.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/MachineSettingsModule.cs index 53321b799..477340357 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/MachineSettingsModule.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/MachineSettingsModule.cs @@ -47,7 +47,7 @@ namespace Tango.PPC.MachineSettings { get { - return ResourceHelper.GetImageFromResources("Images/settings-module.png"); + return ResourceHelper.GetImageFromResources("Images/settings.png"); } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Tango.PPC.MachineSettings.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Tango.PPC.MachineSettings.csproj index 2b89c1e9b..00cc18382 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Tango.PPC.MachineSettings.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Tango.PPC.MachineSettings.csproj @@ -160,10 +160,13 @@ + + + - + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs index 246b86469..c858e982e 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs @@ -119,7 +119,7 @@ namespace Tango.PPC.MachineSettings.ViewModels { Machine.SupportedJobTypes = SelectedJobTypes.SynchedSource.ToList(); Machine.SupportedColorSpaces = SelectedColorSpaces.SynchedSource.ToList(); - Machine.MapPrimitivesWithStringsNoNullsTo(MachineProvider.Machine); + Machine.MapPrimitivesWithStrings(MachineProvider.Machine); Settings.EnableHotSpot = EnableHotSpot; Settings.HotSpotPassword = HotSpotPassword; diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Images/storage.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Images/storage.png new file mode 100644 index 000000000..619d9de34 Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Images/storage.png differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/StorageModule.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/StorageModule.cs index 6133ebb3c..b3553e666 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/StorageModule.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/StorageModule.cs @@ -47,7 +47,7 @@ namespace Tango.PPC.Storage { get { - return ResourceHelper.GetImageFromResources("Images/storage-module.png"); + return ResourceHelper.GetImageFromResources("Images/storage.png"); } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Tango.PPC.Storage.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Tango.PPC.Storage.csproj index b25af0348..e541c472b 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Tango.PPC.Storage.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Tango.PPC.Storage.csproj @@ -137,5 +137,8 @@ + + + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Menu/power.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Menu/power.png new file mode 100644 index 000000000..1f42d43a1 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Menu/power.png differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Menu/update.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Menu/update.png new file mode 100644 index 000000000..45f4608c9 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Menu/update.png differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/power-machine.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/power-machine.png new file mode 100644 index 000000000..5c8608b61 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/power-machine.png differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/power-tablet.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/power-tablet.png new file mode 100644 index 000000000..34191593c Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/power-tablet.png differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj index 1891139e9..1201c4ab0 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj @@ -274,6 +274,10 @@ + + + + @@ -370,10 +374,6 @@ {91b70e9b-66a7-4873-ae10-400e71cf404f} Tango.PPC.MachineSettings - - {1d0f15b7-c1f3-4b9e-b0bc-a5b9e50c91d0} - Tango.PPC.Power - {04febb02-f782-4b96-b47d-f6902afa43be} Tango.PPC.Storage @@ -509,7 +509,7 @@ del "$(TargetDir)firmware_package.tfp" - + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs index 52f0fb403..1c1eeca5e 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs @@ -38,7 +38,15 @@ namespace Tango.PPC.UI.ViewModels public bool IsMenuOpened { get { return _isMenuOpened; } - set { _isMenuOpened = value; RaisePropertyChangedAuto(); } + set + { + _isMenuOpened = value; RaisePropertyChangedAuto(); + + if (!_isMenuOpened) + { + IsPowerOpened = false; + } + } } private bool _isNotificationsOpened; @@ -48,7 +56,20 @@ namespace Tango.PPC.UI.ViewModels public bool IsNotificationsOpened { get { return _isNotificationsOpened; } - set { _isNotificationsOpened = value; RaisePropertyChangedAuto(); } + set + { + _isNotificationsOpened = value; RaisePropertyChangedAuto(); + } + } + + private bool _isPowerOpened; + /// + /// Gets or sets a value indicating whether the power area is opened. + /// + public bool IsPowerOpened + { + get { return _isPowerOpened; } + set { _isPowerOpened = value; RaisePropertyChangedAuto(); } } #endregion @@ -90,6 +111,10 @@ namespace Tango.PPC.UI.ViewModels /// public RelayCommand UpdateCommand { get; set; } + /// + /// Gets or sets the power command. + /// + public RelayCommand PowerCommand { get; set; } #endregion #region Constructors @@ -106,12 +131,14 @@ namespace Tango.PPC.UI.ViewModels StopPrintingCommand = new RelayCommand(StopPrinting); SignOutCommand = new RelayCommand(SignOut); - UpdateCommand = new RelayCommand(() => + UpdateCommand = new RelayCommand(() => { NavigationManager.NavigateTo(NavigationView.MachineUpdateView); TangoIOC.Default.GetInstance().CheckForUpdates(); IsMenuOpened = false; }); + + PowerCommand = new RelayCommand(() => IsPowerOpened = true); } #endregion diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml index 2743e5126..5d4428989 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml @@ -23,38 +23,38 @@ - + - + - + - - + + HorizontalAlignment="Right" + IsChecked="{Binding ElementName=menu,Path=IsOpened}" Foreground="{StaticResource TangoPrimaryAccentBrush}" /> - - + - - + + - - + + @@ -64,20 +64,18 @@ - - - + + - - Update + + Update - - + - + + + + + + + + + + + + + + + + + + + + + + + Turn Off + Stand By + + + + + + + + + + + + + Restart + + + + + + + + + + + + Power + + + + @@ -111,7 +208,7 @@ - + diff --git a/Software/Visual_Studio/Tango.BL/ColorConversion/TangoColorConverter.cs b/Software/Visual_Studio/Tango.BL/ColorConversion/TangoColorConverter.cs index e94dd851b..d44859413 100644 --- a/Software/Visual_Studio/Tango.BL/ColorConversion/TangoColorConverter.cs +++ b/Software/Visual_Studio/Tango.BL/ColorConversion/TangoColorConverter.cs @@ -184,7 +184,7 @@ namespace Tango.BL.ColorConversion min_standard = standard_stops.Select(x => GetSuggestions(x)).Select(x => x.SingleCoordinates).Min(x => x.ProcessParametersTableIndex); } - if (color_catalog_stops.Count() > 0) + if (color_catalog_stops.Where(x => x.ColorCatalog != null).Count() > 0) { min_catalog = color_catalog_stops.Where(x => x.ColorCatalog != null).Min(x => x.ColorCatalog.ProcessParametersTableIndex); } diff --git a/Software/Visual_Studio/Tango.BL/Entities/Job.cs b/Software/Visual_Studio/Tango.BL/Entities/Job.cs index 77f151fbc..d28f00613 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/Job.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/Job.cs @@ -463,6 +463,19 @@ namespace Tango.BL.Entities return TimeSpan.FromSeconds((LengthIncludingNumberOfUnits + processParameters.DryerBufferLength) / (processParameters.DyeingSpeed / 100d)); } + /// + /// Gets the duration estimation for this job. + /// + /// + public Task GetEstimatedDuration() + { + return Task.Factory.StartNew(() => + { + var process = GetRecommendedProcessParameters().Result; + return GetEstimatedDuration(process); + }); + } + /// /// Translates the job progress to time. /// @@ -497,6 +510,22 @@ namespace Tango.BL.Entities }; } + public Task GetRecommendedProcessParameters() + { + return Task.Factory.StartNew(() => + { + try + { + int index = ColorConversion.TangoColorConverter.GetLeastCommonProcessParametersTableIndex(Segments.SelectMany(x => x.BrushStops)); + return Rml.GetActiveProcessGroup().ProcessParametersTables[index]; + } + catch (Exception ex) + { + throw new InvalidOperationException("Could not calculate the recommended process parameters for the job.", ex); + } + }); + } + public Task ToJobFile() { return Task.Factory.StartNew(() => diff --git a/Software/Visual_Studio/Tango.BL/Entities/Rml.cs b/Software/Visual_Studio/Tango.BL/Entities/Rml.cs index f79fb6c5b..fd8f3d2d1 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/Rml.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/Rml.cs @@ -50,5 +50,10 @@ namespace Tango.BL.Entities return Color.FromRgb((byte)rgb.R, (byte)rgb.G, (byte)rgb.B); } } + + public ProcessParametersTablesGroup GetActiveProcessGroup() + { + return ProcessParametersTablesGroups.FirstOrDefault(x => x.Active); + } } } diff --git a/Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs b/Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs index 0ce3e8369..ce907b57b 100644 --- a/Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs +++ b/Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs @@ -96,6 +96,26 @@ public static class ObjectExtensions } } + /// + /// Maps the object properties values to the destination object including strings and without assigning null string values from the source. + /// + /// The source. + /// The destination. + public static void MapPrimitivesWithStrings(this object source, object destination) + { + foreach (var prop in source.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => x.PropertyType.IsPrimitive || x.PropertyType == typeof(String))) + { + var desProp = destination.GetType().GetProperty(prop.Name, BindingFlags.Public | BindingFlags.Instance); + + if (desProp != null && (desProp.PropertyType.IsPrimitive || desProp.PropertyType == typeof(String)) && desProp.SetMethod != null) + { + var value = prop.GetValue(source); + + desProp.SetValue(destination, value); + } + } + } + /// /// Maps the object properties values to the destination object. /// diff --git a/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml b/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml index 409006201..1a77b76be 100644 --- a/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml +++ b/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml @@ -14,7 +14,7 @@ #3b3e4a #FFFFFF - #c8cbd4 + #E7E8E9 #dbe0e8 #B8B8B8 @@ -54,6 +54,8 @@ #DDE7FD + #4E5470 + @@ -116,4 +118,6 @@ #F1F1F1 + + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml b/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml index b81e247de..387977e0a 100644 --- a/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml +++ b/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml @@ -22,4 +22,5 @@ 26 18 + 27 \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Touch/Styles/TouchToggleButton.xaml b/Software/Visual_Studio/Tango.Touch/Styles/TouchToggleButton.xaml index 02450ee95..edf25c256 100644 --- a/Software/Visual_Studio/Tango.Touch/Styles/TouchToggleButton.xaml +++ b/Software/Visual_Studio/Tango.Touch/Styles/TouchToggleButton.xaml @@ -18,7 +18,7 @@ - + -- cgit v1.3.1