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