From 48f781d037a83c51fdd555fb6c9d1c2b4e424efe Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 11 Dec 2018 19:43:35 +0200 Subject: Working on PPC hotspot and external bridge. --- .../MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels') 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 70378a4d5..d1f9cda64 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -453,6 +453,13 @@ namespace Tango.MachineStudio.UI.ViewModels if (x.SelectedMachine.RequiresAuthentication) { + //Check machine exist on my database first + if (!ObservablesStaticCollections.Instance.Machines.ToList().Exists(y => y.SerialNumber == x.SelectedMachine.SerialNumber)) + { + _notificationProvider.ShowError( $"The specified machine '{x.SelectedMachine.SerialNumber}' could not be found on the database."); + return; + } + _notificationProvider.ShowModalDialog(async (login) => { using (NotificationProvider.PushTaskItem("Connecting to machine " + x.SelectedMachine.ToString() + "...")) -- cgit v1.3.1