using MaterialDesignThemes.Wpf; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Media; using Tango.SharedUI; namespace Tango.MachineStudio.Common.Notifications { /// /// Represents the Machine Studio user notification provider responsible for displaying information, alerts and dialogs to the user. /// public interface INotificationProvider { /// /// Gets the collection of active task items. /// ObservableCollection TaskItems { get; } /// /// Gets the collection of active bar items. /// ObservableCollection BarItems { get; } /// /// Gets the current displayed task item. /// TaskItem CurrentTaskItem { get; } /// /// Gets a value indicating whether there are any queued task items. /// bool HasTaskItems { get; } /// /// Pushes the specified task item to the queue. /// /// The task item. void PushTaskItem(TaskItem taskItem); /// /// Create and push a new task item from the specified message. /// /// The message. /// TaskItem PushTaskItem(String message); /// /// Creates and push a new bar item from the specified framework element. /// /// The element. /// BarItem PushBarItem(FrameworkElement element); /// /// Pushes the specified bar item. /// /// The bar item. /// BarItem PushBarItem(BarItem barItem); /// /// Removed the specified task item from the queue. /// /// The task item. void PopTaskItem(TaskItem taskItem); /// /// Removed the specified bar item. /// /// The bar item. void PopBarItem(BarItem barItem); /// /// Creates a new instance of the specified View type and displays it as a modal dialog. /// /// The type of the view. /// The type of the view model. /// Accept button callback. /// Cancel button callback. void ShowModalDialog(Action onAccept, Action onCancel) where View : FrameworkElement where VM : DialogViewVM; /// /// Creates a new view by a naming convention of the specified view model type. /// /// The type of the view model. /// Accept button callback. /// Cancel button callback. void ShowModalDialog(Action onAccept, Action onCancel) where VM : DialogViewVM; /// /// Shows the specified view with the specified view model as it's data context. /// /// The type of the mm. /// The type of the view. /// The view model. /// The accept action. /// The cancel action. void ShowModalDialog(VM vm, Action onAccept, Action onCancel) where View : FrameworkElement where VM : DialogViewVM; /// /// Shows the specified view with the specified view model as it's data context. /// /// The type of the mm. /// The type of the view. /// The view model. /// The view. /// The accept action. /// The cancel action. void ShowModalDialog(VM vm, View view, Action onAccept, Action onCancel) where View : FrameworkElement where VM : DialogViewVM; /// /// Creates a new view by a naming convention of the specified view model type. /// /// The type of the view model. /// Accept button callback. void ShowModalDialog(Action onAccept) where VM : DialogViewVM; /// /// Display a message box. /// /// The icon. /// Color of the icon. /// The message. /// if set to true displays the cancel button. /// bool? ShowMessageBox(PackIconKind icon, Brush iconColor, String message, bool hasCancel); /// /// Shows an information message box. /// /// The message. void ShowInfo(String message); /// /// Shows warning message box. /// /// The message. void ShowWarning(String message); /// /// Shows an error message box. /// /// The message. void ShowError(String message); /// /// Shows a question message box. /// /// The message. bool ShowQuestion(String message); /// /// Shows a question message box with an error icon. /// /// The message. bool ShowErrorQuestion(String message); /// /// Shows a dialog with a text input field and returns the response. /// /// The message. /// Text field hint. /// Optional default response. /// String ShowTextInput(String message, String hint, String defaultResponse = null); } }