From 080f1697e97e13461ec6df4d31c8924d01257a1b Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Tue, 9 Apr 2019 01:47:48 +0300 Subject: MERGE --- .../Notifications/INotificationManager.cs | 95 ++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 Software/Visual_Studio/Scripting/Tango.Scripting.IDE/Notifications/INotificationManager.cs (limited to 'Software/Visual_Studio/Scripting/Tango.Scripting.IDE/Notifications/INotificationManager.cs') diff --git a/Software/Visual_Studio/Scripting/Tango.Scripting.IDE/Notifications/INotificationManager.cs b/Software/Visual_Studio/Scripting/Tango.Scripting.IDE/Notifications/INotificationManager.cs new file mode 100644 index 000000000..1ed516b28 --- /dev/null +++ b/Software/Visual_Studio/Scripting/Tango.Scripting.IDE/Notifications/INotificationManager.cs @@ -0,0 +1,95 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using Tango.SharedUI; + +namespace Tango.Scripting.IDE.Notifications +{ + /// + /// Represents the IDE notification manager. + /// + public interface INotificationManager + { + /// + /// Displays the specified TView as a dialog and TViewModel as it's data context. + /// + /// The type of the view model. + /// The type of the view. + /// The view model. + /// The view. + /// + Task ShowDialog(TViewModel viewModel, TView view) where TViewModel : IDEDialogViewModel where TView : FrameworkElement; + + /// + /// Finds (by convention )the appropriate view by the specified TViewModel name. + /// The search pattern is ViewVM - VM + View. + /// + /// The type of the view model. + /// The view model. + /// + Task ShowDialog(TViewModel viewModel) where TViewModel : IDEDialogViewModel; + + /// + /// Finds (by convention )the appropriate view by the specified TViewModel name. + /// The search pattern is ViewVM - VM + View. + /// The view model instance will be created automatically and must contain a parameterless constructor. + /// + /// The type of the view model. + /// The view model. + /// + Task ShowDialog() where TViewModel : IDEDialogViewModel; + + /// + /// Displays an error message. + /// + /// The title. + /// The message. + /// + Task ShowError(String title, String message); + + /// + /// Displays an error message. + /// + /// The title. + /// The message. + /// + Task ShowInfo(String title, String message); + + /// + /// Displays a warning message. + /// + /// The title. + /// The message. + /// + Task ShowWarning(String title, String message); + + /// + /// Displays a positive message. + /// + /// The title. + /// The message. + /// + Task ShowSuccess(String title, String message); + + /// + /// Displays a question and returns the result. + /// + /// The title. + /// The message. + /// + Task ShowQuestion(String title, String message); + + /// + /// Displays an intermediate progress dialog and returns an instance of . + /// Once the progress notification handler will be disposed the dialog will close. + /// + /// The title. + /// The message. + /// if set to true the dialog will contain a cancel button. + /// + ProgressNotificationHandler ShowProgress(String title, String message, bool canCancel = false); + } +} -- cgit v1.3.1