aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC
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 /Software/Visual_Studio/PPC
parent7b0ed51c91baf1257fce45699221a0f1a096ce72 (diff)
downloadTango-0460a54eb73a3943a9d363e7cce38b8d9009bc4b.tar.gz
Tango-0460a54eb73a3943a9d363e7cce38b8d9009bc4b.zip
Jerrycan change impl.
Diffstat (limited to 'Software/Visual_Studio/PPC')
-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
15 files changed, 418 insertions, 146 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>