AdvancedLauncher.Management.DialogManager.ShowMessageDialogAsyncInternal C# (CSharp) Method

ShowMessageDialogAsyncInternal() private method

Shows Metro MessageBox Dialog Async
private ShowMessageDialogAsyncInternal ( string title, string message ) : Task
title string Title
message string Message
return Task
        private async Task<bool> ShowMessageDialogAsyncInternal(string title, string message) {
            MainWindow MainWindow = App.Kernel.Get<MainWindow>();
            if (MainWindow.Dispatcher != null && !MainWindow.Dispatcher.CheckAccess()) {
                return await MainWindow.Dispatcher.Invoke<Task<bool>>(new Func<Task<bool>>(async () => {
                    return await ShowMessageDialogAsyncInternal(title, message);
                }));
            }
            await MainWindow.ShowMessageAsync(title, message, MessageDialogStyle.Affirmative, new MetroDialogSettings() {
                AffirmativeButtonText = "OK",
                ColorScheme = MetroDialogColorScheme.Accented
            });
            return true;
        }