public void Notify(string message) { if (windowLocator.GetMainWindow() == null) { return; } snackbarMessageQueue.Enqueue(message); }
public DialogSession ShowTrackedDialog(MaterialDialog dialog, double width) { var window = windowLocator.GetMainWindow(); if (window == null) { throw new InvalidOperationException(ErrorMessages.MainWindowNotFound); } return(dialog.ShowTracked(window.RootDialog.Identifier.ToString(), width)); }
public DialogSession ShowTrackedDialog(MaterialDialog dialog, double width) { var window = windowLocator.GetMainWindow(); if (window == null) { throw new InvalidOperationException(ErrorMessages.MainWindowNotFound); } if (window is IDialogHostContainer hostContainer) { var dialogHost = hostContainer.GetRootDialog(); return(dialog.ShowTracked(dialogHost.Identifier.ToString(), width)); } throw new InvalidOperationException("Cannot display dialog in current window."); }