aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-02-28 22:16:52 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-02-28 22:16:52 +0200
commitd9d8ca61ee95dff152b05fd9d5bcae8aac0fa3da (patch)
treef74b468788e087b503170bb796eb9a8e9d58c435 /Software
parent18dafa9e98e171321d3847a208c0af5be6f57ef6 (diff)
downloadTango-d9d8ca61ee95dff152b05fd9d5bcae8aac0fa3da.tar.gz
Tango-d9d8ca61ee95dff152b05fd9d5bcae8aac0fa3da.zip
FSE: Fixed issue with "connetin to" dialog, sn.
Implemented snackbar better close behavior.
Diffstat (limited to 'Software')
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Notifications/SnackbarItem.cs15
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/Connection/DefaultMachineProvider.cs5
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)