From 926844ac021bf0e95aa087ec9bf0a4444b3dabc7 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 19 Nov 2019 10:20:19 +0200 Subject: Added related animations to guides on PPC. --- .../PPC/Modules/Tango.PPC.Maintenance/GuideBase.cs | 2 +- .../Guides/HandleWasteCartridgeGuide.cs | 30 ++++++++++++++++++--- .../Guides/LoadInkCartridgeGuide.cs | 30 ++++++++++++++++++--- .../Guides/LoadNewThreadGuide.cs | 30 ++++++++++++++++++--- .../Guides/ReplaceAirFilterGuide.cs | 30 ++++++++++++++++++--- .../Guides/ReplaceThreadGuide.cs | 30 ++++++++++++++++++--- .../Images/Guides/Loading-New-Thread.gif | Bin 0 -> 4467469 bytes .../Images/Guides/Loading-an-Ink-Cartridge.gif | Bin 0 -> 4197318 bytes .../Images/Guides/Replacing-the-Air-Filter.gif | Bin 0 -> 3500573 bytes .../Images/Guides/Replacing-the-Thread.gif | Bin 0 -> 13319358 bytes .../Images/Guides/Residue-Cartridges-A.gif | Bin 0 -> 3567850 bytes .../Tango.PPC.Maintenance.csproj | 11 ++++++++ .../ViewModels/GeneralGuideViewVM.cs | 11 ++++++-- .../Views/GeneralGuideView.xaml | 6 ++--- 14 files changed, 159 insertions(+), 21 deletions(-) create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Loading-New-Thread.gif create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Loading-an-Ink-Cartridge.gif create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Replacing-the-Air-Filter.gif create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Replacing-the-Thread.gif create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Residue-Cartridges-A.gif (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/GuideBase.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/GuideBase.cs index f016182d8..438375c72 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/GuideBase.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/GuideBase.cs @@ -12,7 +12,7 @@ namespace Tango.PPC.Maintenance { public abstract String Name { get; } public abstract BitmapSource Icon { get; } - public abstract BitmapSource Image { get; } + public abstract String Image { get; } public abstract List Steps { get; } protected virtual List GetStepsFromResource(String key) diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/HandleWasteCartridgeGuide.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/HandleWasteCartridgeGuide.cs index 0904728fb..a4820e349 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/HandleWasteCartridgeGuide.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/HandleWasteCartridgeGuide.cs @@ -12,8 +12,32 @@ namespace Tango.PPC.Maintenance.Guides public class HandleWasteCartridgeGuide : GuideBase { public override string Name => "Handling the Waste Cartridges"; - public override BitmapSource Icon => ResourceHelper.GetImageFromResources("Images/Guides/handling-the-waste-cartridges.png"); - public override BitmapSource Image => ResourceHelper.GetImageFromResources("Images/Guides/machine-image.png"); - public override List Steps => GetStepsFromResource("HandleWasteCartridge"); + public override String Image => "../Images/Guides/Residue-Cartridges-A.gif"; + + private BitmapSource _icon; + public override BitmapSource Icon + { + get + { + if (_icon == null) + { + _icon = ResourceHelper.GetImageFromResources("Images/Guides/handling-the-waste-cartridges.png"); + } + return _icon; + } + } + + private List _steps; + public override List Steps + { + get + { + if (_steps == null) + { + _steps = GetStepsFromResource("HandleWasteCartridge"); + } + return _steps; + } + } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/LoadInkCartridgeGuide.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/LoadInkCartridgeGuide.cs index d100b25a0..1a6ed8321 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/LoadInkCartridgeGuide.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/LoadInkCartridgeGuide.cs @@ -12,8 +12,32 @@ namespace Tango.PPC.Maintenance.Guides public class LoadInkCartridgeGuide : GuideBase { public override string Name => "Loading an Ink Cartridge"; - public override BitmapSource Icon => ResourceHelper.GetImageFromResources("Images/Guides/loading-an-ink-cartridge.png"); - public override BitmapSource Image => ResourceHelper.GetImageFromResources("Images/Guides/machine-image.png"); - public override List Steps => GetStepsFromResource("LoadInkCartridge"); + public override String Image => "../Images/Guides/Loading-an-Ink-Cartridge.gif"; + + private BitmapSource _icon; + public override BitmapSource Icon + { + get + { + if (_icon == null) + { + _icon = ResourceHelper.GetImageFromResources("Images/Guides/loading-an-ink-cartridge.png"); + } + return _icon; + } + } + + private List _steps; + public override List Steps + { + get + { + if (_steps == null) + { + _steps = GetStepsFromResource("LoadInkCartridge"); + } + return _steps; + } + } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/LoadNewThreadGuide.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/LoadNewThreadGuide.cs index b32be18cd..d5115a748 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/LoadNewThreadGuide.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/LoadNewThreadGuide.cs @@ -12,8 +12,32 @@ namespace Tango.PPC.Maintenance.Guides public class LoadNewThreadGuide : GuideBase { public override string Name => "Loading New Thread"; - public override BitmapSource Icon => ResourceHelper.GetImageFromResources("Images/Guides/loading-new-thread.png"); - public override BitmapSource Image => ResourceHelper.GetImageFromResources("Images/Guides/machine-image.png"); - public override List Steps => GetStepsFromResource("LoadNewThread"); + public override String Image => "../Images/Guides/Loading-New-Thread.gif"; + + private BitmapSource _icon; + public override BitmapSource Icon + { + get + { + if (_icon == null) + { + _icon = ResourceHelper.GetImageFromResources("Images/Guides/loading-new-thread.png"); + } + return _icon; + } + } + + private List _steps; + public override List Steps + { + get + { + if (_steps == null) + { + _steps = GetStepsFromResource("LoadNewThread"); + } + return _steps; + } + } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/ReplaceAirFilterGuide.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/ReplaceAirFilterGuide.cs index 57f60fd79..d335867ca 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/ReplaceAirFilterGuide.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/ReplaceAirFilterGuide.cs @@ -12,8 +12,32 @@ namespace Tango.PPC.Maintenance.Guides public class ReplaceAirFilterGuide : GuideBase { public override string Name => "Replacing the Air Filter"; - public override BitmapSource Icon => ResourceHelper.GetImageFromResources("Images/Guides/replacing-the-air-filter.png"); - public override BitmapSource Image => ResourceHelper.GetImageFromResources("Images/Guides/machine-image.png"); - public override List Steps => GetStepsFromResource("ReplaceAirFilter"); + public override String Image => "../Images/Guides/Replacing-the-Air-Filter.gif"; + + private BitmapSource _icon; + public override BitmapSource Icon + { + get + { + if (_icon == null) + { + _icon = ResourceHelper.GetImageFromResources("Images/Guides/replacing-the-air-filter.png"); + } + return _icon; + } + } + + private List _steps; + public override List Steps + { + get + { + if (_steps == null) + { + _steps = GetStepsFromResource("ReplaceAirFilter"); + } + return _steps; + } + } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/ReplaceThreadGuide.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/ReplaceThreadGuide.cs index 781f3351a..ecc3f6026 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/ReplaceThreadGuide.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/ReplaceThreadGuide.cs @@ -12,8 +12,32 @@ namespace Tango.PPC.Maintenance.Guides public class ReplaceThreadGuide : GuideBase { public override string Name => "Replacing the Thread"; - public override BitmapSource Icon => ResourceHelper.GetImageFromResources("Images/Guides/replacing-the-thread.png"); - public override BitmapSource Image => ResourceHelper.GetImageFromResources("Images/Guides/machine-image.png"); - public override List Steps => GetStepsFromResource("ReplaceThread"); + public override String Image => "../Images/Guides/Replacing-the-Thread.gif"; + + private BitmapSource _icon; + public override BitmapSource Icon + { + get + { + if (_icon == null) + { + _icon = ResourceHelper.GetImageFromResources("Images/Guides/replacing-the-thread.png"); + } + return _icon; + } + } + + private List _steps; + public override List Steps + { + get + { + if (_steps == null) + { + _steps = GetStepsFromResource("ReplaceThread"); + } + return _steps; + } + } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Loading-New-Thread.gif b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Loading-New-Thread.gif new file mode 100644 index 000000000..a89f37004 Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Loading-New-Thread.gif differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Loading-an-Ink-Cartridge.gif b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Loading-an-Ink-Cartridge.gif new file mode 100644 index 000000000..7087ebc64 Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Loading-an-Ink-Cartridge.gif differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Replacing-the-Air-Filter.gif b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Replacing-the-Air-Filter.gif new file mode 100644 index 000000000..023adb4a9 Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Replacing-the-Air-Filter.gif differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Replacing-the-Thread.gif b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Replacing-the-Thread.gif new file mode 100644 index 000000000..8ab544d8b Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Replacing-the-Thread.gif differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Residue-Cartridges-A.gif b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Residue-Cartridges-A.gif new file mode 100644 index 000000000..c310820b4 Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Residue-Cartridges-A.gif differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Tango.PPC.Maintenance.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Tango.PPC.Maintenance.csproj index b342b5a87..e7131fe80 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Tango.PPC.Maintenance.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Tango.PPC.Maintenance.csproj @@ -210,6 +210,17 @@ + + + + + + + + + + + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/GeneralGuideViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/GeneralGuideViewVM.cs index 1149da103..fd0475817 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/GeneralGuideViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/GeneralGuideViewVM.cs @@ -10,6 +10,8 @@ namespace Tango.PPC.Maintenance.ViewModels { public class GeneralGuideViewVM : PPCViewModel, INavigationObjectReceiver { + private DateTime _lastTime; + private GuideBase _guide; public GuideBase Guide { @@ -20,14 +22,19 @@ namespace Tango.PPC.Maintenance.ViewModels public override void OnApplicationStarted() { - + _lastTime = DateTime.Now; } public void OnNavigatedToWithObject(GuideBase guide) { - guide.Steps.ForEach(x => x.IsChecked = false); + if (Guide != guide || (DateTime.Now - _lastTime) > TimeSpan.FromHours(1)) + { + guide.Steps.ForEach(x => x.IsChecked = false); + } Guide = guide; + + _lastTime = DateTime.Now; } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/GeneralGuideView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/GeneralGuideView.xaml index 9d57952c5..ecff03b58 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/GeneralGuideView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/GeneralGuideView.xaml @@ -27,9 +27,9 @@ - + - + @@ -46,7 +46,7 @@ - + -- cgit v1.3.1