aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.SharedUI/DialogViewVM.cs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-04-14 06:23:25 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-04-14 06:23:25 +0300
commit8f738753289dcb7118162122c5404d2a02b305f7 (patch)
treeaba06cb5c9def702af9cf791ce0a65cb2684af07 /Software/Visual_Studio/Tango.SharedUI/DialogViewVM.cs
parent76ebe53d89a1b0cbf21d66dc9f26dc95cc7b3be9 (diff)
downloadTango-8f738753289dcb7118162122c5404d2a02b305f7.tar.gz
Tango-8f738753289dcb7118162122c5404d2a02b305f7.zip
FSE Tup/Tfp & WaitForReconnection.
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI/DialogViewVM.cs')
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/DialogViewVM.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.SharedUI/DialogViewVM.cs b/Software/Visual_Studio/Tango.SharedUI/DialogViewVM.cs
index bf75fd6ef..ae6d54bc6 100644
--- a/Software/Visual_Studio/Tango.SharedUI/DialogViewVM.cs
+++ b/Software/Visual_Studio/Tango.SharedUI/DialogViewVM.cs
@@ -97,5 +97,22 @@ namespace Tango.SharedUI
IsVisible = false;
Canceled?.Invoke();
}
+
+ /// <summary>
+ /// Closes the dialog with the specified result.
+ /// </summary>
+ /// <param name="result">if set to <c>true</c> accepted.</param>
+ public void Close(bool result)
+ {
+ DialogResult = result;
+ if (result)
+ {
+ Accept();
+ }
+ else
+ {
+ Cancel();
+ }
+ }
}
}