diff options
Diffstat (limited to 'Software/Visual_Studio')
| -rw-r--r-- | Software/Visual_Studio/FSE/Tango.FSE.Common/Notifications/SnackbarItem.cs | 15 | ||||
| -rw-r--r-- | Software/Visual_Studio/FSE/Tango.FSE.UI/Connection/DefaultMachineProvider.cs | 5 |
2 files changed, 12 insertions, 8 deletions
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Notifications/SnackbarItem.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/Notifications/SnackbarItem.cs index 652d3067b..832b69d92 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Notifications/SnackbarItem.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Notifications/SnackbarItem.cs @@ -36,7 +36,6 @@ namespace Tango.FSE.Common.Notifications private set { _isClosing = value; RaisePropertyChangedAuto(); } } - public SnackbarItem(MessageType type, String title, bool canClose, String message = null, TimeSpan? timeout = null, Action closeAction = null, Action pressAction = null) { Type = type; @@ -45,14 +44,18 @@ namespace Tango.FSE.Common.Notifications Message = message; Timeout = timeout; - if (pressAction != null) + _pressAction = () => { - _pressAction = () => + if (pressAction != null) { Close(); - pressAction?.Invoke(); - }; - } + pressAction.Invoke(); + } + else if (CanClose) + { + Close(); + } + }; if (canClose) { diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Connection/DefaultMachineProvider.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/Connection/DefaultMachineProvider.cs index dd387dfd4..10ba9d957 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Connection/DefaultMachineProvider.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Connection/DefaultMachineProvider.cs @@ -173,9 +173,10 @@ namespace Tango.FSE.UI.Connection IsBusy = true; - using (var task = NotificationProvider.PushTaskItem($"Connecting to machine '{machine.SerialNumber}'...")) + String serial = vm.GetMachineSerialNumber(); + + using (var task = NotificationProvider.PushTaskItem($"Connecting to machine '{serial}'...")) { - String serial = vm.GetMachineSerialNumber(); Machine = await Services.MachinesService.GetMachine(serial); if (Machine == null) |
