aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2021-08-15 10:27:51 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2021-08-15 10:27:51 +0300
commit97f0fe7eea1711bfe33661332b84f9bf32cc6ae6 (patch)
tree98b505f582bd86705cb4f1847e12e1268715a372 /Software/Visual_Studio/PPC
parent7867b3ac045364fc2aa11a860871bee2bfeb072d (diff)
downloadTango-97f0fe7eea1711bfe33661332b84f9bf32cc6ae6.tar.gz
Tango-97f0fe7eea1711bfe33661332b84f9bf32cc6ae6.zip
Same as previous.
Diffstat (limited to 'Software/Visual_Studio/PPC')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml5
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs7
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs4
3 files changed, 15 insertions, 1 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml
index a13a1a470..7aba9a1ef 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml
@@ -356,6 +356,11 @@
</DockPanel>
<DockPanel Margin="0 20 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
+ <TextBlock VerticalAlignment="Center">Enable Spool Replacement Dialog</TextBlock>
+ <touch:TouchToggleSlider IsChecked="{Binding Settings.EnableSpoolReplacementDialog}" Margin="0 0 100 0" DockPanel.Dock="Right" Style="{StaticResource TangoToggleButtonGrayAccent}" HorizontalAlignment="Right" Width="90"></touch:TouchToggleSlider>
+ </DockPanel>
+
+ <DockPanel Margin="0 20 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
<TextBlock VerticalAlignment="Center">Always Start in Technician Mode</TextBlock>
<touch:TouchToggleSlider IsChecked="{Binding Settings.EnableTechnicianModeByDefault}" Margin="0 0 100 0" DockPanel.Dock="Right" Style="{StaticResource TangoToggleButtonGrayAccent}" HorizontalAlignment="Right" Width="90"></touch:TouchToggleSlider>
</DockPanel>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs
index 112708ca0..ef24fedcc 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs
@@ -294,6 +294,11 @@ namespace Tango.PPC.Common
public List<RmlLubricationLevel> LubricationLevels { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether to enable the raising of the spool replacement dialog.
+ /// </summary>
+ public bool EnableSpoolReplacementDialog { get; set; }
+
+ /// <summary>
/// Gets the machine service address.
/// </summary>
/// <returns></returns>
@@ -350,6 +355,8 @@ namespace Tango.PPC.Common
InsightsSamplingInterval = TimeSpan.FromMinutes(1);
InsightsMaxStorageDuration = TimeSpan.FromDays(30);
InsightsStorageCleanupInterval = TimeSpan.FromMinutes(60);
+
+ EnableSpoolReplacementDialog = true;
}
}
}
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 9f31305f7..4cf8f3da6 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
@@ -32,6 +32,7 @@ namespace Tango.PPC.UI.Printing
{
private IMachineProvider _machineProvider;
private INotificationProvider _notificationProvider;
+ private PPCSettings _settings;
/// <summary>
/// Initializes a new instance of the <see cref="DefaultPrintingManager"/> class.
@@ -41,6 +42,7 @@ namespace Tango.PPC.UI.Printing
{
_machineProvider = machineProvider;
_notificationProvider = notificationProvider;
+ _settings = SettingsManager.Default.GetOrCreate<PPCSettings>();
}
/// <summary>
@@ -61,7 +63,7 @@ namespace Tango.PPC.UI.Printing
#else
try
{
- if (!_machineProvider.MachineOperator.IsSpoolReplaced)
+ if (_settings.EnableSpoolReplacementDialog && !_machineProvider.MachineOperator.IsSpoolReplaced)
{
if (!(await _notificationProvider.ShowDialog(new SpoolReplaceViewVM())).DialogResult)
{