diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-07-30 18:16:30 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-07-30 18:16:30 +0300 |
| commit | ead172c9292326266b2c1622f058df5e2039bd05 (patch) | |
| tree | 13c73297dec8e2507544fd5b0f2194750c942922 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs | |
| parent | ba5a7741072abbda41e674fe19308a9b505b49f8 (diff) | |
| download | Tango-ead172c9292326266b2c1622f058df5e2039bd05.tar.gz Tango-ead172c9292326266b2c1622f058df5e2039bd05.zip | |
Working on PPC Machine Studio External Bridge !
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.cs | 10 |
1 files changed, 9 insertions, 1 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 d209e3f27..e53ec0b39 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -451,7 +451,7 @@ namespace Tango.MachineStudio.UI.ViewModels await x.SelectedMachine.Connect(); - var authenticated = await x.SelectedMachine.As<IExternalBridgeSecureClient>().Authenticate(login.Password); + var authenticated = await x.SelectedMachine.As<IExternalBridgeSecureClient>().Authenticate(login.Password, Environment.MachineName, AuthenticationProvider.CurrentUser.Guid, "Machine Studio"); if (!authenticated) { _notificationProvider.ShowError("It seems like you are not authorized to access the selected machine."); @@ -459,6 +459,14 @@ namespace Tango.MachineStudio.UI.ViewModels else { ApplicationManager.ConnectedMachine = x.SelectedMachine; + (x.SelectedMachine as IExternalBridgeSecureClient).SessionClosed += (_, __) => + { + 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)); } |
