aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2024-06-20 11:46:02 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2024-06-20 11:46:02 +0300
commit0460a54eb73a3943a9d363e7cce38b8d9009bc4b (patch)
tree6e0423ffa358d6a562764f99d110df1623f47a1a
parent7b0ed51c91baf1257fce45699221a0f1a096ce72 (diff)
downloadTango-0460a54eb73a3943a9d363e7cce38b8d9009bc4b.tar.gz
Tango-0460a54eb73a3943a9d363e7cce38b8d9009bc4b.zip
Jerrycan change impl.
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs171
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml3
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs6
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml7
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/JerricanReplaceView.xaml45
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/JerricanReplaceView.xaml.cs28
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/JerricanReplaceViewVM.cs54
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Images/update_x4.pngbin0 -> 106582 bytes
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Models/JerricanLevelModel.cs14
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs16
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj11
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs108
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml86
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml13
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest2
-rw-r--r--Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs21
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs8
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs26
-rw-r--r--Software/Visual_Studio/Tango.PMR/Common/MessageType.cs17
-rw-r--r--Software/Visual_Studio/Tango.PMR/IFS/SetJerricanLevelRequest.cs188
-rw-r--r--Software/Visual_Studio/Tango.PMR/IFS/SetJerricanLevelResponse.cs131
-rw-r--r--Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj4
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/Converters/EnumToBooleanConverter.cs16
23 files changed, 817 insertions, 158 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs
index ffec3cfa1..430cb99cf 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs
@@ -502,7 +502,7 @@ namespace Tango.PPC.Jobs.Models
{
get
{
- return ColorCatalogsItem == null? "" : ColorCatalogsItem.Guid;
+ return ColorCatalogsItem == null ? "" : ColorCatalogsItem.Guid;
}
}
@@ -570,7 +570,7 @@ namespace Tango.PPC.Jobs.Models
return System.Windows.Media.Colors.Transparent;
}
}
-
+
[JsonIgnore]
public SolidColorBrush ColorBrush
{
@@ -591,7 +591,7 @@ namespace Tango.PPC.Jobs.Models
get { return _segmentmodel; }
set { _segmentmodel = value; }
}
-
+
private bool _outOfGamutChecked;
/// <summary>
/// Gets or sets a value indicating whether out of gamut has been checked.
@@ -660,34 +660,34 @@ namespace Tango.PPC.Jobs.Models
{
get
{
- if ( ColorSpace == ColorSpaces.Volume || ColorSpace == ColorSpaces.CMYK)
+ if (ColorSpace == ColorSpaces.Volume || ColorSpace == ColorSpaces.CMYK)
{
var minCyan = GetMinLimitLiquid(LiquidTypes.Cyan);
- if(Cyan > 0 && Cyan < minCyan)
- {
+ if (Cyan > 0 && Cyan < minCyan)
+ {
LiquidVolumeBelowMinLimit = true;
- LiquidVolumeBelowMinLimitmessage = String.Format($"{Cyan} Cyan should be > {minCyan}");
+ LiquidVolumeBelowMinLimitmessage = $"{Cyan} Cyan should be > {minCyan.ToString("N3")}";
return LiquidVolumeBelowMinLimit;
}
var minMagenta = GetMinLimitLiquid(LiquidTypes.Magenta);
if (Magenta > 0 && Magenta < minMagenta)
{
LiquidVolumeBelowMinLimit = true;
- LiquidVolumeBelowMinLimitmessage = String.Format($"{Magenta} Magenta should be > {minMagenta}");
+ LiquidVolumeBelowMinLimitmessage = $"{Magenta} Magenta should be > {minMagenta.ToString("N3")}";
return LiquidVolumeBelowMinLimit;
}
var minYellow = GetMinLimitLiquid(LiquidTypes.Yellow);
if (Yellow > 0 && Yellow < minYellow)
{
LiquidVolumeBelowMinLimit = true;
- LiquidVolumeBelowMinLimitmessage = String.Format($"{Yellow} Yellow should be > {minYellow}");
+ LiquidVolumeBelowMinLimitmessage = $"{Yellow} Yellow should be > {minYellow.ToString("N3")}";
return LiquidVolumeBelowMinLimit;
}
var minBlack = GetMinLimitLiquid(LiquidTypes.Black);
if (Black > 0 && Black < minBlack)
{
LiquidVolumeBelowMinLimit = true;
- LiquidVolumeBelowMinLimitmessage = String.Format($"{Black} Black should be > {minBlack}");
+ LiquidVolumeBelowMinLimitmessage = $"{Black} Black should be > {minBlack.ToString("N3")}";
return LiquidVolumeBelowMinLimit;
}
LiquidVolumeBelowMinLimit = false;
@@ -702,7 +702,7 @@ namespace Tango.PPC.Jobs.Models
[JsonIgnore]
public string LiquidVolumeBelowMinLimitmessage
{
- get { return _liquidVolumeBelowMinLimitmessage;}
+ get { return _liquidVolumeBelowMinLimitmessage; }
set
{
_liquidVolumeBelowMinLimitmessage = value;
@@ -724,7 +724,7 @@ namespace Tango.PPC.Jobs.Models
}
}
}
-
+
[JsonIgnore]
public ColorSpaces LastChangedColorSpace { get; set; }
@@ -743,7 +743,7 @@ namespace Tango.PPC.Jobs.Models
public Double YellowBeforeChange { get; set; }
[JsonIgnore]
public Double BlackBeforeChange { get; set; }
-
+
public bool FineTuningChanged { get; set; }
#endregion
@@ -762,7 +762,7 @@ namespace Tango.PPC.Jobs.Models
Color = Colors.White;
var settings = SettingsManager.Default.GetOrCreate<PPCSettings>();
- ColorSpace = settings.DefaultTabColorSpace == null? ColorSpaces.Volume: (ColorSpaces)settings.DefaultTabColorSpace;
+ ColorSpace = settings.DefaultTabColorSpace == null ? ColorSpaces.Volume : (ColorSpaces)settings.DefaultTabColorSpace;
if (ColorSpace == ColorSpaces.CMYK)
ColorSpace = ColorSpaces.Volume;
LastChangedColorSpace = ColorSpace;
@@ -797,7 +797,7 @@ namespace Tango.PPC.Jobs.Models
Yellow = brushStop.Yellow * 100;
Black = brushStop.Black * 100;
}
- else
+ else
{
Cyan = brushStop.GetVolume(LiquidTypes.Cyan);
Magenta = brushStop.GetVolume(LiquidTypes.Magenta);
@@ -949,17 +949,17 @@ namespace Tango.PPC.Jobs.Models
Configuration configuration = SegmentModel.Job.Machine.Configuration;
Rml rml = SegmentModel.Job.Rml;
s.SetLiquidVolumes(configuration, rml, rml.GetActiveProcessGroup().ProcessParametersTables.FirstOrDefault());
-
-
- s.ColorSpace.Space = BL.Enumerations.ColorSpaces.LAB;
- s.L = this.L;
- s.A = this.A;
- s.B = this.B;
- s.Cyan = cyan;
- s.Yellow = yellow;
- s.Magenta = magenta;
- s.Black = black;
-
+
+
+ s.ColorSpace.Space = BL.Enumerations.ColorSpaces.LAB;
+ s.L = this.L;
+ s.A = this.A;
+ s.B = this.B;
+ s.Cyan = cyan;
+ s.Yellow = yellow;
+ s.Magenta = magenta;
+ s.Black = black;
+
return s;
}
@@ -1043,7 +1043,7 @@ namespace Tango.PPC.Jobs.Models
LiquidVolumesOutOfRange = false;
}
-
+
/// <summary>
/// Creates the brush stop.
/// </summary>
@@ -1060,7 +1060,7 @@ namespace Tango.PPC.Jobs.Models
Configuration configuration = SegmentModel.Job.Machine.Configuration;
Rml rml = SegmentModel.Job.Rml;
s.SetLiquidVolumes(configuration, rml, rml.GetActiveProcessGroup().ProcessParametersTables.FirstOrDefault());
-
+
s.OffsetPercent = OffsetPercent;
s.StopIndex = StopIndex;
s.IsOutOfGamut = IsOutOfGamut;
@@ -1087,7 +1087,7 @@ namespace Tango.PPC.Jobs.Models
//Fine Tuning
public void UndoColorChanges()
{
- if(ColorSpace == ColorSpaces.LAB)
+ if (ColorSpace == ColorSpaces.LAB)
{
PreventPropertyUpdate = true;
L = LBeforeChange;
@@ -1095,7 +1095,7 @@ namespace Tango.PPC.Jobs.Models
PreventPropertyUpdate = false;
B = BBeforeChange;
}
- else if(ColorSpace == ColorSpaces.Volume)
+ else if (ColorSpace == ColorSpaces.Volume)
{
PreventPropertyUpdate = true;
Cyan = CyanBeforeChange;
@@ -1154,7 +1154,7 @@ namespace Tango.PPC.Jobs.Models
{
if (PreventPropertyUpdate)
return;
- // ColorSpace = ColorSpaces.HSB;
+ // ColorSpace = ColorSpaces.HSB;
Rgb rgb = GetRGBColor();
_red = (int)rgb.R;
_green = (int)rgb.G;
@@ -1294,8 +1294,8 @@ namespace Tango.PPC.Jobs.Models
{
if (ColorSpace != ColorSpaces.RGB)
{
-
- if ( LastChangedColorSpace != ColorSpaces.RGB)
+
+ if (LastChangedColorSpace != ColorSpaces.RGB)
{
if (LastChangedColorSpace == ColorSpaces.Catalog && ColorCatalogsItem != null)
{
@@ -1314,12 +1314,12 @@ namespace Tango.PPC.Jobs.Models
_green = output.SingleCoordinates.Green;
_blue = output.SingleCoordinates.Blue;
IsOutOfGamut = false;//output.OutOfGamut;
- if ( IsLiquidVolumesOutOfRange)
- {
- BestMatchColor = Color.FromRgb((byte)output.SingleCoordinates.Red, (byte)output.SingleCoordinates.Green, (byte)output.SingleCoordinates.Blue);
- InitColor();
- }
+ if (IsLiquidVolumesOutOfRange)
+ {
+ BestMatchColor = Color.FromRgb((byte)output.SingleCoordinates.Red, (byte)output.SingleCoordinates.Green, (byte)output.SingleCoordinates.Blue);
+ InitColor();
}
+ }
catch (Exception ex)
{
LogManager.Log(ex, "An error occurred while trying to get volume => RGB from conversion engine.");
@@ -1353,19 +1353,19 @@ namespace Tango.PPC.Jobs.Models
public void ConvertColorToLAB()
{
- if (ColorSpace != ColorSpaces.LAB )
+ if (ColorSpace != ColorSpaces.LAB)
{
- if( LastChangedColorSpace != ColorSpaces.LAB)
+ if (LastChangedColorSpace != ColorSpaces.LAB)
{
Lab lab = null;
if (LastChangedColorSpace == ColorSpaces.Catalog && ColorCatalogsItem != null)
{
- _l = ColorCatalogsItem.L;
- _a = ColorCatalogsItem.A;
- _b = ColorCatalogsItem.B;
- BestMatchL = _l;
- BestMatchA = _a;
- BestMatchB = _b;
+ _l = ColorCatalogsItem.L;
+ _a = ColorCatalogsItem.A;
+ _b = ColorCatalogsItem.B;
+ BestMatchL = _l;
+ BestMatchA = _a;
+ BestMatchB = _b;
}
else if (LastChangedColorSpace == ColorSpaces.Volume)
{
@@ -1381,7 +1381,7 @@ namespace Tango.PPC.Jobs.Models
BestMatchA = _a;
BestMatchB = _b;
IsOutOfGamut = false;//output.OutOfGamut;
-
+
if (IsLiquidVolumesOutOfRange)
{
_red = output.SingleCoordinates.Red;
@@ -1438,7 +1438,7 @@ namespace Tango.PPC.Jobs.Models
RequiredMaxLiquidTest = true;
if (ColorSpace != ColorSpaces.Volume)
{
- if ( LastChangedColorSpace != ColorSpaces.Volume)
+ if (LastChangedColorSpace != ColorSpaces.Volume)
{
if (LastChangedColorSpace == ColorSpaces.Catalog)
{
@@ -1453,8 +1453,8 @@ namespace Tango.PPC.Jobs.Models
RaisePropertyChanged(nameof(Magenta));
RaisePropertyChanged(nameof(Black));
IsOutOfGamut = false;
- // RaisePropertyChanged(nameof(IsLiquidVolumesOutOfRange));
- // RaisePropertyChanged(nameof(IsLiquidVolumeBelowMinLimit));
+ // RaisePropertyChanged(nameof(IsLiquidVolumesOutOfRange));
+ // RaisePropertyChanged(nameof(IsLiquidVolumeBelowMinLimit));
}
ColorSpace = ColorSpaces.Volume;
RaisePropertyChanged(nameof(IsLiquidVolumesOutOfRange));
@@ -1467,9 +1467,9 @@ namespace Tango.PPC.Jobs.Models
// colorSpace = ColorSpaces.RGB;
//}
//else
- if (colorSpace == ColorSpaces.CMYK )
+ if (colorSpace == ColorSpaces.CMYK)
{
- colorSpace = ColorSpaces. Volume;
+ colorSpace = ColorSpaces.Volume;
}
BrushStop stop = CreateBrushStop(colorSpace);
@@ -1514,17 +1514,17 @@ namespace Tango.PPC.Jobs.Models
RaisePropertyChanged(nameof(IsLiquidVolumeBelowMinLimit));
}
}
-
+
public void ConvertColorToCatalogs(List<ColorCatalog> catalogs)
{
if (ColorSpace != ColorSpaces.Catalog)
{
- if ( LastChangedColorSpace != ColorSpaces.Catalog)
+ if (LastChangedColorSpace != ColorSpaces.Catalog)
{
if (BestMatchColor == null)
BestMatchColor = Color;
var closestItem = catalogs.SelectMany(x => x.AllItemsOrdered).GetClosestItem(BestMatchColor);
-
+
_colorcatalogsitem = closestItem;
if (ColorCatalogsItemChanged != null)
{
@@ -1540,10 +1540,10 @@ namespace Tango.PPC.Jobs.Models
public void FineTuningConverter(double cyan, double yellow, double magenta, double black)
{
RequiredMaxLiquidTest = true;
-
- ColorSpaces colorSpace = ColorSpaces.LAB;
+
+ ColorSpaces colorSpace = ColorSpaces.LAB;
BrushStop stop = CreateBrushStopForFineTuning(colorSpace, cyan, yellow, magenta, black);
-
+
try
{
IsBusy = true;
@@ -1553,15 +1553,15 @@ namespace Tango.PPC.Jobs.Models
_yellow = (output.SingleCoordinates.OutputLiquids.SingleOrDefault(x => x.LiquidType == PMR.ColorLab.LiquidType.Yellow).Volume);
_magenta = (output.SingleCoordinates.OutputLiquids.SingleOrDefault(x => x.LiquidType == PMR.ColorLab.LiquidType.Magenta).Volume);
_black = (output.SingleCoordinates.OutputLiquids.SingleOrDefault(x => x.LiquidType == PMR.ColorLab.LiquidType.Black).Volume);
- if(_black > 0 && _black < 0.5)//bug 7959 0.001 < K% < 0.5 ==> reset the K to 0.
+ if (_black > 0 && _black < 0.5)//bug 7959 0.001 < K% < 0.5 ==> reset the K to 0.
{
_black = 0;
}
IsOutOfGamut = output.OutOfGamut;
- if(IsOutOfGamut)
+ if (IsOutOfGamut)
{
BrushStop stopLAB = CreateBrushStop(ColorSpaces.Volume);
-
+
IsBusy = true;
var outputLAB = _converter.Convert(stopLAB, SegmentModel.Job.Machine.Configuration, SegmentModel.Job.Rml, false, false, false);
_l = output.SingleCoordinates.L;
@@ -1609,7 +1609,7 @@ namespace Tango.PPC.Jobs.Models
}
InitColorsFromBestmatch();
}
-
+
public void UpdateColorFromFineTuningDlg()
{
Rgb rgb = GetRGBColor();
@@ -1661,17 +1661,24 @@ namespace Tango.PPC.Jobs.Models
}
}
- private double GetMinLimitLiquid( LiquidTypes type)
+ private double GetMinLimitLiquid(LiquidTypes type)
{
try
{
var tables = SegmentModel.Job.Rml.GetActiveProcessGroup().ProcessParametersTables.OrderBy(x => x.TableIndex).ToList();
LiquidTypesRml liquidType = SegmentModel.Job.Rml.LiquidTypesRmls.FirstOrDefault(x => x.LiquidType.Type == type);
-
+
if (tables.Count > 0 && liquidType != null && liquidType.MaxNlPerCm != 0)
{
- return (0.5*tables[0].MinInkUptake)/ liquidType.MaxNlPerCm;
+ var vmax = Math.Max(SegmentModel.Job.Rml.VMax / 10d, 1);
+
+ if (type == LiquidTypes.Black)
+ {
+ vmax = Math.Max(SegmentModel.Job.Rml.VMax, 1);
+ }
+
+ return (vmax * tables[0].MinInkUptake) / liquidType.MaxNlPerCm;
}
else
{
@@ -1697,23 +1704,23 @@ namespace Tango.PPC.Jobs.Models
}
return 0.0;
}
-
+
public void OnBrushStopFieldValueChanged()
{
IsBusy = true;
_volumeConversionTimer.ResetReplace(() =>
{
- if (ColorSpace == BL.Enumerations.ColorSpaces.Volume)
- {
- //RaisePropertyChanged(nameof(IsLiquidVolumesOutOfRange));
- if (IsLiquidVolumesOutOfRange || IsLiquidVolumeBelowMinLimit)
- {
- IsBusy = false;
- return;
- }
- }
- ConvertColor();
+ if (ColorSpace == BL.Enumerations.ColorSpaces.Volume)
+ {
+ //RaisePropertyChanged(nameof(IsLiquidVolumesOutOfRange));
+ if (IsLiquidVolumesOutOfRange || IsLiquidVolumeBelowMinLimit)
+ {
+ IsBusy = false;
+ return;
+ }
+ }
+ ConvertColor();
});
}
@@ -1753,14 +1760,14 @@ namespace Tango.PPC.Jobs.Models
else if (stop.BrushColorSpace == BL.Enumerations.ColorSpaces.LAB)
{
IsOutOfGamut = _converter.IsOutOfGamut(stop, configuration, rml);
- if(IsOutOfGamut)
+ if (IsOutOfGamut)
{
BestMatchL = (double)output.SingleCoordinates.L;
BestMatchA = (double)output.SingleCoordinates.A;
BestMatchB = (double)output.SingleCoordinates.B;
Lab lab = new Lab(output.SingleCoordinates.L, output.SingleCoordinates.A, output.SingleCoordinates.B);
Rgb rgb = new Rgb(lab.ToRgb());
- BestMatchColor = Color.FromRgb((byte)(int)rgb.R, (byte)(int)rgb.G, (byte)(int)rgb.B);
+ BestMatchColor = Color.FromRgb((byte)(int)rgb.R, (byte)(int)rgb.G, (byte)(int)rgb.B);
}
else
{
@@ -1769,13 +1776,13 @@ namespace Tango.PPC.Jobs.Models
BestMatchB = B;
Lab lab1 = new Lab(L, A, B);
Rgb rgb1 = new Rgb(lab1.ToRgb());
- BestMatchColor = Color.FromRgb((byte)(int)rgb1.R, (byte)(int)rgb1.G, (byte)(int)rgb1.B);
+ BestMatchColor = Color.FromRgb((byte)(int)rgb1.R, (byte)(int)rgb1.G, (byte)(int)rgb1.B);
}
}
else if (stop.BrushColorSpace == BL.Enumerations.ColorSpaces.RGB)
{
IsOutOfGamut = _converter.IsOutOfGamut(stop, configuration, rml);
- if(IsOutOfGamut)
+ if (IsOutOfGamut)
{
BestMatchColor = Color.FromRgb((byte)output.SingleCoordinates.Red, (byte)output.SingleCoordinates.Green, (byte)output.SingleCoordinates.Blue);
}
@@ -1783,9 +1790,9 @@ namespace Tango.PPC.Jobs.Models
{
BestMatchColor = Color.FromRgb((byte)Red, (byte)Green, (byte)Blue);
}
- if(IsOutOfGamut != output.OutOfGamut)
+ if (IsOutOfGamut != output.OutOfGamut)
{
-
+
}
}
//else if (stop.BrushColorSpace == BL.Enumerations.ColorSpaces.HSB)
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml
index 9dd37ae73..f46bc7ced 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml
@@ -180,6 +180,9 @@
<TextBlock VerticalAlignment="Bottom">Enable Remote Job Upload</TextBlock>
<touch:TouchToggleSlider Style="{StaticResource TangoToggleButtonGrayAccent}" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="90" IsChecked="{Binding Settings.EnableRemoteJobUpload}" KeyboardNavigation.TabNavigation ="None" IsTabStop="False"></touch:TouchToggleSlider>
+
+ <TextBlock VerticalAlignment="Bottom">Display Jerrycan popup when inserted</TextBlock>
+ <touch:TouchToggleSlider Style="{StaticResource TangoToggleButtonGrayAccent}" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="90" IsChecked="{Binding Settings.EnableJerricanChangePopup}" KeyboardNavigation.TabNavigation ="None" IsTabStop="False"></touch:TouchToggleSlider>
</controls:TableGrid>
<DockPanel Margin="10 -50 0 0">
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs
index 6d75ec3ac..98f8f27fd 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs
@@ -408,10 +408,16 @@ namespace Tango.PPC.Common
public PowerSavingModes PowerSavingModePowerOff { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether to enable the jerrican change popup.
+ /// </summary>
+ public bool EnableJerricanChangePopup { get; set; }
+
+ /// <summary>
/// Initializes a new instance of the <see cref="PPCSettings"/> class.
/// </summary>
public PPCSettings()
{
+ EnableJerricanChangePopup = true;
PowerSavingModeIdle = PowerSavingModes.Default;
PowerSavingModePowerOff = PowerSavingModes.Maximum;
EmulatorMode = EmulatorMode.InMemory;
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml
index 38a5b91b2..8167d17b0 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml
@@ -4,6 +4,7 @@
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop"
xmlns:local="clr-namespace:Tango.PPC.UI"
+ xmlns:localConverters="clr-namespace:Tango.PPC.UI.Converters"
StartupUri="MainWindow.xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" d1p1:Ignorable="d" xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006">
<Application.Resources>
<ResourceDictionary>
@@ -21,8 +22,10 @@
<ResourceDictionary Source="Resources/Fonts.xaml"></ResourceDictionary>
<ResourceDictionary Source="Resources/Styles.xaml"></ResourceDictionary>
<ResourceDictionary Source="Resources/Graphs.xaml" />
-
+
</ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
+
+ <localConverters:LiquidTypeToBrushConverter x:Key="LiquidTypeToBrushConverter" />
+ </ResourceDictionary>
</Application.Resources>
</Application>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/JerricanReplaceView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/JerricanReplaceView.xaml
new file mode 100644
index 000000000..5485db720
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/JerricanReplaceView.xaml
@@ -0,0 +1,45 @@
+<UserControl x:Class="Tango.PPC.UI.Dialogs.JerricanReplaceView"
+ 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:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
+ xmlns:local="clr-namespace:Tango.PPC.UI.Dialogs"
+ mc:Ignorable="d"
+ Background="{StaticResource TangoPrimaryBackgroundBrush}" d:DesignHeight="555" d:DesignWidth="560" Width="570" Height="700" d:DataContext="{d:DesignInstance Type=local:JerricanReplaceViewVM, IsDesignTimeCreatable=False}">
+ <Grid Margin="20">
+ <DockPanel>
+ <Grid DockPanel.Dock="Bottom">
+ <touch:TouchButton HorizontalAlignment="Left" CornerRadius="25" Command="{Binding CloseCommand}" Style="{StaticResource TangoHollowButton}" Width="150" Height="50" VerticalAlignment="Bottom">CANCEL</touch:TouchButton>
+ <touch:TouchButton HorizontalAlignment="Right" CornerRadius="25" Command="{Binding OKCommand}" Style="{StaticResource TangoHollowButton}" Width="150" Height="50" VerticalAlignment="Bottom">OK</touch:TouchButton>
+ </Grid>
+ <StackPanel DockPanel.Dock="Top" Margin="0 0 0 0">
+ <TextBlock Visibility="{Binding IsOpenedManually,Converter={StaticResource BooleanToVisibilityInverseConverter}}" HorizontalAlignment="Left" TextWrapping="Wrap" FontSize="{StaticResource TangoHeaderFontSize}"><Run Text="{Binding IDSPack.LiquidType.Name}"></Run> ink container change detected</TextBlock>
+ <TextBlock Visibility="{Binding IsOpenedManually,Converter={StaticResource BooleanToVisibilityConverter}}" HorizontalAlignment="Left" TextWrapping="Wrap" FontSize="{StaticResource TangoHeaderFontSize}"><Run Text="{Binding IDSPack.LiquidType.Name}"></Run> ink container level</TextBlock>
+
+ <Border BorderBrush="{StaticResource TangoLightBorderBrush}" HorizontalAlignment="Left" BorderThickness="1" CornerRadius="30" Height="150" Width="60" Margin="0 20 0 0">
+ <Border CornerRadius="0 0 30 30" Height="80" VerticalAlignment="Bottom" Background="{Binding IDSPack.LiquidType,Converter={StaticResource LiquidTypeToBrushConverter}}">
+ <TextBlock HorizontalAlignment="Center" Margin="0 -50 0 0">?</TextBlock>
+ </Border>
+ </Border>
+
+ <TextBlock Margin="0 20 0 0" HorizontalAlignment="Left" TextWrapping="Wrap"> How much ink is in the inserted container?</TextBlock>
+
+ <touch:TouchRadioButton IsChecked="{Binding ViewMode,Mode=TwoWay,Converter={StaticResource EnumToBooleanConverter},ConverterParameter='Full'}" Margin="0 20 0 0" Content="5L (new)" />
+
+ <touch:TouchRadioButton IsChecked="{Binding ViewMode,Mode=TwoWay,Converter={StaticResource EnumToBooleanConverter},ConverterParameter='Reinserted'}" Margin="0 10 0 0" Content="No Change (reinserted)" />
+
+ <StackPanel Orientation="Horizontal" Margin="0 10 0 0">
+ <touch:TouchRadioButton VerticalAlignment="Center" x:Name="radioCustom" Foreground="{StaticResource TangoDarkForegroundBrush}" IsChecked="{Binding ViewMode,Mode=TwoWay,Converter={StaticResource EnumToBooleanConverter},ConverterParameter='Custom'}">
+ <TextBlock>Custom (L):</TextBlock>
+ </touch:TouchRadioButton>
+ <touch:TouchNumericUpDownConrol IsEnabled="{Binding ElementName=radioCustom,Path=IsChecked}" Margin="20 0 0 0" FontSize="{StaticResource TangoDefaultFontSize}" MinValue="0.5" MaxValue="5" Step="0.5" Value="{Binding LitersInserted,Mode=TwoWay}" ></touch:TouchNumericUpDownConrol>
+ </StackPanel>
+
+ </StackPanel>
+ <Grid>
+
+ </Grid>
+ </DockPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/JerricanReplaceView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/JerricanReplaceView.xaml.cs
new file mode 100644
index 000000000..d7223a54a
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/JerricanReplaceView.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.UI.Dialogs
+{
+ /// <summary>
+ /// Interaction logic for SpoolReplaceView.xaml
+ /// </summary>
+ public partial class JerricanReplaceView : UserControl
+ {
+ public JerricanReplaceView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/JerricanReplaceViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/JerricanReplaceViewVM.cs
new file mode 100644
index 000000000..44874b8d6
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/JerricanReplaceViewVM.cs
@@ -0,0 +1,54 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL.Entities;
+using Tango.SharedUI;
+
+namespace Tango.PPC.UI.Dialogs
+{
+ public enum JerricanReplaceViewMode
+ {
+ Reinserted,
+ Full,
+ Custom
+ }
+
+ public class JerricanReplaceViewVM : DialogViewVM
+ {
+ public bool IsOpenedManually { get; set; }
+
+ private JerricanReplaceViewMode _mode;
+ public JerricanReplaceViewMode ViewMode
+ {
+ get { return _mode; }
+ set
+ {
+ _mode = value; RaisePropertyChangedAuto();
+ if (_mode == JerricanReplaceViewMode.Full)
+ {
+ LitersInserted = 5;
+ }
+ }
+ }
+
+ private double _litersInserted;
+ public double LitersInserted
+ {
+ get { return _litersInserted; }
+ set
+ {
+ _litersInserted = value;
+ RaisePropertyChangedAuto();
+ }
+ }
+
+ public IdsPack IDSPack { get; set; }
+
+ public JerricanReplaceViewVM()
+ {
+ LitersInserted = 5;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/update_x4.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/update_x4.png
new file mode 100644
index 000000000..9a0b03d2d
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/update_x4.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/JerricanLevelModel.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/JerricanLevelModel.cs
index 13fa455e5..052ef90f6 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/JerricanLevelModel.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/JerricanLevelModel.cs
@@ -5,12 +5,17 @@ using System.Text;
using System.Threading.Tasks;
using Tango.BL.Entities;
using Tango.Core;
+using Tango.Core.Commands;
using Tango.Integration.Operation;
namespace Tango.PPC.UI.Models
{
public class JerricanLevelModel : ExtendedObject
{
+ public RelayCommand PressedCommand { get; set; }
+
+ public event EventHandler<JerricanLevelModel> PressedEvent;
+
public double Max { get; set; }
private double _level;
@@ -19,13 +24,14 @@ namespace Tango.PPC.UI.Models
get { return _level; }
set { _level = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(IsMidTankLow)); }
}
-
+
private bool _bJerricanPresent;
public bool JerricanPresent
{
get { return _bJerricanPresent; }
- set {
+ set
+ {
_bJerricanPresent = value;
RaisePropertyChangedAuto();
}
@@ -44,7 +50,7 @@ namespace Tango.PPC.UI.Models
public bool MidTankEmpty
{
get { return _midTankEmpty; }
- set { _midTankEmpty = value; RaisePropertyChangedAuto();}
+ set { _midTankEmpty = value; RaisePropertyChangedAuto(); }
}
private bool _midTankRefillPumpActive;
@@ -80,6 +86,8 @@ namespace Tango.PPC.UI.Models
//RemainingTimeoutError = new TimeSpan(1,2,0);
JerricanPresent = true;
//FillingTimeoutError = MidTankEmpty = MidTankRefillPumpActive = false;
+
+ PressedCommand = new RelayCommand(() => PressedEvent?.Invoke(this, this));
}
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
index 43fc7b963..4a3d5195c 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
@@ -17,6 +17,8 @@ namespace Tango.PPC.UI.Models
{
public static double DryerAirMaxValue = 120.0;
+ public MachineOverviewItem DryerZone1 { get; set; }
+ public MachineOverviewItem DryerZone2 { get; set; }
public MachineOverviewItem DryerZone3 { get; set; }
public MachineOverviewItem DryerAir { get; set; }
public MachineOverviewItem Tunnel { get; set; }
@@ -45,6 +47,8 @@ namespace Tango.PPC.UI.Models
public MachineOverviewModel()
{
+ DryerZone1 = new MachineOverviewItem();
+ DryerZone2 = new MachineOverviewItem();
DryerZone3 = new MachineOverviewItem();
DryerAir = new MachineOverviewItem();
DryerAir.MaxValue = DryerAirMaxValue;
@@ -60,13 +64,21 @@ namespace Tango.PPC.UI.Models
{
_machineProvider = machineProvider;
+ //Dryer Zone 1
+ var dryerZone1State = diagnostics.HeatersStates.FirstOrDefault(x => x.HeaterType == HeaterType.EDryerHeater1);
+ UpdateHeaterItem(DryerZone1, dryerZone1State);
+
+ //Dryer Zone 2
+ var dryerZone2State = diagnostics.HeatersStates.FirstOrDefault(x => x.HeaterType == HeaterType.EDryerHeater2);
+ UpdateHeaterItem(DryerZone2, dryerZone2State);
+
//Dryer Zone 3
var dryerZone3State = diagnostics.HeatersStates.FirstOrDefault(x => x.HeaterType == HeaterType.EDryerHeater3);
UpdateHeaterItem(DryerZone3, dryerZone3State);
//Dryer Air
- var dryerAirState = diagnostics.Monitors.EuSpare1.FirstOrDefault();
- UpdateDryerAirItem(dryerAirState, processParameters != null ? processParameters.ESpare1 : DryerAirMaxValue);
+ //var dryerAirState = diagnostics.Monitors.EuSpare1.FirstOrDefault();
+ //UpdateDryerAirItem(dryerAirState, processParameters != null ? processParameters.ESpare1 : DryerAirMaxValue);
//diagnostics.HeatersStates.FirstOrDefault(x => x.HeaterType == HeaterType.DryerAirHeater);
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj
index bff9489c5..35620b261 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj
@@ -202,6 +202,10 @@
<DependentUpon>SafetyLevelOperationsConfirmationView.xaml</DependentUpon>
</Compile>
<Compile Include="Dialogs\SafetyLevelOperationsConfirmationViewVM.cs" />
+ <Compile Include="Dialogs\JerricanReplaceView.xaml.cs">
+ <DependentUpon>JerricanReplaceView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Dialogs\JerricanReplaceViewVM.cs" />
<Compile Include="Dialogs\WasteReplacementViewVM.cs" />
<Compile Include="Dialogs\WasteReplacementView.xaml.cs">
<DependentUpon>WasteReplacementView.xaml</DependentUpon>
@@ -378,6 +382,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
+ <Page Include="Dialogs\JerricanReplaceView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
<Page Include="Dialogs\WasteReplacementView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -650,6 +658,7 @@
<Resource Include="Images\Menu\updateVersion.png" />
<Resource Include="Images\machine-X4.png" />
<Resource Include="Images\machine-image-X4.png" />
+ <Resource Include="Images\update_x4.png" />
<Content Include="Intro.wmv" />
<Content Include="Manifests\release.xml" />
<Content Include="Manifests\debug.xml" />
@@ -995,7 +1004,7 @@ if $(ConfigurationName) == Eureka copy /Y "$(ProjectDir)Intro.wmv" "$(TargetDir)
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
+ <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>
<Import Project="..\..\packages\WPFMediaKit.2.2.0\build\WPFMediaKit.targets" Condition="Exists('..\..\packages\WPFMediaKit.2.2.0\build\WPFMediaKit.targets')" />
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
index 1362ac55d..c7ba2e24d 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
@@ -31,6 +31,7 @@ using Tango.PPC.Common.Resume;
using Tango.Core.ExtensionMethods;
using Tango.PPC.Common.Printing;
using Tango.PPC.Common.RemoteJob;
+using Tango.PPC.UI.Dialogs;
namespace Tango.PPC.UI.ViewModels
{
@@ -74,6 +75,7 @@ namespace Tango.PPC.UI.ViewModels
private DispatcherTimer _productiondata_timer;
private bool startingJob = false;
+ private bool _jerricanDialogShowing;
#region Properties
@@ -456,16 +458,24 @@ namespace Tango.PPC.UI.ViewModels
{
Max = x.MidTankType.LiterCapacity,
IDSPack = x,
+ JerricanPresent = true,
}).OrderBy(y => y.IDSPack.LiquidType.Type).ToList();
var LubLevel = MachineProvider.Machine.Configuration.NoneEmptyIdsPacks.Where(x => x.MidTankType.Type == MidTankTypes.LubricantMidTank).FirstOrDefault();
- MidTankLubLevel = new JerricanLevelModel();
+ MidTankLubLevel = new JerricanLevelModel() { JerricanPresent = true };
if (LubLevel != null)
{
MidTankLubLevel.Max = LubLevel.MidTankType.LiterCapacity;
MidTankLubLevel.IDSPack = LubLevel;
};
+ MidTankLubLevel.PressedEvent += MidTankLevel_PressedEvent;
+
+ foreach (var midTank in MidTankLevels)
+ {
+ midTank.PressedEvent += MidTankLevel_PressedEvent;
+ }
+
MachineProvider.MachineOperator.MachineStatusChanged += MachineOperator_MachineStatusChanged;
DateTime dateTime = DateTime.Now;
@@ -514,65 +524,51 @@ namespace Tango.PPC.UI.ViewModels
if (model != null)
{
model.Level = item.MidTankLevel;
+
+ //Detect jerrican inserted
+ if (Settings.EnableJerricanChangePopup)
+ {
+ if (item.JerricanPresent && !model.JerricanPresent)
+ {
+#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
+ ShowAutoJerricanDialog(model);
+#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
+ }
+ }
model.JerricanPresent = item.JerricanPresent;
model.FillingTimeoutError = item.FillingTimeoutError;
model.MidTankEmpty = item.MidTankEmpty;
model.MidTankRefillPumpActive = item.MidTankRefillPumpActive;
model.RemainingTimeoutError = TimeSpan.FromSeconds(item.TimerRemainingSeconds);
}
- //TEST
- //if (model != null)
- //{
- // var Li = model.IDSPack.LiquidType.Type;
- // var Mid = model.IDSPack.MidTankType.Type;
- // model.Level = 0.0;
- //model.JerricanPresent = false;
- //model.FillingTimeoutError = false;
- //model.MidTankEmpty = true;
- //model.MidTankRefillPumpActive = false;
- //model.RemainingTimeoutError = TimeSpan.FromSeconds(300);
+ }
+ }
+ }
+
+ private async Task ShowAutoJerricanDialog(JerricanLevelModel model, bool opendManually = false)
+ {
+ _jerricanDialogShowing = true;
- //if (item.Index == 1)
- //{
- // model.Level = 1.0;
- //}
- //if (item.Index == 2)
- //{
- // model.Level = 2.0;
- //}
- //if (item.Index == 3)
- //{
- // model.Level = 3.0;
- //}
- //if (item.Index == 4)//TI
- //{
- // model.Level = 7.0;
- //}
- //if (item.Index == 5)//LC
- //{
- // model.Level = 7.0;
- //}
- //if (item.Index == 6)//LM
- //{
- // model.Level = 3.5;
- //}
- //if (item.Index == 7)//LY
- //{
- // model.Level = 2.5;
- //}
- // if (item.Index == 8)//Lub
- // {
- // model.Level = 1.5;
- // }
- // if (item.Index ==9)
- // {
- // model.Level = 4.99;
- // }
+ var mode = JerricanReplaceViewMode.Reinserted;
- //}
- //////////////////////////////
+ if (model.HasRemainingTimeoutError)
+ {
+ mode = JerricanReplaceViewMode.Full;
+ }
+
+ var vm = await NotificationProvider.ShowDialog(new JerricanReplaceViewVM() { IsOpenedManually = opendManually, IDSPack = model.IDSPack, ViewMode = mode });
+ if (vm.DialogResult && vm.ViewMode != JerricanReplaceViewMode.Reinserted)
+ {
+ try
+ {
+ await MachineProvider.MachineOperator.SetJerricanInsertedLiters(model.IDSPack.PackIndex, vm.LitersInserted);
+ }
+ catch (Exception ex)
+ {
+ await NotificationProvider.ShowError($"Error setting jerrican level.\n{ex.Message}");
}
}
+ _jerricanDialogShowing = false;
}
private void UpdateMachineStatusErrors(MachineStatus status)
@@ -602,6 +598,17 @@ namespace Tango.PPC.UI.ViewModels
{
var CurrentDateTime = DateTime.Now;
}
+
+ private async void MidTankLevel_PressedEvent(object sender, JerricanLevelModel e)
+ {
+ if (!_jerricanDialogShowing)
+ {
+ _jerricanDialogShowing = true;
+ await ShowAutoJerricanDialog(e, true);
+ _jerricanDialogShowing = false;
+ }
+ }
+
#endregion
#region printing
@@ -752,6 +759,7 @@ namespace Tango.PPC.UI.ViewModels
#region Methods
+
private bool IsEnableGoToJob()
{
return Job != null && _handler != null;
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml
index 60584bc15..ba4769c91 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml
@@ -13,6 +13,7 @@
xmlns:global="clr-namespace:Tango.PPC.UI"
xmlns:models="clr-namespace:Tango.PPC.UI.Models"
xmlns:graphs="clr-namespace:Tango.PPC.UI.Graphs"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:local="clr-namespace:Tango.PPC.UI.Views"
mc:Ignorable="d"
d:DesignHeight="1280" d:DesignWidth="932" d:DataContext="{d:DesignInstance Type=vm:MachineStatusViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MachineStatusViewVM}">
@@ -132,7 +133,34 @@
<TextBlock DockPanel.Dock="Top" Height="15" VerticalAlignment="Top" TextAlignment="Center" Visibility="{Binding HasRemainingTimeoutError,Converter={StaticResource BooleanToVisibilityConverter}}" Text="{Binding RemainingTimeoutError, StringFormat='{}{0:hh}:{0:mm}h', FallbackValue=00:00}" HorizontalAlignment="Center" FontSize="{StaticResource TangoSmallFontSizeBar}" ></TextBlock>
</Grid>
<Grid >
- <Grid ClipToBounds="True" HorizontalAlignment="Center">
+ <Grid ClipToBounds="True" HorizontalAlignment="Center" Background="Transparent">
+ <Grid.Style>
+ <Style TargetType="Grid">
+ <Style.Triggers>
+ <Trigger Property="IsMouseOver" Value="True">
+ <Trigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Storyboard.TargetProperty="Opacity" To="0.8" Duration="00:00:0.2" />
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.EnterActions>
+ <Trigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="00:00:0.2" />
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.ExitActions>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </Grid.Style>
+ <i:Interaction.Triggers>
+ <i:EventTrigger EventName="PreviewMouseUp">
+ <i:InvokeCommandAction Command="{Binding PressedCommand}" />
+ </i:EventTrigger>
+ </i:Interaction.Triggers>
<Path Fill="{Binding Path=IDSPack.LiquidType, Converter={StaticResource LiquidTypeToBrushConverter}}" StrokeThickness="1.5" >
<Path.Resources>
<sys:Double x:Key="RectWidth">30</sys:Double>
@@ -1070,7 +1098,53 @@
<Image Source="../Images/Overview Icons/Sensors.png" Stretch="UniformToFill" VerticalAlignment="Top" HorizontalAlignment="Left" Width="32" Height="32"/>
<TextBlock Margin="12 0 0 0 " VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}">Sensors</TextBlock>
</StackPanel>
- <UniformGrid Columns="5" Rows="1" Height="120" Margin="40 11 40 0" DataContext="{Binding OverviewModel}">
+ <UniformGrid Columns="6" Rows="1" Height="120" Margin="40 11 40 0" DataContext="{Binding OverviewModel}">
+
+ <!--DRYER ZONE 1-->
+ <StackPanel Orientation="Vertical">
+ <Grid>
+ <touch:TouchArcProgress RingThickness="8" Value="{Binding DryerZone1.Value}" Maximum="{Binding DryerZone1.MaxValue}" Minimum="0" Width="100" Height="100">
+ <touch:TouchArcProgress.Foreground>
+ <SolidColorBrush Color="{Binding DryerZone1.Color}"/>
+ </touch:TouchArcProgress.Foreground>
+ </touch:TouchArcProgress>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}" FontWeight="Bold" >
+ <Run Text="{Binding DryerZone1.DisplayValue}">
+ <Run.Foreground>
+ <SolidColorBrush Color="{Binding DryerZone1.Color}"/>
+ </Run.Foreground>
+ </Run>
+ <Run Text="{Binding DryerZone1.DisplayMaxValue}"></Run>
+ </TextBlock>
+ <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoDefaultFontSize}" >&#186;C</TextBlock>
+
+ </Grid>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Dryer Zone 1</TextBlock>
+ </StackPanel>
+
+ <!--DRYER ZONE 2-->
+ <StackPanel Orientation="Vertical">
+ <Grid>
+ <touch:TouchArcProgress RingThickness="8" Value="{Binding DryerZone2.Value}" Maximum="{Binding DryerZone2.MaxValue}" Minimum="0" Width="100" Height="100">
+ <touch:TouchArcProgress.Foreground>
+ <SolidColorBrush Color="{Binding DryerZone2.Color}"/>
+ </touch:TouchArcProgress.Foreground>
+ </touch:TouchArcProgress>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}" FontWeight="Bold" >
+ <Run Text="{Binding DryerZone2.DisplayValue}">
+ <Run.Foreground>
+ <SolidColorBrush Color="{Binding DryerZone2.Color}"/>
+ </Run.Foreground>
+ </Run>
+ <Run Text="{Binding DryerZone2.DisplayMaxValue}"></Run>
+ </TextBlock>
+ <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoDefaultFontSize}" >&#186;C</TextBlock>
+
+ </Grid>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Dryer Zone 2</TextBlock>
+ </StackPanel>
+
+ <!--DRYER ZONE 3-->
<StackPanel Orientation="Vertical">
<Grid>
<touch:TouchArcProgress RingThickness="8" Value="{Binding DryerZone3.Value}" Maximum="{Binding DryerZone3.MaxValue}" Minimum="0" Width="100" Height="100">
@@ -1091,8 +1165,11 @@
</Grid>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Dryer Zone 3</TextBlock>
</StackPanel>
+
+
+
- <StackPanel Orientation="Vertical">
+ <!--<StackPanel Orientation="Vertical">
<Grid>
<touch:TouchArcProgress RingThickness="8" Value="{Binding DryerAir.Value}" Maximum="{Binding DryerAir.MaxValue}" Minimum="0" Width="100" Height="100">
<touch:TouchArcProgress.Foreground>
@@ -1147,7 +1224,8 @@
</TextBlock>
</Grid>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Dryer Air</TextBlock>
- </StackPanel>
+ </StackPanel>-->
+
<StackPanel Orientation="Vertical">
<Grid>
<touch:TouchArcProgress RingThickness="8" Value="{Binding Tunnel.Value}" Maximum="{Binding Tunnel.MaxValue}" Minimum="0" Width="100" Height="100">
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml
index beb09be0d..4013e05bc 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml
@@ -16,7 +16,18 @@
<DockPanel>
<StackPanel DockPanel.Dock="Top" HorizontalAlignment="Center" Margin="0 20 0 0">
- <Image Source="/Images/machine-update.png" Stretch="Fill" Width="700" />
+ <Image Stretch="Fill" Width="700">
+ <Image.Style>
+ <Style TargetType="Image">
+ <Setter Property="Source" Value="/Images/machine-update.png"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding BuildProvider.IsEureka}" Value="True">
+ <Setter Property="Source" Value="/Images/update_x4.png"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Image.Style>
+ </Image>
</StackPanel>
<controls:NavigationControl x:Name="navigationControl" TransitionType="Slide" KeepElementsAttached="True" Margin="0 20 0 0" SelectedIndex="0">
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
index d72e75011..efc5f8179 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
@@ -16,7 +16,7 @@
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
- <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
+ <!--<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />-->
</requestedPrivileges>
</security>
</trustInfo>
diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
index 7562668d5..cf3f9224c 100644
--- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
+++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
@@ -236,12 +236,29 @@ namespace Tango.Emulations.Emulators
tunnel.CurrentValue = 108.5;
tunnel.SetPoint = 170;
}
+
+ var dryerZone1 = _heater_states.FirstOrDefault(x => x.HeaterType == HeaterType.EDryerHeater1);
+ if (dryerZone1 != null)
+ {
+ dryerZone1.IsRampingUp = false;
+ dryerZone1.CurrentValue = 0;
+ dryerZone1.SetPoint = 200;
+ }
+
+ var dryerZone2 = _heater_states.FirstOrDefault(x => x.HeaterType == HeaterType.EDryerHeater2);
+ if (dryerZone2 != null)
+ {
+ dryerZone2.IsRampingUp = false;
+ dryerZone2.CurrentValue = 0;
+ dryerZone2.SetPoint = 200;
+ }
+
var dryerZone3 = _heater_states.FirstOrDefault(x => x.HeaterType == HeaterType.EDryerHeater3);
if (dryerZone3 != null)
{
dryerZone3.IsRampingUp = false;
- dryerZone3.CurrentValue = 200.8;
- dryerZone3.SetPoint = 170;
+ dryerZone3.CurrentValue = 0;
+ dryerZone3.SetPoint = 200;
}
//DryerZone3
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs
index a3c0cc389..74ae6e5cb 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs
@@ -620,5 +620,13 @@ namespace Tango.Integration.Operation
/// <param name="timeToPowerDownMinutes">The time to power down in minutes.</param>
/// <returns></returns>
Task SetPowerSavingMode(int timeToIdleMinutes,int timeToPowerDownMinutes);
+
+ /// <summary>
+ /// Sets the jerrican inserted liters.
+ /// </summary>
+ /// <param name="idsPackIndex">IDS pack index.</param>
+ /// <param name="insertedLiters">The inserted liters.</param>
+ /// <returns></returns>
+ Task SetJerricanInsertedLiters(int idsPackIndex, double insertedLiters);
}
}
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index 85bea26bb..063aa740d 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -4711,7 +4711,7 @@ namespace Tango.Integration.Operation
{
try
{
- LogManager.Log($"Settings machine power saving mode to {timeToIdleMinutes},{timeToPowerDownMinutes} minutes...");
+ LogManager.Log($"Setting machine power saving mode to {timeToIdleMinutes},{timeToPowerDownMinutes} minutes...");
var r = await SendRequest<SetPowerDownTimeRequest, SetPowerDownTimeResponse>(new SetPowerDownTimeRequest()
{
TimeToIdleMinutes = timeToIdleMinutes,
@@ -4725,6 +4725,30 @@ namespace Tango.Integration.Operation
}
}
+ /// <summary>
+ /// Sets the jerrican inserted liters.
+ /// </summary>
+ /// <param name="idsPackIndex">IDS pack index.</param>
+ /// <param name="insertedLiters">The inserted liters.</param>
+ /// <returns></returns>
+ public async Task SetJerricanInsertedLiters(int idsPackIndex, double insertedLiters)
+ {
+ try
+ {
+ LogManager.Log($"Setting jerrican level at index {idsPackIndex} to {insertedLiters} L.");
+ var r = await SendRequest<SetJerricanLevelRequest, SetJerricanLevelResponse>(new SetJerricanLevelRequest()
+ {
+ Index = idsPackIndex,
+ InsertedLiters = insertedLiters
+ });
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, $"Error setting jerrican level.");
+ throw ex;
+ }
+ }
+
#endregion
}
}
diff --git a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs
index d289ba7f0..ce5cdc202 100644
--- a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs
+++ b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs
@@ -22,7 +22,7 @@ namespace Tango.PMR.Common {
static MessageTypeReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
- "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbirlQwoLTWVz",
+ "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbiqiRAoLTWVz",
"c2FnZVR5cGUSCAoETm9uZRAAEhEKDUVycm9yUmVzcG9uc2UQARIUChBDYWxj",
"dWxhdGVSZXF1ZXN0EAMSFQoRQ2FsY3VsYXRlUmVzcG9uc2UQBBITCg9Qcm9n",
"cmVzc1JlcXVlc3QQBRIUChBQcm9ncmVzc1Jlc3BvbnNlEAYSHAoYU3R1YkNh",
@@ -211,12 +211,13 @@ namespace Tango.PMR.Common {
"EiIKHVN0YXJ0SW5rRmlsbGluZ1N0YXR1c1Jlc3BvbnNlEOFdEh4KGUluaXRp",
"YXRlSW5rRmlsbGluZ1JlcXVlc3QQ4l0SHwoaSW5pdGlhdGVJbmtGaWxsaW5n",
"UmVzcG9uc2UQ410SGAoTV2FzdGVSZXBsYWNlUmVxdWVzdBDkXRIZChRXYXN0",
- "ZVJlcGxhY2VSZXNwb25zZRDlXRIcChdQdXREYXRhU3RvcmVJdGVtUmVxdWVz",
- "dBDIZRIdChhQdXREYXRhU3RvcmVJdGVtUmVzcG9uc2UQyWUSHAoXR2V0RGF0",
- "YVN0b3JlSXRlbVJlcXVlc3QQymUSHQoYR2V0RGF0YVN0b3JlSXRlbVJlc3Bv",
- "bnNlEMtlEiEKHERhdGFTdG9yZUl0ZW1Nb2RpZmllZFJlcXVlc3QQzGUSIgod",
- "RGF0YVN0b3JlSXRlbU1vZGlmaWVkUmVzcG9uc2UQzWVCHAoaY29tLnR3aW5l",
- "LnRhbmdvLnBtci5jb21tb25iBnByb3RvMw=="));
+ "ZVJlcGxhY2VSZXNwb25zZRDlXRIcChdTZXRKZXJyaWNhbkxldmVsUmVxdWVz",
+ "dBDmXRIdChhTZXRKZXJyaWNhbkxldmVsUmVzcG9uc2UQ510SHAoXUHV0RGF0",
+ "YVN0b3JlSXRlbVJlcXVlc3QQyGUSHQoYUHV0RGF0YVN0b3JlSXRlbVJlc3Bv",
+ "bnNlEMllEhwKF0dldERhdGFTdG9yZUl0ZW1SZXF1ZXN0EMplEh0KGEdldERh",
+ "dGFTdG9yZUl0ZW1SZXNwb25zZRDLZRIhChxEYXRhU3RvcmVJdGVtTW9kaWZp",
+ "ZWRSZXF1ZXN0EMxlEiIKHURhdGFTdG9yZUl0ZW1Nb2RpZmllZFJlc3BvbnNl",
+ "EM1lQhwKGmNvbS50d2luZS50YW5nby5wbXIuY29tbW9uYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Common.MessageType), }, null));
@@ -563,6 +564,8 @@ namespace Tango.PMR.Common {
[pbr::OriginalName("InitiateInkFillingResponse")] InitiateInkFillingResponse = 12003,
[pbr::OriginalName("WasteReplaceRequest")] WasteReplaceRequest = 12004,
[pbr::OriginalName("WasteReplaceResponse")] WasteReplaceResponse = 12005,
+ [pbr::OriginalName("SetJerricanLevelRequest")] SetJerricanLevelRequest = 12006,
+ [pbr::OriginalName("SetJerricanLevelResponse")] SetJerricanLevelResponse = 12007,
/// <summary>
///DataStore
/// </summary>
diff --git a/Software/Visual_Studio/Tango.PMR/IFS/SetJerricanLevelRequest.cs b/Software/Visual_Studio/Tango.PMR/IFS/SetJerricanLevelRequest.cs
new file mode 100644
index 000000000..a5c5a6777
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/IFS/SetJerricanLevelRequest.cs
@@ -0,0 +1,188 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: SetJerricanLevelRequest.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Tango.PMR.MachineStatus {
+
+ /// <summary>Holder for reflection information generated from SetJerricanLevelRequest.proto</summary>
+ public static partial class SetJerricanLevelRequestReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for SetJerricanLevelRequest.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static SetJerricanLevelRequestReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "Ch1TZXRKZXJyaWNhbkxldmVsUmVxdWVzdC5wcm90bxIXVGFuZ28uUE1SLk1h",
+ "Y2hpbmVTdGF0dXMiQAoXU2V0SmVycmljYW5MZXZlbFJlcXVlc3QSDQoFSW5k",
+ "ZXgYASABKAUSFgoOSW5zZXJ0ZWRMaXRlcnMYAiABKAFCIwohY29tLnR3aW5l",
+ "LnRhbmdvLnBtci5tYWNoaW5lc3RhdHVzYgZwcm90bzM="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.MachineStatus.SetJerricanLevelRequest), global::Tango.PMR.MachineStatus.SetJerricanLevelRequest.Parser, new[]{ "Index", "InsertedLiters" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class SetJerricanLevelRequest : pb::IMessage<SetJerricanLevelRequest> {
+ private static readonly pb::MessageParser<SetJerricanLevelRequest> _parser = new pb::MessageParser<SetJerricanLevelRequest>(() => new SetJerricanLevelRequest());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<SetJerricanLevelRequest> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.MachineStatus.SetJerricanLevelRequestReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SetJerricanLevelRequest() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SetJerricanLevelRequest(SetJerricanLevelRequest other) : this() {
+ index_ = other.index_;
+ insertedLiters_ = other.insertedLiters_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SetJerricanLevelRequest Clone() {
+ return new SetJerricanLevelRequest(this);
+ }
+
+ /// <summary>Field number for the "Index" field.</summary>
+ public const int IndexFieldNumber = 1;
+ private int index_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Index {
+ get { return index_; }
+ set {
+ index_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "InsertedLiters" field.</summary>
+ public const int InsertedLitersFieldNumber = 2;
+ private double insertedLiters_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double InsertedLiters {
+ get { return insertedLiters_; }
+ set {
+ insertedLiters_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as SetJerricanLevelRequest);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(SetJerricanLevelRequest other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Index != other.Index) return false;
+ if (InsertedLiters != other.InsertedLiters) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Index != 0) hash ^= Index.GetHashCode();
+ if (InsertedLiters != 0D) hash ^= InsertedLiters.GetHashCode();
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (Index != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(Index);
+ }
+ if (InsertedLiters != 0D) {
+ output.WriteRawTag(17);
+ output.WriteDouble(InsertedLiters);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (Index != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Index);
+ }
+ if (InsertedLiters != 0D) {
+ size += 1 + 8;
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(SetJerricanLevelRequest other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Index != 0) {
+ Index = other.Index;
+ }
+ if (other.InsertedLiters != 0D) {
+ InsertedLiters = other.InsertedLiters;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 8: {
+ Index = input.ReadInt32();
+ break;
+ }
+ case 17: {
+ InsertedLiters = input.ReadDouble();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/IFS/SetJerricanLevelResponse.cs b/Software/Visual_Studio/Tango.PMR/IFS/SetJerricanLevelResponse.cs
new file mode 100644
index 000000000..8827a5485
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/IFS/SetJerricanLevelResponse.cs
@@ -0,0 +1,131 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: SetJerricanLevelResponse.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Tango.PMR.MachineStatus {
+
+ /// <summary>Holder for reflection information generated from SetJerricanLevelResponse.proto</summary>
+ public static partial class SetJerricanLevelResponseReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for SetJerricanLevelResponse.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static SetJerricanLevelResponseReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "Ch5TZXRKZXJyaWNhbkxldmVsUmVzcG9uc2UucHJvdG8SF1RhbmdvLlBNUi5N",
+ "YWNoaW5lU3RhdHVzIhoKGFNldEplcnJpY2FuTGV2ZWxSZXNwb25zZUIjCiFj",
+ "b20udHdpbmUudGFuZ28ucG1yLm1hY2hpbmVzdGF0dXNiBnByb3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.MachineStatus.SetJerricanLevelResponse), global::Tango.PMR.MachineStatus.SetJerricanLevelResponse.Parser, null, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class SetJerricanLevelResponse : pb::IMessage<SetJerricanLevelResponse> {
+ private static readonly pb::MessageParser<SetJerricanLevelResponse> _parser = new pb::MessageParser<SetJerricanLevelResponse>(() => new SetJerricanLevelResponse());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<SetJerricanLevelResponse> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.MachineStatus.SetJerricanLevelResponseReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SetJerricanLevelResponse() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SetJerricanLevelResponse(SetJerricanLevelResponse other) : this() {
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SetJerricanLevelResponse Clone() {
+ return new SetJerricanLevelResponse(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as SetJerricanLevelResponse);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(SetJerricanLevelResponse other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(SetJerricanLevelResponse other) {
+ if (other == null) {
+ return;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj
index ac425cb03..b5ea1877c 100644
--- a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj
+++ b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj
@@ -247,6 +247,8 @@
<Compile Include="IFS\InitiateInkFillingRequest.cs" />
<Compile Include="IFS\InitiateInkFillingResponse.cs" />
<Compile Include="IFS\InkFillingStatus.cs" />
+ <Compile Include="IFS\SetJerricanLevelRequest.cs" />
+ <Compile Include="IFS\SetJerricanLevelResponse.cs" />
<Compile Include="IFS\StartInkFillingStatusRequest.cs" />
<Compile Include="IFS\StartInkFillingStatusResponse.cs" />
<Compile Include="IFS\WasteReplaceRequest.cs" />
@@ -525,7 +527,7 @@
</PropertyGroup>
<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" />
+ <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.SharedUI/Converters/EnumToBooleanConverter.cs b/Software/Visual_Studio/Tango.SharedUI/Converters/EnumToBooleanConverter.cs
index 567d79c5a..40ca35684 100644
--- a/Software/Visual_Studio/Tango.SharedUI/Converters/EnumToBooleanConverter.cs
+++ b/Software/Visual_Studio/Tango.SharedUI/Converters/EnumToBooleanConverter.cs
@@ -37,7 +37,21 @@ namespace Tango.SharedUI.Converters
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
- throw new NotImplementedException();
+ try
+ {
+ if ((bool)value)
+ {
+ return Enum.Parse(targetType, parameter.ToString());
+ }
+ else
+ {
+ throw new NotImplementedException();
+ }
+ }
+ catch
+ {
+ throw new NotImplementedException();
+ }
}
}
}