aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-03-14 13:25:32 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-03-14 13:25:32 +0200
commitc5cde62cecfdd413e9902b26b30b0d4dfd05a24d (patch)
treebc6cd0fc62c13bc65bcb1eeebfac4f5d6112f7ae /Software/Visual_Studio/PPC/Tango.PPC.Common
parent81d88a18ac614604befb041a81781ab33eb08067 (diff)
downloadTango-c5cde62cecfdd413e9902b26b30b0d4dfd05a24d.tar.gz
Tango-c5cde62cecfdd413e9902b26b30b0d4dfd05a24d.zip
Machine Studio v4.0.10
PPC v1.0.9
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Connectivity/AvailableWiFiConnectionsControl.xaml4
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/HotSpot/DefaultHotSpotProvider.cs2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs11
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Printing/IPrintingManager.cs6
4 files changed, 10 insertions, 13 deletions
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/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 3fffc2045..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...");
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);
}
}