diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-08 18:19:37 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-08 18:19:37 +0200 |
| commit | 3aa8d26fe59aeea616bda89ca325b9f9583fadc6 (patch) | |
| tree | 064470fd7ba7d2186b257544a3d1675dc7f21b64 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels | |
| parent | f95e70a118ed238bbdeea5b44c9be7e6cfb0b89c (diff) | |
| download | Tango-3aa8d26fe59aeea616bda89ca325b9f9583fadc6.tar.gz Tango-3aa8d26fe59aeea616bda89ca325b9f9583fadc6.zip | |
Added code comments for:
Integration.
Refactored ExternalBridgeClient to:
IExternalBridgeSecureClient.
ExternalBridgeTcpClient.
ExternalBridgeUsbClient.
Refactored MachineConnectionView to use the new external bridge clients by data template "data type".
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs index b08c259af..ceb81a66f 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -7,6 +7,7 @@ using System.Reflection; using System.Text; using System.Threading.Tasks; using Tango.Core.Commands; +using Tango.Integration.Services; using Tango.Logging; using Tango.MachineStudio.Common; using Tango.MachineStudio.Common.Authentication; @@ -152,17 +153,17 @@ namespace Tango.MachineStudio.UI.ViewModels } } - if (x.SelectedMachine.Type != Integration.Services.ExternalBridgeClientType.USB) + if (x.SelectedMachine.RequiresAuthentication) { _notificationProvider.ShowModalDialog<MachineLoginViewVM>(async (login) => { - using (NotificationProvider.PushTaskItem("Connecting to machine " + x.SelectedMachine.SerialNumber + "...")) + using (NotificationProvider.PushTaskItem("Connecting to machine " + x.SelectedMachine.ToString() + "...")) { try { await x.SelectedMachine.Connect(); - var authenticated = await x.SelectedMachine.Authenticate(login.Password); + var authenticated = await x.SelectedMachine.As<IExternalBridgeSecureClient>().Authenticate(login.Password); if (!authenticated) { _notificationProvider.ShowError("It seems like you are not authorized to access the selected machine."); @@ -184,7 +185,7 @@ namespace Tango.MachineStudio.UI.ViewModels } else { - using (NotificationProvider.PushTaskItem("Connecting to " + x.SelectedMachine.Device + "...")) + using (NotificationProvider.PushTaskItem("Connecting to " + x.SelectedMachine.ToString() + "...")) { try { |
