aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs14
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs13
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs8
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml2
6 files changed, 26 insertions, 15 deletions
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 d6770ed45..f05c05a44 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
@@ -42,13 +42,13 @@ namespace Tango.PPC.UI.Printing
/// <param name="job">The job.</param>
/// <param name="context">The context.</param>
/// <returns></returns>
- public JobHandler Print(Job job, ObservablesContext context)
+ public async Task<JobHandler> Print(Job job, ObservablesContext context)
{
#if STUBPRINT
- var handler = _machineProvider.MachineOperator.PrintStub(job);
+ var handler = await _machineProvider.MachineOperator.PrintStub(job);
#else
- var handler = _machineProvider.MachineOperator.Print(job);
+ var handler = await _machineProvider.MachineOperator.Print(job);
#endif
handler.Completed += async (x, e) =>
@@ -104,7 +104,7 @@ namespace Tango.PPC.UI.Printing
/// <param name="job">The job.</param>
/// <param name="context">The context.</param>
/// <returns></returns>
- public JobHandler PrintSample(Job job, ObservablesContext context)
+ public async Task<JobHandler> PrintSample(Job job, ObservablesContext context)
{
LogManager.Log("Cloning job...");
Job sampleDyeJob = job.Clone();
@@ -131,7 +131,7 @@ namespace Tango.PPC.UI.Printing
LogManager.Log("Executing sample dye job...");
- var handler = _machineProvider.MachineOperator.Print(sampleDyeJob);
+ var handler = await _machineProvider.MachineOperator.Print(sampleDyeJob);
handler.Completed += async (x, e) =>
{
try
@@ -157,7 +157,7 @@ namespace Tango.PPC.UI.Printing
/// <param name="context">The context.</param>
/// <param name="fineTuneItems">The fine tune items.</param>
/// <returns></returns>
- public JobHandler PrintFineTuning(Job job, ObservablesContext context, IEnumerable<FineTuneItem> fineTuneItems)
+ public async Task<JobHandler> PrintFineTuning(Job job, ObservablesContext context, IEnumerable<FineTuneItem> fineTuneItems)
{
LogManager.Log("Cloning job...");
Job fineTuneJob = job.Clone();
@@ -172,7 +172,7 @@ namespace Tango.PPC.UI.Printing
var segment = fineTuneJob.AddSolidSegment(suggestion.Color);
}
- var handler = _machineProvider.MachineOperator.Print(fineTuneJob);
+ var handler = await _machineProvider.MachineOperator.Print(fineTuneJob);
handler.Completed += async (x, e) =>
{
try
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs
index fa54f491e..a0db99ffb 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs
@@ -8,4 +8,4 @@ using System.Windows;
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Tango PPC Application")]
-[assembly: AssemblyVersion("1.0.6.0")]
+[assembly: AssemblyVersion("1.0.9.0")]
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs
index 83f629159..80a95d1bf 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs
@@ -116,12 +116,15 @@ namespace Tango.PPC.UI.ViewModels
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
private void ExternalBridgeService_ClientDisconnected(object sender, EventArgs e)
{
- LogManager.Log("External bridge client disconnected. Navigating to home module...");
-
- InvokeUI(() =>
+ if (IsVisible)
{
- NavigationManager.NavigateTo(NavigationView.HomeModule);
- });
+ LogManager.Log("External bridge client disconnected. Navigating to home module...");
+
+ InvokeUI(() =>
+ {
+ NavigationManager.NavigateTo(NavigationView.HomeModule);
+ });
+ }
}
/// <summary>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs
index 07da99818..f265c5dbf 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs
@@ -140,6 +140,14 @@ namespace Tango.PPC.UI.ViewModels
_isChecking = true;
IsDbUpdate = false;
+ await Task.Delay(2000);
+ if (!await ConnectivityProvider.CheckInternetConnection())
+ {
+ _isChecking = false;
+ await NavigateTo(MachineUpdateView.UpdateCheckErrorView);
+ return;
+ }
+
var response = await MachineUpdateManager.CheckForUpdate(MachineProvider.Machine.SerialNumber);
if (response.IsUpdateAvailable)
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml
index ba7e9e019..fba8a599d 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml
@@ -174,7 +174,7 @@
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0 50 0 0">
<touch:TouchIcon Icon="AlertOutline" Foreground="{StaticResource TangoErrorBrush}" Width="70" Height="70" />
<TextBlock HorizontalAlignment="Center" Margin="0 10 0 0" FontSize="{StaticResource TangoTitleFontSize}">Update Failed</TextBlock>
- <TextBlock HorizontalAlignment="Center" Margin="0 5 0 0" Foreground="{StaticResource TangoErrorBrush}" Text="{Binding FailedError,FallbackValue='Unexpected error'}"></TextBlock>
+ <TextBlock HorizontalAlignment="Center" Margin="0 5 0 0" Foreground="{StaticResource TangoErrorBrush}" TextAlignment="Center" Text="{Binding FailedError,FallbackValue='Unexpected error'}"></TextBlock>
</StackPanel>
</DockPanel>
</Grid>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
index e4c107049..c63ef1e13 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
@@ -59,7 +59,7 @@
</touch:TouchIcon.Style>
</touch:TouchIcon>
- <touch:TouchIcon Margin="10 0 0 0" Width="18" Height="18" VerticalAlignment="Center" Foreground="{StaticResource TangoSuccessBrush}" Icon="AccessPointNetwork" Visibility="{Binding ConnectivityProvider.IsHotspotActive,Converter={StaticResource BooleanToVisibilityConverter}}" />
+ <touch:TouchIcon Margin="10 0 0 0" Width="18" Height="18" VerticalAlignment="Center" Foreground="{StaticResource TangoSuccessBrush}" Icon="AccessPointNetwork" Visibility="{Binding HotSpotProvider.IsEnabled,Converter={StaticResource BooleanToVisibilityConverter}}" />
<touch:TouchIcon Margin="10 0 0 0" Width="18" Height="18" VerticalAlignment="Center" Foreground="{StaticResource TangoSuccessBrush}" Icon="Bridge" Visibility="{Binding ExternalBridgeService.Enabled,Converter={StaticResource BooleanToVisibilityConverter}}" />