aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2021-02-17 23:39:56 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2021-02-17 23:39:56 +0200
commitcbfc5f86577cd3eacac4f97321b75e3e4c0539de (patch)
tree60d5680ac997cae8bc38bdbc8741400a0b833e48 /Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs
parentf9ad6d13e30ce2a2721bcbf631a22095cfca3e4e (diff)
parentf73b3b8043e4f9183a5450afdbb99bcde1b63ff1 (diff)
downloadTango-cbfc5f86577cd3eacac4f97321b75e3e4c0539de.tar.gz
Tango-cbfc5f86577cd3eacac4f97321b75e3e4c0539de.zip
Merged short-cycle-mode branch.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml7
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityViewVM.cs17
2 files changed, 22 insertions, 2 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml
index ad1c2ece3..d2fe31387 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml
@@ -6,11 +6,16 @@
xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
xmlns:local="clr-namespace:Tango.PPC.UI.Dialogs"
mc:Ignorable="d"
- Background="{StaticResource TangoPrimaryBackgroundBrush}" Width="700" Height="800" d:DataContext="{d:DesignInstance Type=local:InsufficientLiquidQuantityViewVM, IsDesignTimeCreatable=False}">
+ Background="{StaticResource TangoPrimaryBackgroundBrush}" Width="700" Height="900" d:DataContext="{d:DesignInstance Type=local:InsufficientLiquidQuantityViewVM, IsDesignTimeCreatable=False}">
<Grid Margin="20">
<DockPanel>
<Grid DockPanel.Dock="Bottom">
<touch:TouchButton HorizontalAlignment="Right" CornerRadius="25" Command="{Binding OKCommand}" Style="{StaticResource TangoHollowButton}" Width="150" Height="50" VerticalAlignment="Bottom">CLOSE</touch:TouchButton>
+
+ <StackPanel HorizontalAlignment="Left" Visibility="{Binding IsAutoInkFillingDisabled,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <TextBlock HorizontalAlignment="Center" Foreground="{StaticResource TangoErrorBrush}">Auto ink filling is disabled</TextBlock>
+ <touch:TouchButton CornerRadius="25" Margin="0 5 0 0" Command="{Binding EnableAutoInkFillingCommand}" Style="{StaticResource TangoHollowButton}" Width="300" Height="50" VerticalAlignment="Bottom">ENABLE AUTO INK FILLING</touch:TouchButton>
+ </StackPanel>
</Grid>
<StackPanel DockPanel.Dock="Top">
<Image Source="/Images/cartridge_validation.png" RenderOptions.BitmapScalingMode="Fant" Stretch="Uniform" Height="120"></Image>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityViewVM.cs
index 8b15d2e00..6d4c90e21 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityViewVM.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Tango.Core.Commands;
using Tango.Integration.Operation;
using Tango.SharedUI;
@@ -12,9 +13,23 @@ namespace Tango.PPC.UI.Dialogs
{
public InsufficientLiquidQuantityException Exception { get; set; }
- public InsufficientLiquidQuantityViewVM(InsufficientLiquidQuantityException ex)
+ public bool IsAutoInkFillingDisabled { get; set; }
+
+ public bool EnableAutoInkFillingOnExit { get; set; }
+
+ public RelayCommand EnableAutoInkFillingCommand { get; set; }
+
+ public InsufficientLiquidQuantityViewVM(InsufficientLiquidQuantityException ex,bool isAutoInkFillingDisabled)
{
Exception = ex;
+ IsAutoInkFillingDisabled = isAutoInkFillingDisabled;
+ EnableAutoInkFillingCommand = new RelayCommand(EnableAutoInkFilling);
+ }
+
+ private void EnableAutoInkFilling()
+ {
+ EnableAutoInkFillingOnExit = true;
+ Accept();
}
}
}