diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2019-04-23 22:25:54 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2019-04-23 22:25:54 +0300 |
| commit | ebcb9ce27131e4bbd14c96b5f897a67bc752aaeb (patch) | |
| tree | 293aee8b1751ce7fce542645722c0f1a96b73097 /Software/Visual_Studio/PPC/Tango.PPC.Common | |
| parent | 52967e858bd52621208f6360e84f4c47ec435816 (diff) | |
| parent | 636ad730569dfef1a4ee04c8d716d510bcc47ee1 (diff) | |
| download | Tango-ebcb9ce27131e4bbd14c96b5f897a67bc752aaeb.tar.gz Tango-ebcb9ce27131e4bbd14c96b5f897a67bc752aaeb.zip | |
merge alarm handling from remote
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common')
13 files changed, 190 insertions, 54 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Application/IPPCApplicationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Application/IPPCApplicationManager.cs index 7769c74f6..5f58be48b 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Application/IPPCApplicationManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Application/IPPCApplicationManager.cs @@ -56,6 +56,11 @@ namespace Tango.PPC.Common.Application bool IsShuttingDown { get; } /// <summary> + /// Gets a value indicating whether the application is in technician mode. + /// </summary> + bool IsInTechnicianMode { get; } + + /// <summary> /// Shutdown the application. /// </summary> void ShutDown(); @@ -73,7 +78,7 @@ namespace Tango.PPC.Common.Application /// <summary> /// Enteres the application technician mode. /// </summary> - void EnterTechnicianMode(); + void EnterTechnicianMode(bool displayNotification = true); /// <summary> /// Exits the application technician mode. @@ -89,5 +94,20 @@ namespace Tango.PPC.Common.Application /// Gets the application build date. /// </summary> String BuildDate { get; } + + /// <summary> + /// Gets or sets a value indicating whether the screen is currently locked. + /// </summary> + bool IsScreenLocked { get; set; } + + /// <summary> + /// Resets the screen lock timer. + /// </summary> + void ResetScreenLockTimer(); + + /// <summary> + /// Invokes a dialog for entering a password and releasing the screen lock. + /// </summary> + void ReleaseScreenLock(); } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs index 9a7e29bb7..61ddfdb2b 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs @@ -79,6 +79,13 @@ namespace Tango.PPC.Common.Connection MachineOperator.UseKeepAlive = true; MachineOperator.EnableDiagnostics = false; MachineOperator.EnableEmbeddedDebugging = false; + + var settings = SettingsManager.Default.GetOrCreate<PPCSettings>(); + + MachineOperator.JobUploadStrategy = settings.JobUploadStrategy; + + MachineOperator.GradientGenerationConfiguration.IsEnabled = settings.EnableGradientGeneration; + MachineOperator.GradientGenerationConfiguration.ResolutionCM = settings.GradientGenerationResolution; } private async void ConnectionThreadMethod() @@ -89,7 +96,7 @@ namespace Tango.PPC.Common.Connection { try { - LogManager.Log("Starting machine connection procedure..."); + LogManager.Log("Starting machine connection procedure...", LogCategory.Debug); var settings = SettingsManager.Default.GetOrCreate<PPCSettings>(); @@ -99,20 +106,28 @@ namespace Tango.PPC.Common.Connection { TimeSpan timeout = TimeSpan.FromSeconds(SettingsManager.Default.GetOrCreate<PPCSettings>().MachineScanningTimeoutSeconds); - LogManager.Log("Scanning for machine on available serial ports..."); + LogManager.Log("Scanning for machine on available serial ports...", LogCategory.Debug); Transport.Discovery.UsbCommunicationScanner<ConnectRequest, ConnectResponse> scanner = new Transport.Discovery.UsbCommunicationScanner<ConnectRequest, ConnectResponse>(UsbSerialBaudRates.BR_115200); var response = await scanner.Scan(new ConnectRequest() { Password = "1234" }, timeout); - LogManager.Log("Machine discovered on port: " + response.Adapter.Address); - LogManager.Log("Device Information:"); - LogManager.Log(response.Response.DeviceInformation.ToJsonString()); + LogManager.Log("Machine discovered on port: " + response.Adapter.Address, LogCategory.Debug); + LogManager.Log("Device Information:", LogCategory.Debug); + LogManager.Log(response.Response.DeviceInformation.ToJsonString(), LogCategory.Debug); - LogManager.Log("Disconnecting machine operator..."); + LogManager.Log("Disconnecting machine operator...", LogCategory.Debug); await MachineOperator.Disconnect(); MachineOperator.Adapter = response.Adapter; MachineOperator.JobHandlingMode = JobHandlerModes.SettingUp; - LogManager.Log("Connecting machine operator..."); - await MachineOperator.Connect(); + LogManager.Log("Connecting machine operator...", LogCategory.Debug); + try + { + await MachineOperator.Connect(); + } + catch (Exception) + { + await response.Adapter.Disconnect(); + throw; + } await Task.Delay(1000); @@ -120,12 +135,20 @@ namespace Tango.PPC.Common.Connection } else { - LogManager.Log($"Connecting to machine on {settings.EmbeddedComPort}..."); + LogManager.Log($"Connecting to machine on {settings.EmbeddedComPort}...", LogCategory.Debug); UsbTransportAdapter adapter = new UsbTransportAdapter(settings.EmbeddedComPort, UsbSerialBaudRates.BR_115200); MachineOperator.Adapter = adapter; MachineOperator.JobHandlingMode = JobHandlerModes.SettingUp; - await MachineOperator.Connect(); + try + { + await MachineOperator.Connect(); + } + catch (Exception) + { + await adapter.Disconnect(); + throw; + } await Task.Delay(1000); await MachineOperator.UploadHardwareConfiguration(Machine.Configuration.HardwareVersion, Machine.Configuration); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connectivity/AvailableWiFiConnectionsControl.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connectivity/AvailableWiFiConnectionsControl.xaml index 80581551e..dac37ba10 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connectivity/AvailableWiFiConnectionsControl.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connectivity/AvailableWiFiConnectionsControl.xaml @@ -64,8 +64,8 @@ <Grid Margin="20" Visibility="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected,Converter={StaticResource BooleanToVisibilityConverter}}"> <Grid Height="80"> <touch:TouchCheckBox VerticalAlignment="Top" Margin="60 0 0 0" IsChecked="{Binding AutoConnect}" Visibility="{Binding IsConnected,Converter={StaticResource BooleanToVisibilityInverseConverter}}">Connect automatically</touch:TouchCheckBox> - <touch:TouchButton Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ConnectToWiFiCommand}" CommandParameter="{Binding}" Width="150" CornerRadius="17" Height="40" HorizontalAlignment="Right" VerticalAlignment="Bottom" Visibility="{Binding IsConnected,Converter={StaticResource BooleanToVisibilityInverseConverter}}">Connect</touch:TouchButton> - <touch:TouchButton Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.DisconnectFromWiFiCommand}" CommandParameter="{Binding}" Width="150" CornerRadius="17" Height="40" HorizontalAlignment="Right" VerticalAlignment="Bottom" Visibility="{Binding IsConnected,Converter={StaticResource BooleanToVisibilityConverter}}">Disconnect</touch:TouchButton> + <touch:TouchButton EnableDropShadow="False" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ConnectToWiFiCommand}" CommandParameter="{Binding}" Width="150" CornerRadius="17" Height="40" HorizontalAlignment="Right" VerticalAlignment="Bottom" Visibility="{Binding IsConnected,Converter={StaticResource BooleanToVisibilityInverseConverter}}">Connect</touch:TouchButton> + <touch:TouchButton EnableDropShadow="False" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.DisconnectFromWiFiCommand}" CommandParameter="{Binding}" Width="150" CornerRadius="17" Height="40" HorizontalAlignment="Right" VerticalAlignment="Bottom" Visibility="{Binding IsConnected,Converter={StaticResource BooleanToVisibilityConverter}}">Disconnect</touch:TouchButton> </Grid> <Grid Visibility="{Binding Connecting,Converter={StaticResource BooleanToVisibilityConverter}}" Background="{StaticResource TangoMidBackgroundBrush}"> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml index fe483420a..db6920c80 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml @@ -4,6 +4,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Tango.PPC.Common.Controls" + xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" xmlns:catalog="clr-namespace:Tango.BL.Catalogs;assembly=Tango.BL" mc:Ignorable="d" @@ -16,12 +17,17 @@ <ColumnDefinition Width="0"/> </Grid.ColumnDefinitions> - <touch:TouchListBox ItemsSource="{Binding Groups}" x:Name="list" x:FieldModifier="public" DisableRipple="True" ScrollBarVisibility="Collapsed" SelectionMode="None"> - <touch:TouchListBox.ItemTemplate> + <ListBox Style="{StaticResource BlankListBox}" ItemsSource="{Binding Groups}" VirtualizingPanel.VirtualizationMode="Recycling" VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.ScrollUnit="Pixel" x:Name="list" x:FieldModifier="public" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Hidden"> + <ListBox.ItemsPanel> + <ItemsPanelTemplate> + <VirtualizingStackPanel /> + </ItemsPanelTemplate> + </ListBox.ItemsPanel> + <ListBox.ItemTemplate> <DataTemplate> <StackPanel Margin="0 0 10 0"> - <TextBlock HorizontalAlignment="Center" Text="{Binding Name}" FontSize="{StaticResource TangoTitleFontSize}"></TextBlock> - <touch:TouchStaticListBox ItemsSource="{Binding Items}" SelectedItem="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=SelectedItem,Mode=TwoWay}" Margin="0 20 0 40"> + <TextBlock HorizontalAlignment="Center" Text="{Binding Name,IsAsync=True}" FontSize="{StaticResource TangoTitleFontSize}"></TextBlock> + <touch:TouchStaticListBox ItemsSource="{Binding Items,IsAsync=True}" SelectedItem="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=SelectedItem,Mode=TwoWay}" Margin="0 20 0 40"> <touch:TouchStaticListBox.ItemsPanel> <ItemsPanelTemplate> <WrapPanel Orientation="Horizontal" /> @@ -45,8 +51,8 @@ <DataTrigger.EnterActions> <BeginStoryboard> <Storyboard> - <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1.5" Duration="00:00:0.2" /> - <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1.5" Duration="00:00:0.2" /> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1.5" Duration="00:00:00" /> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1.5" Duration="00:00:00" /> <!--<DoubleAnimation Storyboard.TargetProperty="Effect.Opacity" To="1" Duration="00:00:0.2" />--> </Storyboard> </BeginStoryboard> @@ -54,8 +60,8 @@ <DataTrigger.ExitActions> <BeginStoryboard> <Storyboard> - <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="00:00:0.2" /> - <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:0.2" /> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="00:00:00" /> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:00" /> <!--<DoubleAnimation Storyboard.TargetProperty="Effect.Opacity" To="0" Duration="00:00:0.2" />--> </Storyboard> </BeginStoryboard> @@ -66,17 +72,17 @@ </touch:TouchStaticListBox.ItemContainerStyle> <touch:TouchStaticListBox.ItemTemplate> <DataTemplate> - <StackPanel Margin="10"> + <StackPanel Margin="10" Width="70"> <Ellipse Width="60" Height="60" Fill="{Binding Brush}" /> - <TextBlock Margin="0 5 0 0" HorizontalAlignment="Center" Text="{Binding Name}"></TextBlock> + <controls:FastTextBlock Margin="0 5 0 0" HorizontalAlignment="Center" Text="{Binding Name,IsAsync=True}"></controls:FastTextBlock> </StackPanel> </DataTemplate> </touch:TouchStaticListBox.ItemTemplate> </touch:TouchStaticListBox> </StackPanel> </DataTemplate> - </touch:TouchListBox.ItemTemplate> - </touch:TouchListBox> + </ListBox.ItemTemplate> + </ListBox> <Grid Grid.Column="1"> <!--<Rectangle Stroke="{StaticResource TangoDividerBrush}" HorizontalAlignment="Left" />--> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs index d4b924f17..e23c629c5 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs @@ -53,13 +53,13 @@ namespace Tango.PPC.Common.Controls { _catalog = DataContext as Catalog; - if (list.ScrollViewer != null && _catalog != null) - { - list.ScrollViewer.ScrollToTop(); - _preventChange = true; - slider.Value = _catalog.Groups.Count; - _preventChange = false; - } + //if (list.ScrollViewer != null && _catalog != null) + //{ + // list.ScrollViewer.ScrollToTop(); + // _preventChange = true; + // slider.Value = _catalog.Groups.Count; + // _preventChange = false; + //} }; } @@ -97,7 +97,7 @@ namespace Tango.PPC.Common.Controls { if (!_loaded) { - list.ScrollViewer.Scrolling += ScrollViewer_Scrolling; + //list.ScrollViewer.Scrolling += ScrollViewer_Scrolling; _preventChange = true; slider.Value = slider.Maximum; @@ -151,7 +151,7 @@ namespace Tango.PPC.Common.Controls /// </summary> public TouchListBox TouchListBox { - get { return list; } + get { return null; } } } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs index d540e3fd3..25eb2df04 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs @@ -79,6 +79,7 @@ namespace Tango.PPC.Common.EventLogging _machineProvider.MachineOperator.RequestSent += Machine_RequestSent; _machineProvider.MachineOperator.RequestFailed += Machine_RequestFailed; _machineProvider.MachineOperator.ResponseReceived += Machine_ResponseReceived; + _machineProvider.MachineOperator.StateChanged += MachineOperator_StateChanged; } #endregion @@ -114,6 +115,20 @@ namespace Tango.PPC.Common.EventLogging #region Event Handlers /// <summary> + /// Handles the machine operator state changed event. + /// </summary> + /// <param name="sender">The sender.</param> + /// <param name="e">The e.</param> + private void MachineOperator_StateChanged(object sender, Transport.TransportComponentState e) + { + if (e == Transport.TransportComponentState.Connected) + { + _events = new ConcurrentQueue<MachinesEvent>(); + _currentEvents.Clear(); + } + } + + /// <summary> /// Handles the RequestSent event of the connected machine. /// </summary> /// <param name="sender">The sender.</param> @@ -212,7 +227,15 @@ namespace Tango.PPC.Common.EventLogging machineEvent.UserGuid = _authentication.CurrentUser.Guid; machineEvent.User = _authentication.CurrentUser; _events.Enqueue(machineEvent); - _currentEvents.Add(machineEvent); + + if (!_currentEvents.Exists(x => x.Type == machineEvent.Type)) + { + if (machineEvent.Group != EventTypeGroups.Application && machineEvent.Group != EventTypeGroups.Transport) + { + _currentEvents.Add(machineEvent); + } + } + EventReceived?.Invoke(this, machineEvent); } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/HotSpot/DefaultHotSpotProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/HotSpot/DefaultHotSpotProvider.cs index 4f035d814..835a7fc4a 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/HotSpot/DefaultHotSpotProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/HotSpot/DefaultHotSpotProvider.cs @@ -77,7 +77,7 @@ namespace Tango.PPC.Common.HotSpot { try { - CmdCommand command = new CmdCommand("netsh", $"wlan set hostednetwork mode=allow ssid='{"Tango-" + _machineProvider.Machine.SerialNumber}' key='{password}'"); + CmdCommand command = new CmdCommand("netsh", $"wlan set hostednetwork mode=allow ssid={"Tango-" + _machineProvider.Machine.SerialNumber} key={password}"); await command.Run(); command = new CmdCommand("netsh", "wlan start hosted network"); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs index 952944cf9..b64b624fe 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs @@ -75,13 +75,10 @@ namespace Tango.PPC.Common.MachineUpdate private Task Login(String serialNumber) { - return Task.Factory.StartNew(() => + return _client.Login(new LoginRequest() { - return _client.Login(new LoginRequest() - { - Mode = LoginMode.Machine, - SerialNumber = serialNumber, - }).Result; + Mode = LoginMode.Machine, + SerialNumber = serialNumber, }); } @@ -310,7 +307,7 @@ namespace Tango.PPC.Common.MachineUpdate LogManager.Log($"Connecting to machine service on {machineServiceAddress}..."); - Login(serialNumber).Wait(); + Login(serialNumber).GetAwaiter().GetResult(); LogManager.Log($"Checking if updates available..."); @@ -340,6 +337,8 @@ namespace Tango.PPC.Common.MachineUpdate { LogManager.Log("Starting database update..."); + UpdateProgress("Updating Database", "Initializing..."); + LogManager.Log("Looking for update scripts configuration on application path..."); String config_file = Path.Combine(PathHelper.GetStartupPath(), "Update Scripts", "config.xml"); @@ -355,6 +354,8 @@ namespace Tango.PPC.Common.MachineUpdate LogManager.Log($"Updating database '{update_response.DataSource.ToString()}' => '{localDataSource.ToString()}'..."); + UpdateProgress("Updating Database", "Initializing update sequence..."); + ExaminerSequenceConfiguration config_sequence = ExaminerSequenceConfiguration.FromFile(config_file); foreach (var item in config_sequence.Items.Where(x => x.Type == ExaminerSequenceItemType.Data).OrderBy(x => x.Index)) @@ -382,6 +383,8 @@ namespace Tango.PPC.Common.MachineUpdate try { + UpdateProgress("Updating Database", item.Name + "..."); + var result = process.Execute().Result; if (result.ExitCode != ExaminerProcessExitCode.Success) @@ -397,6 +400,7 @@ namespace Tango.PPC.Common.MachineUpdate } } + UpdateProgress("Updating Database", "Database synchronization completed successfully."); LogManager.Log("Update completed successfully."); }); } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs index 409dd1cfc..050f1615c 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs @@ -5,6 +5,7 @@ using System.ServiceModel; using System.Text; using System.Threading.Tasks; using Tango.Logging; +using Tango.PMR.Printing; using Tango.Settings; using Tango.Web; @@ -77,6 +78,41 @@ namespace Tango.PPC.Common public bool EnableWatchDog { get; set; } /// <summary> + /// Gets or sets a value indicating whether to enable the technician mode when the application starts. + /// </summary> + public bool EnableTechnicianModeByDefault { get; set; } + + /// <summary> + /// Gets or sets the job upload strategy. + /// </summary> + public JobUploadStrategy JobUploadStrategy { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether to enable gradient generation. + /// </summary> + public bool EnableGradientGeneration { get; set; } + + /// <summary> + /// Gets or sets the gradient generation resolution. + /// </summary> + public int GradientGenerationResolution { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether to enable the application lock screen. + /// </summary> + public bool EnableLockScreen { get; set; } + + /// <summary> + /// Gets or sets the lock screen timeout. + /// </summary> + public TimeSpan LockScreenTimeout { get; set; } + + /// <summary> + /// Gets or sets the lock screen password. + /// </summary> + public String LockScreenPassword { get; set; } + + /// <summary> /// Gets the machine service address. /// </summary> /// <returns></returns> @@ -90,11 +126,16 @@ namespace Tango.PPC.Common /// </summary> public PPCSettings() { + JobUploadStrategy = JobUploadStrategy.JobDescriptionFile; + EnableGradientGeneration = true; + GradientGenerationResolution = 20; MachineScanningTimeoutSeconds = 20; LoggingCategories = new List<LogCategory>(); EmbeddedComPort = null; ExternalBridgePassword = "Aa123456"; HotSpotPassword = "Aa123456"; + LockScreenTimeout = TimeSpan.FromMinutes(10); + LockScreenPassword = "1111"; DeploymentSlot = DeploymentSlot.TEST; EnableWatchDog = true; } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs index b9a0d8483..5e584f891 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs @@ -177,6 +177,15 @@ namespace Tango.PPC.Common } /// <summary> + /// Raises the specified message using the default <see cref="TangoMessenger"/>. + /// </summary> + /// <typeparam name="T"></typeparam> + protected void RaiseMessage<T>() where T : class + { + TangoMessenger.Default.Send<T>(Activator.CreateInstance<T>()); + } + + /// <summary> /// Registers a message handle for the specified message type T. /// </summary> /// <typeparam name="T"></typeparam> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Printing/IPrintingManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Printing/IPrintingManager.cs index 37a71c965..dc097a805 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Printing/IPrintingManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Printing/IPrintingManager.cs @@ -22,7 +22,7 @@ namespace Tango.PPC.Common.Printing /// <param name="job">The job.</param> /// <param name="context">The context.</param> /// <returns></returns> - JobHandler Print(Job job, ObservablesContext context); + Task<JobHandler> Print(Job job, ObservablesContext context); /// <summary> /// Creates a sample dye job from the specified job and prints it. @@ -31,7 +31,7 @@ namespace Tango.PPC.Common.Printing /// <param name="job">The job.</param> /// <param name="context">The context.</param> /// <returns></returns> - JobHandler PrintSample(Job job, ObservablesContext context); + Task<JobHandler> PrintSample(Job job, ObservablesContext context); /// <summary> /// Creates a fine tuning job from the specified job and fine tune items. @@ -41,6 +41,6 @@ namespace Tango.PPC.Common.Printing /// <param name="context">The context.</param> /// <param name="fineTuneItems">The fine tune items.</param> /// <returns></returns> - JobHandler PrintFineTuning(Job job, ObservablesContext context, IEnumerable<FineTuneItem> fineTuneItems); + Task<JobHandler> PrintFineTuning(Job job, ObservablesContext context, IEnumerable<FineTuneItem> fineTuneItems); } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml index 05cd998e6..b5b9f9b23 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml @@ -14,6 +14,7 @@ <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Styles/TouchButton.xaml" /> <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Styles/TouchIconButton.xaml" /> <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Styles/TouchListBox.xaml" /> + <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchNativeListBox.xaml" /> <!--PPC--> <ResourceDictionary Source="pack://application:,,,/Tango.PPC.Common;component/Resources/Colors.xaml"/> @@ -47,6 +48,7 @@ <converters:DateTimeUTCToStringConverter x:Key="DateTimeUTCToStringConverter" /> <converters:NullObjectToBooleanConverter x:Key="NullObjectToBooleanConverter" /> <converters:IsNullToVisibilityConverter x:Key="IsNullToVisibilityConverter" /> + <converters:StringToLinesConverter x:Key="StringToLinesConverter" /> <Style TargetType="FrameworkElement"> <Setter Property="TextElement.FontFamily" Value="{StaticResource TangoFlexoFontFamily}"></Setter> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/app.config b/Software/Visual_Studio/PPC/Tango.PPC.Common/app.config index 24626938a..84ab8bb09 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/app.config +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/app.config @@ -16,7 +16,7 @@ </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> @@ -24,27 +24,27 @@ </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" /> + <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> + <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" /> + <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" /> @@ -52,7 +52,7 @@ </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Xml.ReaderWriter" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /> + <bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> @@ -78,6 +78,14 @@ <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" /> </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Text.Encoding.CodePages" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /> + </dependentAssembly> </assemblyBinding> </runtime> <entityFramework> |
