From 9fa564ba8bdc768425f979eba55c95c03efea09e Mon Sep 17 00:00:00 2001 From: Roy Date: Wed, 6 Jul 2022 21:58:07 +0300 Subject: Completed auto/start ink filling change. --- .../Dialogs/InsufficientLiquidQuantityView.xaml | 4 ++-- .../Dialogs/InsufficientLiquidQuantityViewVM.cs | 16 ++++++++-------- .../PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs | 15 ++++++--------- .../Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml | 4 ++-- Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest | 2 +- 5 files changed, 19 insertions(+), 22 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI') 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 d2fe31387..d9ec6d1c2 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml @@ -12,9 +12,9 @@ CLOSE - + Auto ink filling is disabled - ENABLE AUTO INK FILLING + START INK FILLING 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 6d4c90e21..20f1fc18a 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityViewVM.cs @@ -13,22 +13,22 @@ namespace Tango.PPC.UI.Dialogs { public InsufficientLiquidQuantityException Exception { get; set; } - public bool IsAutoInkFillingDisabled { get; set; } + public bool IsAutoInkFillingEnabled { get; set; } - public bool EnableAutoInkFillingOnExit { get; set; } + public bool StartAutoInkFillingOnExit { get; set; } - public RelayCommand EnableAutoInkFillingCommand { get; set; } + public RelayCommand StartAutoInkFillingCommand { get; set; } - public InsufficientLiquidQuantityViewVM(InsufficientLiquidQuantityException ex,bool isAutoInkFillingDisabled) + public InsufficientLiquidQuantityViewVM(InsufficientLiquidQuantityException ex,bool isAutoInkFillingEnabled) { Exception = ex; - IsAutoInkFillingDisabled = isAutoInkFillingDisabled; - EnableAutoInkFillingCommand = new RelayCommand(EnableAutoInkFilling); + IsAutoInkFillingEnabled = isAutoInkFillingEnabled; + StartAutoInkFillingCommand = new RelayCommand(StartAutoInkFilling); } - private void EnableAutoInkFilling() + private void StartAutoInkFilling() { - EnableAutoInkFillingOnExit = true; + StartAutoInkFillingOnExit = true; Accept(); } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs index 9856faf3d..938d99451 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs @@ -104,22 +104,19 @@ namespace Tango.PPC.UI.Printing _notificationProvider.ReleaseGlobalBusyMessage(); LogManager.Log(ex); - var vm = await _notificationProvider.ShowDialog(new InsufficientLiquidQuantityViewVM(ex, _machineProvider.MachineOperator.MachineStatus.AutoInkFillingDisabled)); + var vm = await _notificationProvider.ShowDialog(new InsufficientLiquidQuantityViewVM(ex, _machineProvider.MachineOperator.MachineStatus.AutoInkFillingEnabled)); - if (vm.EnableAutoInkFillingOnExit) + if (vm.StartAutoInkFillingOnExit) { try { - _notificationProvider.SetGlobalBusyMessage("Enabling auto ink filling..."); - await _machineProvider.MachineOperator.SendRequest(new SetInkAutoFillingModeRequest() - { - Disabled = false - }); + _notificationProvider.SetGlobalBusyMessage("Starting ink filling..."); + await _machineProvider.MachineOperator.SendRequest(new InitiateInkFillingRequest()); } catch (Exception exx) { - LogManager.Log(exx, "Error enabling ink filling."); - await _notificationProvider.ShowError($"Error enabling auto ink filling.\n{ex.Message}"); + LogManager.Log(exx, "Error starting ink filling."); + await _notificationProvider.ShowError($"Error starting ink filling.\n{ex.Message}"); } finally { diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml index ff35fb059..1417c79f3 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml @@ -291,7 +291,7 @@ - + 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. --> - + -- cgit v1.3.1