aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-11-19 10:20:19 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-11-19 10:20:19 +0200
commit926844ac021bf0e95aa087ec9bf0a4444b3dabc7 (patch)
tree03cbf727699aff157d3fa77abc2f2d836469b63b /Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance
parent17df7aa5142e7336cdab3f5551ccd3fa66ce7c87 (diff)
downloadTango-926844ac021bf0e95aa087ec9bf0a4444b3dabc7.tar.gz
Tango-926844ac021bf0e95aa087ec9bf0a4444b3dabc7.zip
Added related animations to guides on PPC.
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/GuideBase.cs2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/HandleWasteCartridgeGuide.cs30
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/LoadInkCartridgeGuide.cs30
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/LoadNewThreadGuide.cs30
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/ReplaceAirFilterGuide.cs30
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/ReplaceThreadGuide.cs30
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Loading-New-Thread.gifbin0 -> 4467469 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Loading-an-Ink-Cartridge.gifbin0 -> 4197318 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Replacing-the-Air-Filter.gifbin0 -> 3500573 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Replacing-the-Thread.gifbin0 -> 13319358 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Residue-Cartridges-A.gifbin0 -> 3567850 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Tango.PPC.Maintenance.csproj11
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/GeneralGuideViewVM.cs11
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/GeneralGuideView.xaml6
14 files changed, 159 insertions, 21 deletions
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<GuideStep> Steps { get; }
protected virtual List<GuideStep> 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<GuideStep> 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<GuideStep> _steps;
+ public override List<GuideStep> 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<GuideStep> 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<GuideStep> _steps;
+ public override List<GuideStep> 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<GuideStep> 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<GuideStep> _steps;
+ public override List<GuideStep> 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<GuideStep> 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<GuideStep> _steps;
+ public override List<GuideStep> 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<GuideStep> 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<GuideStep> _steps;
+ public override List<GuideStep> 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
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Loading-New-Thread.gif
Binary files 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
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Loading-an-Ink-Cartridge.gif
Binary files 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
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Replacing-the-Air-Filter.gif
Binary files 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
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Replacing-the-Thread.gif
Binary files 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
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/Residue-Cartridges-A.gif
Binary files 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 @@
<ItemGroup>
<Resource Include="Images\Guides\replacing-the-thread.png" />
</ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\Guides\Loading-an-Ink-Cartridge.gif" />
+ <Resource Include="Images\Guides\Residue-Cartridges-A.gif" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\Guides\Replacing-the-Air-Filter.gif" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\Guides\Loading-New-Thread.gif" />
+ <Resource Include="Images\Guides\Replacing-the-Thread.gif" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
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<GuideBase>
{
+ 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 @@
<ItemsControl DockPanel.Dock="Top" ItemsSource="{Binding Guide.Steps}" AlternationCount="2">
<ItemsControl.ItemTemplate>
<DataTemplate>
- <Border x:Name="FooBar" Padding="20 10">
+ <Border x:Name="FooBar" Padding="20 5">
<DockPanel>
- <touch:TouchCheckBox Width="30" Height="30" DockPanel.Dock="Right" IsChecked="{Binding IsChecked}" />
+ <touch:TouchCheckBox Width="50" Padding="5 0 0 0" Height="50" DockPanel.Dock="Right" IsChecked="{Binding IsChecked,Mode=TwoWay}" />
<TextBlock VerticalAlignment="Center" FontSize="16" HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Text}"></TextBlock>
</DockPanel>
</Border>
@@ -46,7 +46,7 @@
</ItemsControl>
- <Image Margin="0 20 0 0" HorizontalAlignment="Left" VerticalAlignment="Center" Source="{Binding Guide.Image}" Stretch="Uniform"></Image>
+ <touch:TouchGifAnimation Margin="0 20 0 0" HorizontalAlignment="Left" VerticalAlignment="Bottom" EnableAnimation="{Binding IsVisible}" Source="{Binding Guide.Image}" Stretch="Uniform"></touch:TouchGifAnimation>
</DockPanel>
</touch:TouchDropShadowBorder>
</Grid>