public static async Task <MessageBoxButtons> Show(string message, MessageBoxButtons buttons = MessageBoxButtons.Ok,
                                                          string title = null)
        {
            var dlg = new MessageBoxView(message, buttons, title)
            {
                Icon = ApplicationHelpers.MainWindow.Icon
            };

            return(await dlg.ShowDialog <MessageBoxButtons>(ApplicationHelpers.MainWindow));
        }
Exemple #2
0
        public static async Task <MessageBoxButtons?> Show(string message, MessageBoxButtons buttons = MessageBoxButtons.Ok,
                                                           string?title = null)
        {
            while (ApplicationHelpers.MainWindow == null)
            {
                await Task.Delay(500);
            }
            var dlg = new MessageBoxView(message, buttons, title)
            {
                Icon = ApplicationHelpers.MainWindow.Icon
            };

            return(await dlg.ShowDialog <MessageBoxButtons?>(ApplicationHelpers.MainWindow));
        }