aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs36
1 files changed, 18 insertions, 18 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 e53ec0b39..81f47c4ba 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
@@ -449,27 +449,27 @@ namespace Tango.MachineStudio.UI.ViewModels
x.SelectedMachine.EnableEmbeddedDebugging = true;
}
- await x.SelectedMachine.Connect();
-
- var authenticated = await x.SelectedMachine.As<IExternalBridgeSecureClient>().Authenticate(login.Password, Environment.MachineName, AuthenticationProvider.CurrentUser.Guid, "Machine Studio");
- if (!authenticated)
+ await x.SelectedMachine.As<IExternalBridgeSecureClient>().Connect(new PMR.Integration.ExternalBridgeLoginRequest()
{
- _notificationProvider.ShowError("It seems like you are not authorized to access the selected machine.");
- }
- else
+ AppID = "Machine Studio",
+ HostName = Environment.MachineName,
+ Password = login.Password,
+ UserGuid = AuthenticationProvider.CurrentUser.Guid,
+ Intent = PMR.Integration.ExternalBridgeLoginIntent.Override,
+ });
+
+ ApplicationManager.ConnectedMachine = x.SelectedMachine;
+ (x.SelectedMachine as IExternalBridgeSecureClient).SessionClosed += (_, __) =>
{
- ApplicationManager.ConnectedMachine = x.SelectedMachine;
- (x.SelectedMachine as IExternalBridgeSecureClient).SessionClosed += (_, __) =>
+ InvokeUI(() =>
{
- InvokeUI(() =>
- {
- _notificationProvider.ShowError("The remote machine has closed the current session. Machine disconnected.");
- ApplicationManager.ConnectedMachine = null;
- });
- };
- PostMessage(new MachineConnectionChangedMessage() { Machine = x.SelectedMachine });
- _eventLogger.Log(String.Format("Successfully connected to machine {0} via TCP", x.SelectedMachine.SerialNumber));
- }
+ _notificationProvider.ShowError("The remote machine has closed the current session. Machine disconnected.");
+ ApplicationManager.ConnectedMachine = null;
+ });
+ };
+ PostMessage(new MachineConnectionChangedMessage() { Machine = x.SelectedMachine });
+ _eventLogger.Log(String.Format("Successfully connected to machine {0} via TCP", x.SelectedMachine.SerialNumber));
+
}
catch (Exception ex)
{