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

ShowYesNoDialogInternal() private method

Shows Metro MessageBox Dialog with Yes/No buttons
private ShowYesNoDialogInternal ( string title, string message ) : Task
title string Title
message string Message
return Task
        private async Task<bool> ShowYesNoDialogInternal(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 ShowYesNoDialogInternal(title, message);
                }));
            }
            MessageDialogResult result = await MainWindow.ShowMessageAsync(title, message,
                MessageDialogStyle.AffirmativeAndNegative, new MetroDialogSettings() {
                    AffirmativeButtonText = LanguageManager.Model.Yes,
                    NegativeButtonText = LanguageManager.Model.No,
                    ColorScheme = MetroDialogColorScheme.Accented
                });
            return result == MessageDialogResult.Affirmative;
        }