aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI
diff options
context:
space:
mode:
authorRoy <Roy.mail.net@gmail.com>2022-07-06 21:58:07 +0300
committerRoy <Roy.mail.net@gmail.com>2022-07-06 21:58:07 +0300
commit9fa564ba8bdc768425f979eba55c95c03efea09e (patch)
treef6d47c5acdc705b61d886922e7f5463736bdb6b2 /Software/Visual_Studio/PPC/Tango.PPC.UI
parentcb84ea0240829179a36f6fdcce378154e6abc03e (diff)
downloadTango-9fa564ba8bdc768425f979eba55c95c03efea09e.tar.gz
Tango-9fa564ba8bdc768425f979eba55c95c03efea09e.zip
Completed auto/start ink filling change.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml4
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityViewVM.cs16
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs15
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml4
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest2
5 files changed, 19 insertions, 22 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 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 @@
<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}}">
+ <StackPanel HorizontalAlignment="Left" Visibility="{Binding IsAutoInkFillingEnabled,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
<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>
+ <touch:TouchButton CornerRadius="25" Margin="0 5 0 0" Command="{Binding StartAutoInkFillingCommand}" Style="{StaticResource TangoHollowButton}" Width="300" Height="50" VerticalAlignment="Bottom">START INK FILLING</touch:TouchButton>
</StackPanel>
</Grid>
<StackPanel DockPanel.Dock="Top">
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<SetInkAutoFillingModeRequest, SetInkAutoFillingModeResponse>(new SetInkAutoFillingModeRequest()
- {
- Disabled = false
- });
+ _notificationProvider.SetGlobalBusyMessage("Starting ink filling...");
+ await _machineProvider.MachineOperator.SendRequest<InitiateInkFillingRequest, InitiateInkFillingResponse>(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 @@
<Style TargetType="Grid">
<Setter Property="Visibility" Value="Hidden"></Setter>
<Style.Triggers>
- <DataTrigger Binding="{Binding MachineProvider.MachineOperator.MachineStatus.AutoInkFillingDisabled}" Value="True">
+ <DataTrigger Binding="{Binding MachineProvider.MachineOperator.MachineStatus.AutoInkFillingEnabled}" Value="True">
<Setter Property="Visibility" Value="Visible"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding MachineProvider.MachineOperator.IsConnected}" Value="False">
@@ -300,7 +300,7 @@
</Style.Triggers>
</Style>
</Grid.Style>
- <touch:TouchIcon Icon="LightningBoltOutline" Foreground="#151515" Width="24" Height="24" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 3 -35 0"></touch:TouchIcon>
+ <touch:TouchIcon Icon="InvertColors" Foreground="#151515" Width="18" Height="18" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 6 -30 0"></touch:TouchIcon>
</Grid>
</Grid>
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>