aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy@twine-s.com>2020-12-30 15:11:34 +0000
committerRoy Ben Shabat <Roy@twine-s.com>2020-12-30 15:11:34 +0000
commitd33c19b3ac6803de4b5c8d475832efef131c1a45 (patch)
treeea725abc39def99a755b041c13cba1fe0d594ddc /Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings
parent1bdcaa9f51303bbff682507f31fb3b4414692ca4 (diff)
downloadTango-d33c19b3ac6803de4b5c8d475832efef131c1a45.tar.gz
Tango-d33c19b3ac6803de4b5c8d475832efef131c1a45.zip
Revert "Hope it is fine"
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/MachineSettingsModule.cs2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs229
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml186
3 files changed, 401 insertions, 16 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/MachineSettingsModule.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/MachineSettingsModule.cs
index 477340357..807a70b10 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/MachineSettingsModule.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/MachineSettingsModule.cs
@@ -15,7 +15,7 @@ namespace Tango.PPC.MachineSettings
/// Represents a PPC <see cref="MachineSettingsModule"/>.
/// </summary>
/// <seealso cref="Tango.PPC.Common.PPCModuleBase" />
- [PPCModule(2)]
+ [PPCModule(4)]
public class MachineSettingsModule : PPCModuleBase
{
/// <summary>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
index 8ed512670..20cfd6bf4 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
@@ -9,6 +9,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using Tango.BL;
+using Tango.BL.Builders;
using Tango.BL.Entities;
using Tango.BL.Enumerations;
using Tango.Core.Commands;
@@ -18,6 +19,8 @@ using Tango.PPC.Common;
using Tango.PPC.Common.Connection;
using Tango.PPC.Common.ExternalBridge;
using Tango.PPC.Common.Messages;
+using Tango.PPC.Common.OS;
+using Tango.PPC.Common.UWF;
using Tango.SharedUI.Components;
using Tango.WiFi;
@@ -29,8 +32,17 @@ namespace Tango.PPC.MachineSettings.ViewModels
/// <seealso cref="Tango.PPC.Common.PPCViewModel" />
public class MainViewVM : PPCViewModel
{
+ private TimeZoneInfo _previousTimeZone;
+ private bool _previousEnableUWF;
+
#region Properties
+ [TangoInject]
+ private IOperationSystemManager OperationSystemManager { get; set; }
+
+ [TangoInject]
+ private IUnifiedWriteFilterManager UnifiedWriteFilterManager { get; set; }
+
private Machine _machine;
public Machine Machine
{
@@ -52,6 +64,13 @@ namespace Tango.PPC.MachineSettings.ViewModels
set { _selectedColorSpaces = value; RaisePropertyChangedAuto(); }
}
+ private ObservableCollection<Rml> _rmls;
+ public ObservableCollection<Rml> Rmls
+ {
+ get { return _rmls; }
+ set { _rmls = value; RaisePropertyChangedAuto(); }
+ }
+
private bool _enableHotSpot;
public bool EnableHotSpot
{
@@ -108,6 +127,69 @@ namespace Tango.PPC.MachineSettings.ViewModels
set { _lockScreenPassword = value; RaisePropertyChangedAuto(); }
}
+ private Rml _defaultRML;
+ public Rml DefaultRML
+ {
+ get { return _defaultRML; }
+ set { _defaultRML = value; RaisePropertyChangedAuto(); }
+ }
+
+ private SpoolType _defaultSpoolType;
+ public SpoolType DefaultSpoolType
+ {
+ get { return _defaultSpoolType; }
+ set { _defaultSpoolType = value; RaisePropertyChangedAuto(); }
+ }
+
+ private bool _synchronizeJobs;
+ public bool SynchronizeJobs
+ {
+ get { return _synchronizeJobs; }
+ set { _synchronizeJobs = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); }
+ }
+
+ private bool _synchronizeDiagnostics;
+ public bool SynchronizeDiagnostics
+ {
+ get { return _synchronizeDiagnostics; }
+ set { _synchronizeDiagnostics = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); }
+ }
+
+ private bool _autoCheckForUpdates;
+ public bool AutoCheckForUpdates
+ {
+ get { return _autoCheckForUpdates; }
+ set { _autoCheckForUpdates = value; RaisePropertyChangedAuto(); }
+ }
+
+ private List<TimeZoneInfo> _timeZones;
+ /// <summary>
+ /// Gets or sets the available time zones.
+ /// </summary>
+ public List<TimeZoneInfo> TimeZones
+ {
+ get { return _timeZones; }
+ set { _timeZones = value; RaisePropertyChangedAuto(); }
+ }
+
+ private TimeZoneInfo _selectedTimeZone;
+ /// <summary>
+ /// Gets or sets the selected time zone.
+ /// </summary>
+ public TimeZoneInfo SelectedTimeZone
+ {
+ get { return _selectedTimeZone; }
+ set { _selectedTimeZone = value; RaisePropertyChangedAuto(); }
+ }
+
+ private bool _enableUWF;
+ public bool EnableUWF
+ {
+ get { return _enableUWF; }
+ set { _enableUWF = value; RaisePropertyChangedAuto(); }
+ }
+
+
#endregion
#region Commands
@@ -122,12 +204,18 @@ namespace Tango.PPC.MachineSettings.ViewModels
/// </summary>
public RelayCommand DiscardCommand { get; set; }
+ /// <summary>
+ /// Gets or sets the synchronize command.
+ /// </summary>
+ public RelayCommand SynchronizeCommand { get; set; }
+
#endregion
public MainViewVM()
{
SaveCommand = new RelayCommand(Save);
DiscardCommand = new RelayCommand(Discard);
+ SynchronizeCommand = new RelayCommand(Synchronize, () => !MachineDataSynchronizer.IsSynchronizing && IsFree);
}
private void Discard()
@@ -139,9 +227,9 @@ namespace Tango.PPC.MachineSettings.ViewModels
{
if (Validate())
{
- Machine.SupportedJobTypes = SelectedJobTypes.SynchedSource.ToList();
- Machine.SupportedColorSpaces = SelectedColorSpaces.SynchedSource.ToList();
- Machine.MapPrimitivesWithStrings(MachineProvider.Machine);
+ Settings.SupportedJobTypes = SelectedJobTypes.SynchedSource.ToList();
+ Settings.SupportedColorSpaces = SelectedColorSpaces.SynchedSource.ToList();
+ Machine.MapPropertiesTo(MachineProvider.Machine, MappingFlags.NoReferenceTypes);
Settings.EnableHotSpot = EnableHotSpot;
Settings.HotSpotPassword = HotSpotPassword;
@@ -150,10 +238,73 @@ namespace Tango.PPC.MachineSettings.ViewModels
Settings.EnableLockScreen = EnableLockScreen;
Settings.LockScreenTimeout = TimeSpan.FromMinutes(LockScreenTimeoutMinutes);
Settings.LockScreenPassword = LockScreenPassword;
+ Settings.DefaultRmlGuid = DefaultRML?.Guid;
+ Settings.DefaultSpoolTypeGuid = DefaultSpoolType?.Guid;
+ Settings.SynchronizeJobs = SynchronizeJobs;
+ Settings.SynchronizeDiagnostics = SynchronizeDiagnostics;
+ Settings.AutoCheckForUpdates = AutoCheckForUpdates;
+
+ MachineDataSynchronizer.IsEnabled = SynchronizeJobs || SynchronizeDiagnostics;
+
Settings.Save();
await MachineProvider.SaveMachine();
- await NavigationManager.NavigateBack();
+
+ bool isRestarting = false;
+
+ if (_previousTimeZone.ToStringSafe() != SelectedTimeZone.ToStringSafe())
+ {
+ if (await NotificationProvider.ShowQuestion("Changing the time zone requires the application to restart. Do you wish to restart the application?"))
+ {
+ try
+ {
+ LogManager.Log($"Setting new time zone to '{SelectedTimeZone.ToString()}'.");
+ NotificationProvider.SetGlobalBusyMessage("Setting new time zone...");
+ await OperationSystemManager.ChangeTimeZone(SelectedTimeZone);
+ NotificationProvider.ReleaseGlobalBusyMessage();
+ isRestarting = true;
+ ApplicationManager.Restart();
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error changing the time zone.");
+ NotificationProvider.ReleaseGlobalBusyMessage();
+ await NotificationProvider.ShowError($"Error setting timezone.\n{ex.FlattenMessage()}");
+ }
+ }
+ }
+
+ if (_previousEnableUWF != EnableUWF)
+ {
+ await NotificationProvider.ShowWarning("Changes to disk protection (UWF) will take effect only after a full system restart.");
+
+ try
+ {
+ LogManager.Log($"Changing UWF mode to '{EnableUWF}'.");
+ if (EnableUWF)
+ {
+ NotificationProvider.SetGlobalBusyMessage("Enabling disk protection (UWF)...");
+ await UnifiedWriteFilterManager.Enable();
+ }
+ else
+ {
+ NotificationProvider.SetGlobalBusyMessage("Disabling disk protection (UWF)...");
+ await UnifiedWriteFilterManager.Disable();
+ }
+ NotificationProvider.ReleaseGlobalBusyMessage();
+ }
+ catch (Exception ex)
+ {
+ NotificationProvider.ReleaseGlobalBusyMessage();
+ LogManager.Log(ex, "Error setting UWF mode.");
+ await NotificationProvider.ShowError($"Could not change the disk protection mode\n{ex.FlattenMessage()}");
+ }
+ }
+
+ if (!isRestarting)
+ {
+ await NavigationManager.NavigateBack();
+ }
}
}
@@ -167,10 +318,29 @@ namespace Tango.PPC.MachineSettings.ViewModels
/// </summary>
public override void OnApplicationStarted()
{
+ try
+ {
+ TimeZones = OperationSystemManager.GetAvailableTimeZones().ToList();
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error retrieving available time zones.");
+ }
+ }
+
+ public async override void OnApplicationReady()
+ {
+ base.OnApplicationReady();
+ MachineDataSynchronizer.SynchronizationStarted += (_, __) => InvalidateRelayCommands();
+ MachineDataSynchronizer.SynchronizationEnded += (_, __) => InvalidateRelayCommands();
+ using (ObservablesContext db = ObservablesContext.CreateDefault())
+ {
+ Rmls = await new RmlsCollectionBuilder(db).SetAll().ForHeadType(MachineProvider.Machine.MachineHeadType).ForSite(MachineProvider.Machine.SiteGuid).BuildAsync();
+ }
}
- public override void OnNavigatedTo()
+ public async override void OnNavigatedTo()
{
base.OnNavigatedTo();
@@ -195,8 +365,29 @@ namespace Tango.PPC.MachineSettings.ViewModels
LockScreenTimeoutMinutes = (int)Settings.LockScreenTimeout.TotalMinutes;
LockScreenPassword = Settings.LockScreenPassword;
- SelectedJobTypes = new SelectedObjectCollection<JobTypes>(Enum.GetValues(typeof(JobTypes)).Cast<JobTypes>().ToObservableCollection(), Machine.SupportedJobTypes.ToObservableCollection());
- SelectedColorSpaces = new SelectedObjectCollection<ColorSpaces>(Enum.GetValues(typeof(ColorSpaces)).Cast<ColorSpaces>().Where(x => x.IsUserSpace()).ToObservableCollection(), Machine.SupportedColorSpaces.ToObservableCollection());
+ SelectedJobTypes = new SelectedObjectCollection<JobTypes>(Enum.GetValues(typeof(JobTypes)).Cast<JobTypes>().ToObservableCollection(), Settings.SupportedJobTypes.ToObservableCollection());
+ SelectedColorSpaces = new SelectedObjectCollection<ColorSpaces>(Enum.GetValues(typeof(ColorSpaces)).Cast<ColorSpaces>().Where(x => x.IsUserSpace()).ToObservableCollection(), Settings.SupportedColorSpaces.ToObservableCollection());
+
+ DefaultRML = Adapter.Rmls.SingleOrDefault(x => x.Guid == Settings.DefaultRmlGuid);
+ DefaultSpoolType = Adapter.SpoolTypes.SingleOrDefault(x => x.Guid == Settings.DefaultSpoolTypeGuid);
+
+ SynchronizeJobs = Settings.SynchronizeJobs;
+ SynchronizeDiagnostics = Settings.SynchronizeDiagnostics;
+
+ AutoCheckForUpdates = Settings.AutoCheckForUpdates;
+
+ SelectedTimeZone = TimeZones.SingleOrDefault(x => x.StandardName == TimeZone.CurrentTimeZone.StandardName);
+ _previousTimeZone = SelectedTimeZone;
+
+ try
+ {
+ EnableUWF = await UnifiedWriteFilterManager.IsEnabled();
+ _previousEnableUWF = EnableUWF;
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error getting UWF status.");
+ }
}
private async void OnEnableRemoteAssistanceChanged()
@@ -271,5 +462,29 @@ namespace Tango.PPC.MachineSettings.ViewModels
{
ExternalBridgeService.Enabled = EnableExternalBridge;
}
+
+ private async void Synchronize()
+ {
+ try
+ {
+ IsFree = false;
+ NotificationProvider.SetGlobalBusyMessage("Synchronizing...");
+
+ await MachineDataSynchronizer.Synchronize();
+
+ NotificationProvider.ReleaseGlobalBusyMessage();
+ await NotificationProvider.ShowSuccess("Synchronization completed successfully.");
+ }
+ catch (Exception ex)
+ {
+ NotificationProvider.ReleaseGlobalBusyMessage();
+ await NotificationProvider.ShowError($"Error occurred while trying to synchronize.\n{ex.FlattenMessage()}");
+ }
+ finally
+ {
+ NotificationProvider.ReleaseGlobalBusyMessage();
+ IsFree = true;
+ }
+ }
}
}
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 dd5f89bb2..ba3516be4 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
@@ -5,15 +5,19 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL"
xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
+ xmlns:keyboard="clr-namespace:Tango.Touch.Keyboard;assembly=Tango.Touch"
+ xmlns:sys="clr-namespace:System.Collections;assembly=mscorlib"
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
xmlns:vm="clr-namespace:Tango.PPC.MachineSettings.ViewModels"
xmlns:connectivity="clr-namespace:Tango.PPC.Common.Connectivity;assembly=Tango.PPC.Common"
+ xmlns:adapters="clr-namespace:Tango.Transport.Adapters;assembly=Tango.Transport"
xmlns:global="clr-namespace:Tango.PPC.MachineSettings"
+ xmlns:integrationPMR="clr-namespace:Tango.PMR.Integration;assembly=Tango.PMR"
xmlns:local="clr-namespace:Tango.PPC.MachineSettings.Views"
mc:Ignorable="d"
- d:DesignHeight="2500" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
+ d:DesignHeight="4500" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
- <Grid Background="{StaticResource TangoMidBackgroundBrush}">
+ <Grid Background="{StaticResource TangoMidBackgroundBrush}" IsEnabled="{Binding IsFree}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
@@ -83,7 +87,7 @@
</touch:TouchExpander>
<!--JOBS-->
- <touch:TouchExpander Margin="0 20 0 0" Header="JOBS" IsExpanded="True" FontSize="{StaticResource TangoExpanderHeaderFontSize}">
+ <touch:TouchExpander Margin="0 20 0 0" Header="Jobs" IsExpanded="True" FontSize="{StaticResource TangoExpanderHeaderFontSize}">
<StackPanel>
<controls:TableGrid Margin="10" RowHeight="70" MakeFirstColumnVerticalAlignmentBottom="False" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
<TextBlock VerticalAlignment="Center">Supported Job Types</TextBlock>
@@ -136,14 +140,14 @@
</ItemsControl.ItemTemplate>
</ItemsControl>
- <TextBlock VerticalAlignment="Bottom">Default Thread Type</TextBlock>
- <touch:TouchComboBox HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="200" ItemsSource="{Binding Adapter.Rmls}" SelectedItem="{Binding Machine.DefaultRml}" DisplayMemberPath="Name" ValuePath="Guid"></touch:TouchComboBox>
+ <TextBlock VerticalAlignment="Bottom">Default Thread</TextBlock>
+ <touch:TouchComboBox HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="200" ItemsSource="{Binding Rmls}" SelectedItem="{Binding DefaultRML}" DisplayMemberPath="Name"></touch:TouchComboBox>
- <!--<TextBlock VerticalAlignment="Bottom">Default Spool</TextBlock>
- <touch:TouchComboBox HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="200" ItemsSource="{Binding Adapter.SpoolTypes}" SelectedItem="{Binding Machine.DefaultSpoolType}" DisplayMemberPath="Name"></touch:TouchComboBox>-->
+ <TextBlock VerticalAlignment="Bottom">Default Spool</TextBlock>
+ <touch:TouchComboBox HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="200" ItemsSource="{Binding Adapter.SpoolTypes}" SelectedItem="{Binding DefaultSpoolType}" DisplayMemberPath="Name"></touch:TouchComboBox>
<TextBlock VerticalAlignment="Bottom">Default Segment Length</TextBlock>
- <touch:TouchNumericTextBox HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="200" Minimum="1" Maximum="1000" Value="{Binding Machine.DefaultSegmentLength}" HasDecimalPoint="True" KeyboardContainer="{Binding ElementName=Container}"></touch:TouchNumericTextBox>
+ <touch:TouchNumericTextBox HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="200" Minimum="1" Maximum="1000" Value="{Binding Settings.DefaultSegmentLength}" HasDecimalPoint="True" KeyboardContainer="{Binding ElementName=Container}"></touch:TouchNumericTextBox>
</controls:TableGrid>
@@ -195,6 +199,172 @@
</DockPanel>
</StackPanel>
</touch:TouchExpander>
+
+ <!--SYNCHRONIZATION-->
+ <touch:TouchExpander Margin="0 20 0 0" Header="Cloud Synchronization" IsExpanded="True" FontSize="{StaticResource TangoExpanderHeaderFontSize}">
+ <StackPanel Margin="10 30 10 10">
+
+ <DockPanel TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
+ <StackPanel>
+ <TextBlock VerticalAlignment="Center">Auto Update Check</TextBlock>
+ <DockPanel Margin="0 5 0 0">
+ <touch:TouchIcon VerticalAlignment="Top" Icon="InformationOutline" Foreground="{StaticResource TangoGrayTextBrush}"></touch:TouchIcon>
+ <TextBlock Margin="10 0 0 0" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="{StaticResource TangoSmallFontSize}" Foreground="{StaticResource TangoGrayTextBrush}">
+ Automatically check for software and database updates.
+ </TextBlock>
+ </DockPanel>
+ </StackPanel>
+ <touch:TouchToggleSlider Margin="0 0 100 0" DockPanel.Dock="Right" Style="{StaticResource TangoToggleButtonGrayAccent}" HorizontalAlignment="Right" Width="90" IsChecked="{Binding AutoCheckForUpdates}"></touch:TouchToggleSlider>
+ </DockPanel>
+
+ <DockPanel Margin="0 40 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
+ <StackPanel>
+ <TextBlock VerticalAlignment="Center">Synchronize Jobs</TextBlock>
+ <DockPanel Margin="0 5 0 0">
+ <touch:TouchIcon VerticalAlignment="Top" Icon="InformationOutline" Foreground="{StaticResource TangoGrayTextBrush}"></touch:TouchIcon>
+ <TextBlock Margin="10 0 0 0" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="{StaticResource TangoSmallFontSize}" Foreground="{StaticResource TangoGrayTextBrush}">
+ Synchronize your jobs with twine's cloud services.
+ </TextBlock>
+ </DockPanel>
+ </StackPanel>
+ <touch:TouchToggleSlider Margin="0 0 100 0" DockPanel.Dock="Right" Style="{StaticResource TangoToggleButtonGrayAccent}" HorizontalAlignment="Right" Width="90" IsChecked="{Binding SynchronizeJobs}"></touch:TouchToggleSlider>
+ </DockPanel>
+
+ <DockPanel Margin="0 40 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
+ <StackPanel>
+ <TextBlock VerticalAlignment="Center">Synchronize Diagnostics Data</TextBlock>
+ <DockPanel Margin="0 5 0 0">
+ <touch:TouchIcon VerticalAlignment="Top" Icon="InformationOutline" Foreground="{StaticResource TangoGrayTextBrush}"></touch:TouchIcon>
+ <TextBlock Margin="10 0 0 0" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="{StaticResource TangoSmallFontSize}" Foreground="{StaticResource TangoGrayTextBrush}">
+ Help us improve your experience using this system.
+ </TextBlock>
+ </DockPanel>
+ </StackPanel>
+ <touch:TouchToggleSlider Margin="0 0 100 0" DockPanel.Dock="Right" Style="{StaticResource TangoToggleButtonGrayAccent}" HorizontalAlignment="Right" Width="90" IsChecked="{Binding SynchronizeDiagnostics}"></touch:TouchToggleSlider>
+ </DockPanel>
+
+ <DockPanel Margin="0 40 0 0">
+ <touch:TouchIcon VerticalAlignment="Top" Icon="InformationOutline" Foreground="{StaticResource TangoGrayTextBrush}"></touch:TouchIcon>
+ <TextBlock Margin="10 0 0 0" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="{StaticResource TangoSmallFontSize}" Foreground="{StaticResource TangoGrayTextBrush}">
+ Once enabled, synchronization occurs automatically in the background. you can choose to synchronize right now.
+ </TextBlock>
+ </DockPanel>
+ <touch:TouchButton Command="{Binding SynchronizeCommand}" IsEnabled="{Binding MachineDataSynchronizer.IsEnabled}" HorizontalAlignment="Left" Margin="25 10 0 0" Style="{StaticResource TangoHollowButton}" FontSize="{StaticResource TangoDefaultFontSize}" Padding="15 10" CornerRadius="22">Synchronize Now</touch:TouchButton>
+ </StackPanel>
+ </touch:TouchExpander>
+
+ <!--DATE & TIME-->
+ <touch:TouchExpander Margin="0 20 0 0" Header="Date &amp; Time" IsExpanded="True" FontSize="{StaticResource TangoExpanderHeaderFontSize}" Visibility="{Binding ApplicationManager.IsInTechnicianMode,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <StackPanel Margin="10 30 10 10">
+
+ <DockPanel TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
+ <StackPanel>
+ <TextBlock VerticalAlignment="Center">Time Zone</TextBlock>
+ <touch:TouchComboBox Margin="0 10 0 0" ItemsSource="{Binding TimeZones}" SelectedItem="{Binding SelectedTimeZone,Mode=TwoWay}">
+
+ </touch:TouchComboBox>
+ </StackPanel>
+ </DockPanel>
+ </StackPanel>
+ </touch:TouchExpander>
+
+ <!--TECHNICIAN-->
+ <touch:TouchExpander Visibility="{Binding ApplicationManager.IsInTechnicianMode,Converter={StaticResource BooleanToVisibilityConverter}}" Margin="0 20 0 0" Header="Advanced" IsExpanded="True" FontSize="{StaticResource TangoExpanderHeaderFontSize}">
+ <StackPanel Margin="10 30 10 10">
+
+ <DockPanel TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
+ <TextBlock VerticalAlignment="Center">Embedded COM Port</TextBlock>
+ <touch:TouchTextBox KeyboardContainer="{Binding ElementName=Container}" Text="{Binding Settings.EmbeddedComPort}" Margin="0 0 100 0" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="90"></touch:TouchTextBox>
+ </DockPanel>
+
+ <DockPanel Margin="0 20 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
+ <TextBlock VerticalAlignment="Center">Emergency COM Port</TextBlock>
+ <touch:TouchTextBox KeyboardContainer="{Binding ElementName=Container}" Text="{Binding Settings.EmergencyComPort}" Margin="0 0 100 0" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="90"></touch:TouchTextBox>
+ </DockPanel>
+
+ <DockPanel Margin="0 20 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
+ <TextBlock VerticalAlignment="Center">Enable Emergency Screen</TextBlock>
+ <touch:TouchToggleSlider IsChecked="{Binding Settings.EnableEmergencyNotifications}" 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">Enable Embedded Debug Logs</TextBlock>
+ <touch:TouchToggleSlider IsChecked="{Binding Settings.EnableEmbeddedDebugLogs}" 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">Enable Automatic Thread Loading Support</TextBlock>
+ <touch:TouchToggleSlider IsChecked="{Binding Settings.EnableAutomaticThreadLoading}" 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">Display PowerUp Screen</TextBlock>
+ <touch:TouchToggleSlider IsChecked="{Binding Settings.DisplayPowerUpScreen}" 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">Enable Job Liquid Quantity Validation</TextBlock>
+ <touch:TouchToggleSlider IsChecked="{Binding Settings.EnableJobLiquidQuantityValidation}" 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>
+
+ <DockPanel Margin="0 20 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
+ <TextBlock VerticalAlignment="Center">Enable External Bridge SignalR</TextBlock>
+ <touch:TouchToggleSlider IsChecked="{Binding Settings.EnableExternalBridgeSignalR}" 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">Auto Update Check Interval Minutes</TextBlock>
+ <touch:TouchNumericTextBox Minimum="1" Maximum="120" KeyboardContainer="{Binding ElementName=Container}" Value="{Binding Settings.AutoUpdateCheckInterval,Converter={StaticResource TimeSpanToMinutesConverter}}" Margin="0 0 100 0" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="90"></touch:TouchNumericTextBox>
+ </DockPanel>
+
+ <DockPanel Margin="0 20 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
+ <TextBlock VerticalAlignment="Center">Bypass Internet Connectivity Checks</TextBlock>
+ <touch:TouchToggleSlider IsChecked="{Binding Settings.BypassInternetConnectivityCheck}" 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">Gradient Resolution CM</TextBlock>
+ <touch:TouchNumericTextBox Minimum="10" Maximum="500" KeyboardContainer="{Binding ElementName=Container}" Value="{Binding Settings.GradientGenerationResolution}" Margin="0 0 100 0" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="90"></touch:TouchNumericTextBox>
+ </DockPanel>
+
+ <DockPanel Margin="0 20 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
+ <TextBlock VerticalAlignment="Center">Enable Insights</TextBlock>
+ <touch:TouchToggleSlider IsChecked="{Binding Settings.InsightsEnabled}" 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">Insights Sampling Interval (sec)</TextBlock>
+ <touch:TouchNumericTextBox Minimum="1" Maximum="300" KeyboardContainer="{Binding ElementName=Container}" Value="{Binding Settings.InsightsSamplingInterval,Converter={StaticResource TimeSpanToSecondsConverter}}" Margin="0 0 100 0" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="90"></touch:TouchNumericTextBox>
+ </DockPanel>
+
+ <DockPanel Margin="0 20 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
+ <TextBlock VerticalAlignment="Center">Insights Storage Cleanup Interval (min)</TextBlock>
+ <touch:TouchNumericTextBox Minimum="1" Maximum="120" KeyboardContainer="{Binding ElementName=Container}" Value="{Binding Settings.InsightsStorageCleanupInterval,Converter={StaticResource TimeSpanToMinutesConverter}}" Margin="0 0 100 0" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="90"></touch:TouchNumericTextBox>
+ </DockPanel>
+
+ <DockPanel Margin="0 20 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
+ <TextBlock VerticalAlignment="Center">Insights Max Storage Duration (days)</TextBlock>
+ <touch:TouchNumericTextBox Minimum="1" Maximum="120" KeyboardContainer="{Binding ElementName=Container}" Value="{Binding Settings.InsightsMaxStorageDuration,Converter={StaticResource TimeSpanToDaysConverter}}" Margin="0 0 100 0" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="90"></touch:TouchNumericTextBox>
+ </DockPanel>
+
+ <DockPanel Margin="0 20 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
+ <TextBlock VerticalAlignment="Center">Enable UWF (Disk Protection)</TextBlock>
+ <touch:TouchToggleSlider IsChecked="{Binding EnableUWF}" Margin="0 0 100 0" DockPanel.Dock="Right" Style="{StaticResource TangoToggleButtonGrayAccent}" HorizontalAlignment="Right" Width="90"></touch:TouchToggleSlider>
+ </DockPanel>
+
+ <DockPanel Margin="0 20 0 0">
+ <touch:TouchIcon VerticalAlignment="Top" Icon="InformationOutline" Foreground="{StaticResource TangoGrayTextBrush}"></touch:TouchIcon>
+ <TextBlock Margin="10 0 0 0" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="{StaticResource TangoSmallFontSize}" Foreground="{StaticResource TangoGrayTextBrush}">
+ Please restart the application for advanced settings to take effect.
+ </TextBlock>
+ </DockPanel>
+ </StackPanel>
+ </touch:TouchExpander>
</StackPanel>
</touch:LightTouchScrollViewer>
</Grid>