From c698425b1ab832fe351aff257815709c01950fc3 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 6 Nov 2019 18:06:45 +0200 Subject: Implemented liquid quantity validation on PPC and MS. Improved PPC full control view. --- .../Dialogs/InsufficientLiquidQuantityView.xaml | 78 ---------------------- .../Dialogs/InsufficientLiquidQuantityView.xaml.cs | 54 --------------- .../Dialogs/InsufficientLiquidQuantityViewVM.cs | 20 ------ 3 files changed, 152 deletions(-) delete mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml delete mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityViewVM.cs (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml deleted file mode 100644 index f3c471954..000000000 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - CLOSE - - - - Insufficient Ink Level - - There seems to be an insufficient ink levels in one or more of the following dispensers. - The job cannot be completed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml.cs deleted file mode 100644 index 9ec1eec0e..000000000 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; -using Tango.Integration.Operation; -using static Tango.Integration.Operation.InsufficientLiquidQuantityException; - -namespace Tango.PPC.UI.Dialogs -{ - /// - /// Interaction logic for InsufficientLiquidQuantityView.xaml - /// - public partial class InsufficientLiquidQuantityView : UserControl - { - public InsufficientLiquidQuantityView() - { - InitializeComponent(); - } - - private void IdsPackLoaded(object sender, RoutedEventArgs e) - { - Border border = sender as Border; - Grid parent = border.Parent as Grid; - IDSPackLevel packLevel = border.DataContext as IDSPackLevel; - - border.Height = ((double)packLevel.Current / (double)MachineOperator.MAX_DISPENSER_NANOLITER) * parent.ActualHeight; - } - - private void Limit_Loaded(object sender, RoutedEventArgs e) - { - Rectangle rect = sender as Rectangle; - Grid parent = rect.Parent as Grid; - IDSPackLevel packLevel = rect.DataContext as IDSPackLevel; - - var top = ((double)packLevel.Required / (double)MachineOperator.MAX_DISPENSER_NANOLITER) * parent.ActualHeight; - rect.Margin = new Thickness(0, 0, 0, top); - - if (packLevel.IsValid) - { - rect.Visibility = Visibility.Hidden; - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityViewVM.cs deleted file mode 100644 index 8b15d2e00..000000000 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityViewVM.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.Integration.Operation; -using Tango.SharedUI; - -namespace Tango.PPC.UI.Dialogs -{ - public class InsufficientLiquidQuantityViewVM : DialogViewVM - { - public InsufficientLiquidQuantityException Exception { get; set; } - - public InsufficientLiquidQuantityViewVM(InsufficientLiquidQuantityException ex) - { - Exception = ex; - } - } -} -- cgit v1.3.1