aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2020-01-27 09:19:11 +0200
committerShlomo Hecht <shlomo@twine-s.com>2020-01-27 09:19:11 +0200
commitddda6089bff56e80703c8d2dce297919edc58bf1 (patch)
tree7702c5cf169124d522eacc7f1a9e0878373baedd /Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance
parent1d4d327571d4c0c9f4e17411551bd4dae1e2aed0 (diff)
parentbf2f3245339b9fd9148a2ad25b5ba3320e970cc1 (diff)
downloadTango-ddda6089bff56e80703c8d2dce297919edc58bf1.tar.gz
Tango-ddda6089bff56e80703c8d2dce297919edc58bf1.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/App.xaml11
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/LiquidTypeToBrushConverter.cs52
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/MidTankLevelToElementHeightConverter.cs34
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/StringToFirstLetterConverter.cs30
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/GuideBase.cs35
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/GuideStep.cs21
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/HandleWasteCartridgeGuide.cs43
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/LoadInkCartridgeGuide.cs43
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/LoadNewThreadGuide.cs43
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/ReplaceAirFilterGuide.cs43
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/ReplaceThreadGuide.cs43
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Helpers/GuideHelper.cs33
-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/Images/Guides/handling-the-waste-cartridges.pngbin0 -> 2174 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/loading-an-ink-cartridge.pngbin0 -> 2266 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/loading-new-thread.pngbin0 -> 2228 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/machine-image.pngbin0 -> 138220 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/replacing-the-air-filter.pngbin0 -> 2269 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/replacing-the-thread.pngbin0 -> 2175 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/action.pngbin0 -> 1152 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cl-full.pngbin0 -> 3454 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cone-empty.pngbin0 -> 2174 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cone-full.pngbin0 -> 1752 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/guides.pngbin0 -> 2099 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/inks.pngbin0 -> 2075 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/l-full.pngbin0 -> 19717 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/lubricant2.pngbin0 -> 194234 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/maintenance.pngbin0 -> 686 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/status.pngbin0 -> 1663 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-green.pngbin0 -> 926 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-red.pngbin0 -> 928 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-yellow.pngbin0 -> 927 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/MaintenanceModule.cs84
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Models/MidTankLevelModel.cs35
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Models/OverallTemperatureModel.cs30
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/AssemblyInfo.cs20
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Resources.Designer.cs63
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Resources.resx117
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Settings.Designer.cs26
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Settings.settings7
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Resources/Guides.xaml60
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Tango.PPC.Maintenance.csproj274
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModelLocator.cs56
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/GeneralGuideViewVM.cs40
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MainViewVM.cs31
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs244
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/GeneralGuideView.xaml55
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/GeneralGuideView.xaml.cs33
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MainView.xaml22
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MainView.xaml.cs28
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml215
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml.cs30
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/app.config61
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/packages.config11
58 files changed, 1973 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/App.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/App.xaml
new file mode 100644
index 000000000..cb7592abd
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/App.xaml
@@ -0,0 +1,11 @@
+<Application x:Class="Tango.PPC.Maintenance.App"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+ <Application.Resources>
+ <ResourceDictionary>
+ <ResourceDictionary.MergedDictionaries>
+ <ResourceDictionary Source="pack://application:,,,/Tango.PPC.Common;component/Resources/Merged.xaml" />
+ </ResourceDictionary.MergedDictionaries>
+ </ResourceDictionary>
+ </Application.Resources>
+</Application> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/LiquidTypeToBrushConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/LiquidTypeToBrushConverter.cs
new file mode 100644
index 000000000..c7e828148
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/LiquidTypeToBrushConverter.cs
@@ -0,0 +1,52 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using Tango.BL.Entities;
+using Tango.SharedUI.Helpers;
+
+namespace Tango.PPC.Maintenance.Converters
+{
+ public class LiquidTypeToBrushConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value is LiquidType)
+ {
+ LiquidType type = value as LiquidType;
+ if (type.Type == BL.Enumerations.LiquidTypes.Lubricant)
+ {
+ ImageBrush lubricantBrush = new ImageBrush() { Stretch = Stretch.None, TileMode = TileMode.Tile, ViewportUnits = BrushMappingMode.Absolute };
+ lubricantBrush.ImageSource = ResourceHelper.GetImageFromResources(@"Images/lubricant2.png");
+ lubricantBrush.Viewport = new System.Windows.Rect(lubricantBrush.ImageSource.Width/3, lubricantBrush.ImageSource.Height/3, lubricantBrush.ImageSource.Width, lubricantBrush.ImageSource.Height);
+ return lubricantBrush;
+ }
+ if (type.Type == BL.Enumerations.LiquidTypes.Cleaner)
+ {
+ ImageBrush cleanerBrush = new ImageBrush(){ Stretch = Stretch.None, TileMode = TileMode.Tile, ViewportUnits = BrushMappingMode.Absolute };
+ cleanerBrush.ImageSource = ResourceHelper.GetImageFromResources(@"Images/cl-full.png");
+ cleanerBrush.Viewport = new System.Windows.Rect(5, 5, cleanerBrush.ImageSource.Width, cleanerBrush.ImageSource.Height);
+ return cleanerBrush;
+ }
+ else
+ {
+ return new SolidColorBrush(type.LiquidTypeColor); ;
+ }
+ }
+ 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.Maintenance/Converters/MidTankLevelToElementHeightConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/MidTankLevelToElementHeightConverter.cs
new file mode 100644
index 000000000..94d1ed8b8
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/MidTankLevelToElementHeightConverter.cs
@@ -0,0 +1,34 @@
+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.Integration.Operation;
+
+namespace Tango.PPC.Maintenance.Converters
+{
+ public class MidTankLevelToElementHeightConverter : IMultiValueConverter
+ {
+ public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
+ {
+ try
+ {
+ double parentActualHeight = (double)values[0];
+ double midTankLevel = Math.Min((double)values[1], MachineOperator.MAX_MIDTANK_LITERS);
+ //var test = (parentActualHeight - (midTankLevel / MachineOperator.MAX_MIDTANK_LITERS) * parentActualHeight);
+ return (parentActualHeight - (midTankLevel / MachineOperator.MAX_MIDTANK_LITERS) * parentActualHeight);
+ }
+ catch
+ {
+ return 0d;
+ }
+ }
+
+ public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/StringToFirstLetterConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/StringToFirstLetterConverter.cs
new file mode 100644
index 000000000..0922af78d
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/StringToFirstLetterConverter.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace Tango.PPC.Maintenance.Converters
+{
+ public class StringToFirstLetterConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value != null && value.ToString().Length > 1)
+ {
+ return value.ToString().First().ToString();
+ }
+ else
+ {
+ return value;
+ }
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/GuideBase.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/GuideBase.cs
new file mode 100644
index 000000000..438375c72
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/GuideBase.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Media.Imaging;
+
+namespace Tango.PPC.Maintenance
+{
+ public abstract class GuideBase
+ {
+ public abstract String Name { get; }
+ public abstract BitmapSource Icon { get; }
+ public abstract String Image { get; }
+ public abstract List<GuideStep> Steps { get; }
+
+ protected virtual List<GuideStep> GetStepsFromResource(String key)
+ {
+ List<GuideStep> list = new List<GuideStep>();
+
+ var arr = (Application.Current.Resources[key] as Array);
+
+ foreach (var item in arr)
+ {
+ list.Add(new GuideStep()
+ {
+ Text = item
+ });
+ }
+
+ return list;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/GuideStep.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/GuideStep.cs
new file mode 100644
index 000000000..71a70d9db
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/GuideStep.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Core;
+
+namespace Tango.PPC.Maintenance
+{
+ public class GuideStep : ExtendedObject
+ {
+ public Object Text { get; set; }
+
+ private bool _isChecked;
+ public bool IsChecked
+ {
+ get { return _isChecked; }
+ set { _isChecked = value; RaisePropertyChangedAuto(); }
+ }
+ }
+}
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
new file mode 100644
index 000000000..a4820e349
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/HandleWasteCartridgeGuide.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Media.Imaging;
+using Tango.SharedUI.Helpers;
+
+namespace Tango.PPC.Maintenance.Guides
+{
+ public class HandleWasteCartridgeGuide : GuideBase
+ {
+ public override string Name => "Handling the Waste Cartridges";
+ 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
new file mode 100644
index 000000000..1a6ed8321
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/LoadInkCartridgeGuide.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Media.Imaging;
+using Tango.SharedUI.Helpers;
+
+namespace Tango.PPC.Maintenance.Guides
+{
+ public class LoadInkCartridgeGuide : GuideBase
+ {
+ public override string Name => "Loading an Ink Cartridge";
+ 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
new file mode 100644
index 000000000..d5115a748
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/LoadNewThreadGuide.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Media.Imaging;
+using Tango.SharedUI.Helpers;
+
+namespace Tango.PPC.Maintenance.Guides
+{
+ public class LoadNewThreadGuide : GuideBase
+ {
+ public override string Name => "Loading New Thread";
+ 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
new file mode 100644
index 000000000..d335867ca
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/ReplaceAirFilterGuide.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Media.Imaging;
+using Tango.SharedUI.Helpers;
+
+namespace Tango.PPC.Maintenance.Guides
+{
+ public class ReplaceAirFilterGuide : GuideBase
+ {
+ public override string Name => "Replacing the Air Filter";
+ 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
new file mode 100644
index 000000000..ecc3f6026
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Guides/ReplaceThreadGuide.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Media.Imaging;
+using Tango.SharedUI.Helpers;
+
+namespace Tango.PPC.Maintenance.Guides
+{
+ public class ReplaceThreadGuide : GuideBase
+ {
+ public override string Name => "Replacing the Thread";
+ 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/Helpers/GuideHelper.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Helpers/GuideHelper.cs
new file mode 100644
index 000000000..32518974d
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Helpers/GuideHelper.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace Tango.PPC.Maintenance.Helpers
+{
+ public static class GuideHelper
+ {
+ public static List<GuideBase> CreateAllGuides()
+ {
+ var resource = new ResourceDictionary
+ {
+ Source = new Uri("/Tango.PPC.Maintenance;component/Resources/Guides.xaml", UriKind.RelativeOrAbsolute)
+ };
+
+ Application.Current.Resources.MergedDictionaries.Add(resource);
+
+ List<GuideBase> guides = new List<GuideBase>();
+
+ var callingAssembly = typeof(GuideHelper).Assembly;
+
+ foreach (var guideType in callingAssembly.DefinedTypes.Where(x => x.Namespace == "Tango.PPC.Maintenance.Guides"))
+ {
+ guides.Add(Activator.CreateInstance(guideType) as GuideBase);
+ }
+
+ return guides;
+ }
+ }
+}
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/Images/Guides/handling-the-waste-cartridges.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/handling-the-waste-cartridges.png
new file mode 100644
index 000000000..188e881bb
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/handling-the-waste-cartridges.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/loading-an-ink-cartridge.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/loading-an-ink-cartridge.png
new file mode 100644
index 000000000..4f4dfc375
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/loading-an-ink-cartridge.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/loading-new-thread.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/loading-new-thread.png
new file mode 100644
index 000000000..1f508261b
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/loading-new-thread.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/machine-image.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/machine-image.png
new file mode 100644
index 000000000..277599070
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/machine-image.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/replacing-the-air-filter.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/replacing-the-air-filter.png
new file mode 100644
index 000000000..eb8f518a3
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/replacing-the-air-filter.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/replacing-the-thread.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/replacing-the-thread.png
new file mode 100644
index 000000000..e858c3075
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/Guides/replacing-the-thread.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/action.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/action.png
new file mode 100644
index 000000000..6d14ec5dc
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/action.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cl-full.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cl-full.png
new file mode 100644
index 000000000..5aaea8e6c
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cl-full.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cone-empty.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cone-empty.png
new file mode 100644
index 000000000..d65b8f793
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cone-empty.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cone-full.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cone-full.png
new file mode 100644
index 000000000..c42abf56e
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/cone-full.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/guides.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/guides.png
new file mode 100644
index 000000000..13b9013d7
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/guides.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/inks.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/inks.png
new file mode 100644
index 000000000..3872a77e4
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/inks.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/l-full.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/l-full.png
new file mode 100644
index 000000000..2607f4a26
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/l-full.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/lubricant2.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/lubricant2.png
new file mode 100644
index 000000000..554c16305
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/lubricant2.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/maintenance.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/maintenance.png
new file mode 100644
index 000000000..526284750
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/maintenance.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/status.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/status.png
new file mode 100644
index 000000000..0cc205a6c
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/status.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-green.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-green.png
new file mode 100644
index 000000000..f67323dde
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-green.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-red.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-red.png
new file mode 100644
index 000000000..5e6b505a3
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-red.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-yellow.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-yellow.png
new file mode 100644
index 000000000..359e93d6d
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Images/temperature-yellow.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/MaintenanceModule.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/MaintenanceModule.cs
new file mode 100644
index 000000000..18871ac78
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/MaintenanceModule.cs
@@ -0,0 +1,84 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media.Imaging;
+using Tango.BL.Enumerations;
+using Tango.PPC.Common;
+using Tango.PPC.Maintenance.Views;
+using Tango.SharedUI.Helpers;
+
+namespace Tango.PPC.Maintenance
+{
+ /// <summary>
+ /// Represents a PPC <see cref="MaintenanceModule"/>.
+ /// </summary>
+ /// <seealso cref="Tango.PPC.Common.PPCModuleBase" />
+ [PPCModule(3)]
+ public class MaintenanceModule : PPCModuleBase
+ {
+ /// <summary>
+ /// Gets the module name.
+ /// </summary>
+ public override string Name
+ {
+ get
+ {
+ return "Maintenance";
+ }
+ }
+
+ /// <summary>
+ /// Gets the module description.
+ /// </summary>
+ public override string Description
+ {
+ get
+ {
+ return "PPC maintenance module.";
+ }
+ }
+
+ /// <summary>
+ /// Gets the module cover image.
+ /// </summary>
+ public override BitmapSource Image
+ {
+ get
+ {
+ return ResourceHelper.GetImageFromResources("Images/maintenance.png");
+ }
+ }
+
+ /// <summary>
+ /// Gets the module entry point view type.
+ /// </summary>
+ public override Type MainViewType
+ {
+ get
+ {
+ return typeof(MainView);
+ }
+ }
+
+ /// <summary>
+ /// Gets the permission required to see and load this module.
+ /// </summary>
+ public override Permissions Permission
+ {
+ get
+ {
+ return Permissions.RunPPC;
+ }
+ }
+
+ /// <summary>
+ /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
+ /// </summary>
+ public override void Dispose()
+ {
+ //Dispose module here...
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Models/MidTankLevelModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Models/MidTankLevelModel.cs
new file mode 100644
index 000000000..93af310ba
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Models/MidTankLevelModel.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL.Entities;
+using Tango.Core;
+using Tango.Integration.Operation;
+
+namespace Tango.PPC.Maintenance.Models
+{
+ public class MidTankLevelModel : ExtendedObject
+ {
+ public double Max { get; set; }
+
+ private double _level;
+ public double Level
+ {
+ get { return _level; }
+ set { _level = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(IsLow)); RaisePropertyChanged(nameof(IsEmpty)); }
+ }
+
+ public bool IsLow
+ {
+ get { return Level <= MachineOperator.LOW_MIDTANK_LITERS; }
+ }
+
+ public bool IsEmpty
+ {
+ get { return Level <= MachineOperator.EMPTY_MIDTANK_LITERS; }
+ }
+
+ public IdsPack IDSPack { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Models/OverallTemperatureModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Models/OverallTemperatureModel.cs
new file mode 100644
index 000000000..694071d0d
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Models/OverallTemperatureModel.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Core;
+using Tango.Integration.Operation;
+
+namespace Tango.PPC.Maintenance.Models
+{
+ public class OverallTemperatureModel : ExtendedObject
+ {
+ private double _temperature;
+ public double Temperature
+ {
+ get { return _temperature; }
+ set { _temperature = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(IsWarning)); RaisePropertyChanged(nameof(IsError)); }
+ }
+
+ public bool IsWarning
+ {
+ get { return Temperature > MachineOperator.OVERALL_TEMPERATURE_WARNING; }
+ }
+
+ public bool IsError
+ {
+ get { return Temperature >= MachineOperator.OVERALL_TEMPERATURE_ERROR; }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..52774bee8
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/AssemblyInfo.cs
@@ -0,0 +1,20 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Tango Module")]
+[assembly: AssemblyVersion("2.0.1.1407")]
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Resources.Designer.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Resources.Designer.cs
new file mode 100644
index 000000000..003dc17e5
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Resources.Designer.cs
@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.PPC.Maintenance.Properties {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.PPC.Maintenance.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Resources.resx b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Resources.resx
new file mode 100644
index 000000000..af7dbebba
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Resources.resx
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Settings.Designer.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Settings.Designer.cs
new file mode 100644
index 000000000..7b549e7b7
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Settings.Designer.cs
@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.PPC.Maintenance.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default {
+ get {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Settings.settings b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Settings.settings
new file mode 100644
index 000000000..033d7a5e9
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Properties/Settings.settings
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
+ <Profiles>
+ <Profile Name="(Default)" />
+ </Profiles>
+ <Settings />
+</SettingsFile> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Resources/Guides.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Resources/Guides.xaml
new file mode 100644
index 000000000..24e1e0d71
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Resources/Guides.xaml
@@ -0,0 +1,60 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:sys="clr-namespace:System;assembly=mscorlib"
+ xmlns:local="clr-namespace:Tango.PPC.Maintenance.Resources">
+
+ <x:Array x:Key="LoadNewThread" Type="sys:String">
+ <sys:String>1. Loading New Thread</sys:String>
+ <sys:String>2. Wait for a message indicating the system is ready to load the thread</sys:String>
+ <sys:String>3. Place a cone with un-dyed thread into the thread feeding unit</sys:String>
+ <sys:String>4. Feed the thread along the thread groove to the winder</sys:String>
+ <sys:String>5. Place an empty collecting cone into the thread winder</sys:String>
+ <sys:String>6. Insert the end of the thread into the empty collecting cone</sys:String>
+ <sys:String>7. On the TS-1800 panel, press LOAD again</sys:String>
+ </x:Array>
+
+ <x:Array x:Key="HandleWasteCartridge" Type="sys:String">
+ <sys:String>1. On the TS-1800 panel, press LOAD</sys:String>
+ <sys:String>2. Wait for a message indicating the system is ready to load the thread</sys:String>
+ <sys:String>3. Place a cone with un-dyed thread into the thread feeding unit</sys:String>
+ <sys:String>4. Feed the tread along the feeding path up to the top cover</sys:String>
+ <sys:String>5. Feed the thread along the thread groove to the winder</sys:String>
+ <sys:String>6. Place an empty collecting cone into the thread winder</sys:String>
+ <sys:String>7. Insert the end of the thread into the empty collecting cone</sys:String>
+ <sys:String>8. On the TS-1800 panel, press LOAD again</sys:String>
+ </x:Array>
+
+ <x:Array x:Key="ReplaceThread" Type="sys:String">
+ <sys:String>1. Cut the current thread just after the feeding cone</sys:String>
+ <sys:String>2. Remove the current feeding cone</sys:String>
+ <sys:String>3. Place the new feeding cone into the thread feeding unit</sys:String>
+ <sys:String>4. Tie the new thread to the current thread</sys:String>
+ <sys:String>5. Cut off the ends of the thread leaving a small knot</sys:String>
+ <sys:String>6. On the TS-1800 panel, press and hold the JOG button</sys:String>
+ <sys:String>7. Hold the JOG button until the knot appears at the collecting cone</sys:String>
+ <sys:String>8. Cut the thread at the collecting cone after the knot</sys:String>
+ <sys:String>9. Remove the collecting cone</sys:String>
+ <sys:String>10. Place an empty collecting cone into the winder</sys:String>
+ <sys:String>11. Insert the end of the new thread into the empty collecting cone</sys:String>
+ </x:Array>
+
+ <x:Array x:Key="ReplaceAirFilter" Type="sys:String">
+ <sys:String>1. Open the air filter cover</sys:String>
+ <sys:String>2. Remove the old air filter</sys:String>
+ <sys:String>3. Insert a new air filter</sys:String>
+ <sys:String>4. Close the air filter cover</sys:String>
+ </x:Array>
+
+ <x:Array x:Key="LoadInkCartridge" Type="sys:String">
+ <sys:String>1. Open the cartridge cover</sys:String>
+ <sys:String>2. Insert a full ink cartridge into the ink-loading slot</sys:String>
+ <sys:String>3. Close the cartridge cover</sys:String>
+ <sys:String>4. When ink loading is complete, open the cartridge cover</sys:String>
+ <sys:String>5. Remove the empty ink cartridge</sys:String>
+ <sys:String>6. Remove the stopper from the residue-filling opening</sys:String>
+ <sys:String>7. Place the stopper into its allocated position on the top side of the empty ink cartridge</sys:String>
+ <sys:String>8. Put the empty ink cartridge into storage. Optional: if an empty recycling slot is available</sys:String>
+ <sys:String>9. Insert the empty ink cartridge into the slot for ink recycling</sys:String>
+ </x:Array>
+
+</ResourceDictionary> \ No newline at end of file
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
new file mode 100644
index 000000000..3f9f7c7b9
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Tango.PPC.Maintenance.csproj
@@ -0,0 +1,274 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{011470AC-6BD6-4366-B5F2-C82C065D4A84}</ProjectGuid>
+ <OutputType>library</OutputType>
+ <RootNamespace>Tango.PPC.Maintenance</RootNamespace>
+ <AssemblyName>Tango.PPC.Maintenance</AssemblyName>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <WarningLevel>4</WarningLevel>
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\..\Build\PPC\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\..\Build\PPC\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.dll</HintPath>
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
+ </Reference>
+ <Reference Include="FontAwesome.WPF, Version=4.7.0.37774, Culture=neutral, PublicKeyToken=0758b07a11a4f466, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\FontAwesome.WPF.4.7.0.9\lib\net40\FontAwesome.WPF.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>
+ <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>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.DataAnnotations" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Reactive.Core, Version=3.0.3000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\System.Reactive.Core.3.1.1\lib\net46\System.Reactive.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Reactive.Interfaces, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\System.Reactive.Interfaces.3.1.1\lib\net45\System.Reactive.Interfaces.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Reactive.Linq, Version=3.0.3000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\System.Reactive.Linq.3.1.1\lib\net46\System.Reactive.Linq.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Xml" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="System.Net.Http" />
+ <Reference Include="System.Xaml">
+ <RequiredTargetFramework>4.0</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="WindowsBase" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
+ </ItemGroup>
+ <ItemGroup>
+ <Page Include="App.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Resources\Guides.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Views\GeneralGuideView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Views\MaintenanceView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\MainView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\..\..\Versioning\GlobalVersionInfo.cs">
+ <Link>GlobalVersionInfo.cs</Link>
+ </Compile>
+ <Compile Include="Converters\LiquidTypeToBrushConverter.cs" />
+ <Compile Include="Converters\MidTankLevelToElementHeightConverter.cs" />
+ <Compile Include="Converters\StringToFirstLetterConverter.cs" />
+ <Compile Include="GuideBase.cs" />
+ <Compile Include="GuideStep.cs" />
+ <Compile Include="Guides\LoadInkCartridgeGuide.cs" />
+ <Compile Include="Guides\ReplaceAirFilterGuide.cs" />
+ <Compile Include="Guides\ReplaceThreadGuide.cs" />
+ <Compile Include="Guides\HandleWasteCartridgeGuide.cs" />
+ <Compile Include="Guides\LoadNewThreadGuide.cs" />
+ <Compile Include="Helpers\GuideHelper.cs" />
+ <Compile Include="MaintenanceModule.cs" />
+ <Compile Include="Models\MidTankLevelModel.cs" />
+ <Compile Include="Models\OverallTemperatureModel.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Settings.settings</DependentUpon>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ </Compile>
+ <Compile Include="ViewModelLocator.cs" />
+ <Compile Include="ViewModels\GeneralGuideViewVM.cs" />
+ <Compile Include="ViewModels\MaintenanceViewVM.cs" />
+ <Compile Include="ViewModels\MainViewVM.cs" />
+ <Compile Include="Views\GeneralGuideView.xaml.cs">
+ <DependentUpon>GeneralGuideView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\MaintenanceView.xaml.cs">
+ <DependentUpon>MaintenanceView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\MainView.xaml.cs">
+ <DependentUpon>MainView.xaml</DependentUpon>
+ </Compile>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ <None Include="app.config">
+ <SubType>Designer</SubType>
+ </None>
+ <None Include="packages.config" />
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Tango.BL\Tango.BL.csproj">
+ <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project>
+ <Name>Tango.BL</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Core\Tango.Core.csproj">
+ <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project>
+ <Name>Tango.Core</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.DragAndDrop\Tango.DragAndDrop.csproj">
+ <Project>{b112d89a-a106-41ae-a0c1-4abc84c477f5}</Project>
+ <Name>Tango.DragAndDrop</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Explorer\Tango.Explorer.csproj">
+ <Project>{4399af76-db52-4cfb-8020-6f85bdb29fd5}</Project>
+ <Name>Tango.Explorer</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Integration\Tango.Integration.csproj">
+ <Project>{4206ac58-3b57-4699-8835-90bf6db01a61}</Project>
+ <Name>Tango.Integration</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Logging\Tango.Logging.csproj">
+ <Project>{bc932dbd-7cdb-488c-99e4-f02cf441f55e}</Project>
+ <Name>Tango.Logging</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.PMR\Tango.PMR.csproj">
+ <Project>{e4927038-348d-4295-aaf4-861c58cb3943}</Project>
+ <Name>Tango.PMR</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Settings\Tango.Settings.csproj">
+ <Project>{d8f1ad85-526a-4f50-b6dc-d437af63d8d8}</Project>
+ <Name>Tango.Settings</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.SharedUI\Tango.SharedUI.csproj">
+ <Project>{8491d07b-c1f6-4b62-a412-41b9fd2d6538}</Project>
+ <Name>Tango.SharedUI</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Touch\Tango.Touch.csproj">
+ <Project>{fd86424c-6e84-491b-8df9-3d0f5c236a2a}</Project>
+ <Name>Tango.Touch</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Transport\Tango.Transport.csproj">
+ <Project>{74e700b0-1156-4126-be40-ee450d3c3026}</Project>
+ <Name>Tango.Transport</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Tango.PPC.Common\Tango.PPC.Common.csproj">
+ <Project>{0be74eee-22cb-4dba-b896-793b9e1a3ac0}</Project>
+ <Name>Tango.PPC.Common</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Tango.PPC.Storage\Tango.PPC.Storage.csproj">
+ <Project>{04febb02-f782-4b96-b47d-f6902afa43be}</Project>
+ <Name>Tango.PPC.Storage</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\maintenance.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\action.png" />
+ <Resource Include="Images\guides.png" />
+ <Resource Include="Images\status.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\temperature-green.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\inks.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\Guides\loading-new-thread.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\Guides\machine-image.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\Guides\handling-the-waste-cartridges.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\Guides\loading-an-ink-cartridge.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\Guides\replacing-the-air-filter.png" />
+ </ItemGroup>
+ <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>
+ <ItemGroup>
+ <Resource Include="Images\temperature-red.png" />
+ <Resource Include="Images\temperature-yellow.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\lubricant2.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\cl-full.png" />
+ <Resource Include="Images\cone-empty.png" />
+ <Resource Include="Images\cone-full.png" />
+ <Resource Include="Images\l-full.png" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModelLocator.cs
new file mode 100644
index 000000000..1db63a9e4
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModelLocator.cs
@@ -0,0 +1,56 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Core.DI;
+using Tango.PPC.Maintenance.ViewModels;
+
+namespace Tango.PPC.Maintenance
+{
+ public static class ViewModelLocator
+ {
+ /// <summary>
+ /// Initializes a new instance of the ViewModelLocator class.
+ /// </summary>
+ static ViewModelLocator()
+ {
+ TangoIOC.Default.Register<MainViewVM>();
+ TangoIOC.Default.Register<MaintenanceViewVM>();
+ TangoIOC.Default.Register<GeneralGuideViewVM>();
+ }
+
+ /// <summary>
+ /// Gets the main view VM.
+ /// </summary>
+ public static MainViewVM MainViewVM
+ {
+ get
+ {
+ return TangoIOC.Default.GetInstance<MainViewVM>();
+ }
+ }
+
+ /// <summary>
+ /// Gets the maintenance view VM.
+ /// </summary>
+ public static MaintenanceViewVM MaintenanceViewVM
+ {
+ get
+ {
+ return TangoIOC.Default.GetInstance<MaintenanceViewVM>();
+ }
+ }
+
+ /// <summary>
+ /// Gets the general guide view VM.
+ /// </summary>
+ public static GeneralGuideViewVM GeneralGuideViewVM
+ {
+ get
+ {
+ return TangoIOC.Default.GetInstance<GeneralGuideViewVM>();
+ }
+ }
+ }
+}
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
new file mode 100644
index 000000000..fd0475817
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/GeneralGuideViewVM.cs
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.PPC.Common;
+using Tango.PPC.Common.Navigation;
+
+namespace Tango.PPC.Maintenance.ViewModels
+{
+ public class GeneralGuideViewVM : PPCViewModel, INavigationObjectReceiver<GuideBase>
+ {
+ private DateTime _lastTime;
+
+ private GuideBase _guide;
+ public GuideBase Guide
+ {
+ get { return _guide; }
+ set { _guide = value; RaisePropertyChangedAuto(); }
+ }
+
+
+ public override void OnApplicationStarted()
+ {
+ _lastTime = DateTime.Now;
+ }
+
+ public void OnNavigatedToWithObject(GuideBase guide)
+ {
+ 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/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MainViewVM.cs
new file mode 100644
index 000000000..a614f7be2
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MainViewVM.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.PPC.Common;
+using Tango.PPC.Maintenance.Views;
+
+namespace Tango.PPC.Maintenance.ViewModels
+{
+ /// <summary>
+ /// Represents the main view VM and entry point for <see cref="Synchronization.MyModule"/>.
+ /// </summary>
+ /// <seealso cref="Tango.PPC.Common.PPCViewModel" />
+ public class MainViewVM : PPCViewModel
+ {
+ /// <summary>
+ /// Called when the application has been started
+ /// </summary>
+ public override void OnApplicationStarted()
+ {
+ //Start initializing here rather then in the constructor.
+ }
+
+ public override void OnNavigatedTo()
+ {
+ base.OnNavigatedTo();
+ NavigationManager.NavigateTo<MaintenanceModule>(nameof(MaintenanceView), false);
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs
new file mode 100644
index 000000000..aeb349bdc
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs
@@ -0,0 +1,244 @@
+using Ionic.Zip;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Core.Commands;
+using Tango.Explorer;
+using Tango.Integration.Operation;
+using Tango.Logging;
+using Tango.PMR.MachineStatus;
+using Tango.PPC.Common;
+using Tango.PPC.Maintenance.Helpers;
+using Tango.PPC.Maintenance.Models;
+using Tango.PPC.Maintenance.Views;
+using Tango.PPC.Storage;
+
+namespace Tango.PPC.Maintenance.ViewModels
+{
+ public class MaintenanceViewVM : PPCViewModel
+ {
+ public ObservableCollection<GuideBase> Guides { get; set; }
+
+ public RelayCommand<GuideBase> OpenGuideCommand { get; set; }
+
+ private List<MidTankLevelModel> _midTankLevels;
+ public List<MidTankLevelModel> MidTankLevels
+ {
+ get { return _midTankLevels; }
+ set { _midTankLevels = value; RaisePropertyChangedAuto(); }
+ }
+
+ private OverallTemperatureModel _overallTemperature;
+ public OverallTemperatureModel OverallTemperature
+ {
+ get { return _overallTemperature; }
+ set { _overallTemperature = value; RaisePropertyChangedAuto(); }
+ }
+
+ public RelayCommand OpenDyeingHeadCommand { get; set; }
+
+ public RelayCommand CloseDyeingHeadCommand { get; set; }
+
+ public RelayCommand ExportLogsCommand { get; set; }
+
+ public MaintenanceViewVM()
+ {
+ Guides = new ObservableCollection<GuideBase>(GuideHelper.CreateAllGuides());
+ OverallTemperature = new OverallTemperatureModel();
+
+ OpenGuideCommand = new RelayCommand<GuideBase>(OpenGuide);
+
+ OpenDyeingHeadCommand = new RelayCommand(OpenDyeingHead);
+ CloseDyeingHeadCommand = new RelayCommand(CloseDyeingHead);
+ ExportLogsCommand = new RelayCommand(ExportLogsToStorage);
+ }
+
+ public override void OnApplicationStarted()
+ {
+
+ }
+
+ public override void OnApplicationReady()
+ {
+ base.OnApplicationReady();
+
+ MidTankLevels = MachineProvider.Machine.Configuration.NoneEmptyIdsPacks.OrderBy(x => x.PackIndex).Select(x => new MidTankLevelModel()
+ {
+ Max = MachineOperator.MAX_MIDTANK_LITERS,
+ IDSPack = x,
+ }).ToList();
+
+ MachineProvider.MachineOperator.MachineStatusChanged += MachineOperator_MachineStatusChanged;
+ }
+
+ private void MachineOperator_MachineStatusChanged(object sender, MachineStatus status)
+ {
+ UpdateMidTankLevels(status);
+ OverallTemperature.Temperature = status.OverallTemperature;
+ }
+
+ public async void OpenGuide(GuideBase guide)
+ {
+ await NavigationManager.NavigateWithObject<MaintenanceModule, GeneralGuideView, GuideBase>(guide);
+ }
+
+ private void UpdateMidTankLevels(MachineStatus status)
+ {
+ if (IsVisible)
+ {
+ foreach (var item in status.IDSPacksLevels)
+ {
+ var model = MidTankLevels.SingleOrDefault(x => x.IDSPack.PackIndex == item.Index);
+
+ if (model != null)
+ {
+ model.Level = item.MidTankLevel;
+ }
+ }
+ }
+ }
+
+ private void OpenDyeingHead()
+ {
+ IsFree = false;
+
+ try
+ {
+ NotificationProvider.SetGlobalBusyMessage("Opening dyeing head lead...");
+
+ MachineProvider.MachineOperator.StartMotorHoming(new PMR.Diagnostics.MotorHomingRequest()
+ {
+ Direction = PMR.Diagnostics.MotorDirection.Backward,
+ MotorType = PMR.Hardware.HardwareMotorType.MotoDhLid,
+ Speed = 400,
+ }).Subscribe((response) =>
+ {
+ //Next
+ }, (ex) =>
+ {
+ //Error
+ IsFree = true;
+ NotificationProvider.ReleaseGlobalBusyMessage();
+ LogManager.Log(ex, "Error opening dyeing head lead.");
+ NotificationProvider.ShowError(ex.FlattenMessage());
+ }, () =>
+ {
+ //Complete
+ IsFree = true;
+ NotificationProvider.ReleaseGlobalBusyMessage();
+ NotificationProvider.ShowSuccess("The dyeing head lead is now opened.");
+ });
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error opening dyeing head lead.");
+ NotificationProvider.ReleaseGlobalBusyMessage();
+ NotificationProvider.ShowError(ex.FlattenMessage());
+ IsFree = true;
+ }
+ }
+
+ private void CloseDyeingHead()
+ {
+ IsFree = false;
+
+ try
+ {
+ NotificationProvider.SetGlobalBusyMessage("Closing dyeing head lead...");
+
+ MachineProvider.MachineOperator.StartMotorHoming(new PMR.Diagnostics.MotorHomingRequest()
+ {
+ Direction = PMR.Diagnostics.MotorDirection.Forward,
+ MotorType = PMR.Hardware.HardwareMotorType.MotoDhLid,
+ Speed = 400,
+ }).Subscribe((response) =>
+ {
+ //Next
+ }, (ex) =>
+ {
+ //Error
+ IsFree = true;
+ NotificationProvider.ReleaseGlobalBusyMessage();
+ LogManager.Log(ex, "Error closing dyeing head lead.");
+ NotificationProvider.ShowError(ex.FlattenMessage());
+ }, () =>
+ {
+ //Complete
+ IsFree = true;
+ NotificationProvider.ReleaseGlobalBusyMessage();
+ NotificationProvider.ShowSuccess("The dyeing head lead is now closed.");
+ });
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error closing dyeing head lead.");
+ NotificationProvider.ReleaseGlobalBusyMessage();
+ NotificationProvider.ShowError(ex.FlattenMessage());
+ IsFree = true;
+ }
+ }
+
+ private async void ExportLogsToStorage()
+ {
+ var result = await NavigationManager.
+ NavigateForResult<StorageModule,
+ Storage.Views.MainView, ExplorerFileItem,
+ Storage.Models.StorageNavigationRequest>(
+ new Storage.Models.StorageNavigationRequest()
+ {
+ Intent = Storage.Models.StorageNavigationIntent.SaveFile,
+ DefaultFileName = $"Tango-Logs-{DateTime.Now.ToFileName()}",
+ Filter = "do not display anything",
+ Title = "Export System Logs",
+ });
+
+ if (result != null)
+ {
+ String file = result.Path + ".zip";
+
+ IsFree = false;
+
+ try
+ {
+ NotificationProvider.SetGlobalBusyMessage("Exporting system logs...");
+
+ var appFileLogger = LogManager.RegisteredLoggers.FirstOrDefault(x => x is FileLogger) as FileLogger;
+
+ await Task.Factory.StartNew(() =>
+ {
+ using (ZipFile zip = new ZipFile(file))
+ {
+ zip.Password = "1Creativity";
+
+ if (appFileLogger != null)
+ {
+ zip.AddDirectory(appFileLogger.Folder);
+ }
+
+ zip.ParallelDeflateThreshold = -1;
+ zip.Save();
+ }
+ });
+
+ NotificationProvider.ReleaseGlobalBusyMessage();
+
+ await NotificationProvider.ShowSuccess("System logs exported successfully.");
+ }
+ catch (Exception ex)
+ {
+ NotificationProvider.ReleaseGlobalBusyMessage();
+ LogManager.Log(ex, "Error exporting system logs.");
+ await NotificationProvider.ShowError($"An error occurred while trying to export the system logs.\n{ex.FlattenMessage()}");
+ }
+ finally
+ {
+ NotificationProvider.ReleaseGlobalBusyMessage();
+ IsFree = true;
+ }
+ }
+ }
+ }
+}
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
new file mode 100644
index 000000000..ecff03b58
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/GeneralGuideView.xaml
@@ -0,0 +1,55 @@
+<UserControl x:Class="Tango.PPC.Maintenance.Views.GeneralGuideView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:local="clr-namespace:Tango.PPC.Maintenance.Views"
+ xmlns:vm="clr-namespace:Tango.PPC.Maintenance.ViewModels"
+ xmlns:global="clr-namespace:Tango.PPC.Maintenance"
+ xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
+ mc:Ignorable="d"
+ d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:GeneralGuideViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.GeneralGuideViewVM}">
+ <Grid>
+ <Grid Background="{StaticResource TangoMidBackgroundBrush}">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="1*"/>
+ </Grid.RowDefinitions>
+
+ <StackPanel Orientation="Horizontal" Margin="20">
+ <Image Source="{Binding Guide.Icon}" Stretch="None" VerticalAlignment="Center" />
+ <TextBlock Margin="20 0 0 0" VerticalAlignment="Center" FontSize="23" Text="{Binding Guide.Name}"></TextBlock>
+ </StackPanel>
+
+ <Grid Grid.Row="1" Margin="10">
+ <touch:TouchDropShadowBorder Padding="20" Background="{StaticResource TangoPrimaryBackgroundBrush}">
+ <DockPanel>
+ <ItemsControl DockPanel.Dock="Top" ItemsSource="{Binding Guide.Steps}" AlternationCount="2">
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <Border x:Name="FooBar" Padding="20 5">
+ <DockPanel>
+ <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>
+ <DataTemplate.Triggers>
+ <Trigger Property="ItemsControl.AlternationIndex" Value="0">
+ <Setter Property="Background" Value="#f9f8f8" TargetName="FooBar"/>
+ </Trigger>
+ <Trigger Property="ItemsControl.AlternationIndex" Value="1">
+ <Setter Property="Background" Value="{StaticResource TangoPrimaryBackgroundBrush}" TargetName="FooBar"/>
+ </Trigger>
+ </DataTemplate.Triggers>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+
+ </ItemsControl>
+
+ <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>
+ </Grid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/GeneralGuideView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/GeneralGuideView.xaml.cs
new file mode 100644
index 000000000..10b5337ce
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/GeneralGuideView.xaml.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.PPC.Maintenance.Views
+{
+ /// <summary>
+ /// Interaction logic for GeneralGuideView.xaml
+ /// </summary>
+ public partial class GeneralGuideView : UserControl
+ {
+ public GeneralGuideView()
+ {
+ InitializeComponent();
+ }
+
+ private void TouchCheckBox_Loaded(object sender, RoutedEventArgs e)
+ {
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MainView.xaml
new file mode 100644
index 000000000..be6161952
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MainView.xaml
@@ -0,0 +1,22 @@
+<UserControl x:Class="Tango.PPC.Maintenance.Views.MainView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:vm="clr-namespace:Tango.PPC.Maintenance.ViewModels"
+ xmlns:global="clr-namespace:Tango.PPC.Maintenance"
+ xmlns:views="clr-namespace:Tango.PPC.Maintenance.Views"
+ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
+ xmlns:local="clr-namespace:Tango.PPC.Maintenance.Views"
+ mc:Ignorable="d"
+ d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
+
+ <Grid>
+ <controls:NavigationControl TransitionType="Slide" TransitionDuration="00:00:0.2" KeepElementsAttached="True">
+ <views:MaintenanceView/>
+ <views:GeneralGuideView/>
+ </controls:NavigationControl>
+ </Grid>
+
+</UserControl>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MainView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MainView.xaml.cs
new file mode 100644
index 000000000..f859c9524
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MainView.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.PPC.Maintenance.Views
+{
+ /// <summary>
+ /// Interaction logic for MainView.xaml
+ /// </summary>
+ public partial class MainView : UserControl
+ {
+ public MainView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml
new file mode 100644
index 000000000..2f7f91a80
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml
@@ -0,0 +1,215 @@
+<UserControl x:Class="Tango.PPC.Maintenance.Views.MaintenanceView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:vm="clr-namespace:Tango.PPC.Maintenance.ViewModels"
+ xmlns:global="clr-namespace:Tango.PPC.Maintenance"
+ xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
+ xmlns:localConverters="clr-namespace:Tango.PPC.Maintenance.Converters"
+ xmlns:local="clr-namespace:Tango.PPC.Maintenance.Views"
+ mc:Ignorable="d"
+ d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:MaintenanceViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MaintenanceViewVM}">
+
+ <UserControl.Resources>
+
+ <localConverters:StringToFirstLetterConverter x:Key="StringToFirstLetterConverter" />
+ <localConverters:MidTankLevelToElementHeightConverter x:Key="MidTankLevelToElementHeightConverter" />
+ <localConverters:LiquidTypeToBrushConverter x:Key="LiquidTypeToBrushConverter" />
+
+ <Style TargetType="FrameworkElement" x:Key="Level1Container">
+ <Setter Property="Margin" Value="20 15 60 15"></Setter>
+ </Style>
+ <Style TargetType="FrameworkElement" x:Key="Level2Container">
+ <Setter Property="Margin" Value="80 30 60 0"></Setter>
+ </Style>
+ <Style TargetType="FrameworkElement" x:Key="Level2ContainerExtraMargin">
+ <Setter Property="Margin" Value="80 40 60 0"></Setter>
+ </Style>
+
+ <DataTemplate x:Key="LiquidBox">
+ <DockPanel>
+ <TextBlock DockPanel.Dock="Top" Text="{Binding IDSPack.LiquidType.Name,Converter={StaticResource StringToFirstLetterConverter}}" HorizontalAlignment="Center"></TextBlock>
+ <Grid MaxWidth="30" Margin="5 0">
+ <touch:TouchIcon Icon="MapMarkerSolid" Width="20" Height="20" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 0 0 10" Foreground ="{Binding Path=IDSPack.LiquidType, Converter={StaticResource LiquidTypeToBrushConverter}}">
+ <touch:TouchIcon.Style>
+ <Style TargetType="touch:TouchIcon">
+ <Setter Property="Visibility" Value="Hidden"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsLow}" Value="True">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding IsEmpty}" Value="True">
+ <DataTrigger.EnterActions>
+ <BeginStoryboard Name="blinkDrop">
+ <Storyboard>
+ <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Duration="00:00:01" RepeatBehavior="Forever">
+ <DiscreteDoubleKeyFrame KeyTime="00:00:00" Value="1" />
+ <DiscreteDoubleKeyFrame KeyTime="00:00:0.5" Value="0" />
+ </DoubleAnimationUsingKeyFrames>
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.EnterActions>
+ <DataTrigger.ExitActions>
+ <RemoveStoryboard BeginStoryboardName="blinkDrop" />
+ </DataTrigger.ExitActions>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </touch:TouchIcon.Style>
+ </touch:TouchIcon>
+ <Border BorderThickness="1" BorderBrush="{StaticResource TangoLightBorderBrush}" CornerRadius="3" ClipToBounds="True" x:Name="pathBorder">
+ <Canvas Width="30" >
+ <Path Panel.ZIndex="1" VerticalAlignment="Bottom" ClipToBounds="True" MinHeight="2" Data="M0,0 C2,0 8.9,-1.1705073 11.3,-4.6 14.5,-7.7 15.5,-8 18.7,-10.8 21.7,-13.16 23.3,-14.5 28,-15.6 28,-13.7 28,80 28,100 L0,100 z" Height="90" Width="29" Stretch="Fill"
+ Canvas.Left="0" Fill="{Binding Path=IDSPack.LiquidType, Converter={StaticResource LiquidTypeToBrushConverter}}" Margin="0 -14 0 0" >
+
+ <Path.Style>
+ <Style>
+ <Setter Property="Canvas.Top" >
+ <Setter.Value>
+ <MultiBinding Converter="{StaticResource MidTankLevelToElementHeightConverter}">
+ <Binding ElementName="pathBorder" Path="ActualHeight" />
+ <Binding Path="Level" />
+ </MultiBinding>
+ </Setter.Value>
+ </Setter>
+ </Style>
+ </Path.Style>
+ </Path>
+ </Canvas>
+ </Border>
+ </Grid>
+ </DockPanel>
+ </DataTemplate>
+ </UserControl.Resources>
+
+ <Grid Background="{StaticResource TangoMidBackgroundBrush}" IsEnabled="{Binding IsFree}">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="1*"/>
+ </Grid.RowDefinitions>
+
+ <Border Padding="20" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}">
+ <Border.Effect>
+ <DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" />
+ </Border.Effect>
+ <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold">Maintenance</TextBlock>
+ </Border>
+
+ <Grid Grid.Row="1">
+ <touch:LightTouchScrollViewer>
+ <StackPanel Margin="10 60 10 0">
+
+ <!--STATUS-->
+ <touch:TouchDropShadowBorder Padding="0 0 0 50">
+ <StackPanel>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
+ <Image Source="../Images/status.png" />
+ <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Current Status</TextBlock>
+ </StackPanel>
+
+ <StackPanel Style="{StaticResource Level2ContainerExtraMargin}">
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="150*" />
+ <ColumnDefinition Width="250*" />
+ <ColumnDefinition Width="100*" />
+ <ColumnDefinition Width="100*" />
+ </Grid.ColumnDefinitions>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="100" />
+ <RowDefinition Height="25" />
+ </Grid.RowDefinitions>
+
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
+ <Image Stretch="None">
+ <Image.Style>
+ <Style TargetType="Image">
+ <Setter Property="Source" Value="../Images/temperature-green.png"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding OverallTemperature.IsWarning}" Value="True">
+ <Setter Property="Source" Value="../Images/temperature-yellow.png"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding OverallTemperature.IsError}" Value="True">
+ <Setter Property="Source" Value="../Images/temperature-red.png"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Image.Style>
+ </Image>
+ <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">
+ <Run Text="{Binding OverallTemperature.Temperature,StringFormat='0',Mode=OneWay}"></Run>
+ <Run>º</Run>
+ </TextBlock>
+ </StackPanel>
+
+ <Grid Grid.Column="1" Margin="0 0 0 10">
+ <ItemsControl ItemsSource="{Binding MidTankLevels}" ItemTemplate="{StaticResource LiquidBox}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <UniformGrid Rows="1" IsItemsHost="True"></UniformGrid>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ </ItemsControl>
+ </Grid>
+
+ <Image Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center" Source="../Images/cone-full.png" Margin="30"></Image>
+
+ <TextBlock Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Temperature</TextBlock>
+ <TextBlock Grid.Column="1" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Inks</TextBlock>
+ </Grid>
+ </StackPanel>
+ </StackPanel>
+ </touch:TouchDropShadowBorder>
+
+ <!--ACTIONS-->
+ <touch:TouchDropShadowBorder Margin="0 20 0 0" Padding="0 0 0 50" MinHeight="330">
+ <StackPanel>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
+ <Image Source="../Images/action.png" />
+ <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Actions</TextBlock>
+ </StackPanel>
+
+ <StackPanel Style="{StaticResource Level2ContainerExtraMargin}">
+ <UniformGrid Columns="2" Margin="40 0">
+ <touch:TouchButton Command="{Binding OpenDyeingHeadCommand}" Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}">OPEN DYEING HEAD LEAD</touch:TouchButton>
+
+ <touch:TouchButton Command="{Binding CloseDyeingHeadCommand}" Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}">CLOSE DYEING HEAD LEAD</touch:TouchButton>
+
+ <touch:TouchButton Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Command="{Binding ExportLogsCommand}" Visibility="{Binding ApplicationManager.IsInTechnicianMode,Converter={StaticResource BooleanToVisibilityConverter}}">EXPORT SYSTEM LOGS</touch:TouchButton>
+ </UniformGrid>
+ </StackPanel>
+ </StackPanel>
+ </touch:TouchDropShadowBorder>
+
+ <!--GUIDES-->
+ <touch:TouchDropShadowBorder Margin="0 20 0 0" Padding="0 0 0 50">
+ <StackPanel>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
+ <Image Source="../Images/guides.png" />
+ <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Guides</TextBlock>
+ </StackPanel>
+
+ <StackPanel Margin="65 10 0 0">
+ <ItemsControl ItemsSource="{Binding Guides}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <UniformGrid Columns="2" IsItemsHost="True" />
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <touch:TouchButton Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.OpenGuideCommand}" CommandParameter="{Binding}" Padding="20" FontSize="{StaticResource TangoTitleFontSize}" Style="{StaticResource TangoLinkButton}" HorizontalAlignment="Left">
+ <TextBlock Text="{Binding Name}"></TextBlock>
+ </touch:TouchButton>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </StackPanel>
+ </StackPanel>
+ </touch:TouchDropShadowBorder>
+ </StackPanel>
+ </touch:LightTouchScrollViewer>
+ </Grid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml.cs
new file mode 100644
index 000000000..8fb9bd7ca
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Tango.Integration.Operation;
+using Tango.PPC.Maintenance.Models;
+
+namespace Tango.PPC.Maintenance.Views
+{
+ /// <summary>
+ /// Interaction logic for MainView.xaml
+ /// </summary>
+ public partial class MaintenanceView : UserControl
+ {
+ public MaintenanceView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/app.config b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/app.config
new file mode 100644
index 000000000..1e22e6a88
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/app.config
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <configSections>
+ <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
+ <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
+ </configSections>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral"/>
+ <bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0"/>
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0"/>
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0"/>
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0"/>
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0"/>
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral"/>
+ <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0"/>
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0"/>
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0"/>
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0"/>
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0"/>
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
+ <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0"/>
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+ <entityFramework>
+ <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>
+ <providers>
+ <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
+ </providers>
+ </entityFramework>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/packages.config b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/packages.config
new file mode 100644
index 000000000..d6bb93fd4
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/packages.config
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="EntityFramework" version="6.0.0" targetFramework="net46" />
+ <package id="Expression.Blend.Sdk" version="1.0.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="Ionic.Zip" version="1.9.1.8" targetFramework="net461" />
+ <package id="System.Reactive.Core" version="3.1.1" targetFramework="net461" />
+ <package id="System.Reactive.Interfaces" version="3.1.1" targetFramework="net461" />
+ <package id="System.Reactive.Linq" version="3.1.1" targetFramework="net461" />
+</packages> \ No newline at end of file