AdvancedLauncher.Management.Internal.LoginManager.ShowLastSessionDialog C# (CSharp) Method

ShowLastSessionDialog() private method

private ShowLastSessionDialog ( Profile profile ) : void
profile AdvancedLauncher.SDK.Model.Config.Profile
return void
        private async void ShowLastSessionDialog(Profile profile) {
            MainWindow MainWindow = App.Kernel.Get<MainWindow>();
            MessageDialogResult result = await MainWindow.ShowMessageAsync(LanguageManager.Model.UseLastSession, string.Empty,
                MessageDialogStyle.AffirmativeAndNegative, new MetroDialogSettings() {
                    AffirmativeButtonText = LanguageManager.Model.Yes,
                    NegativeButtonText = LanguageManager.Model.No,
                    ColorScheme = MetroDialogColorScheme.Accented
                });

            LoginData credentials = GetCredentials(profile);
            if (credentials != null) {
                if (result == MessageDialogResult.Affirmative) {
                    if (LoginCompleted != null) {
                        LoginCompleted(this, new LoginCompleteEventArgs(LoginCode.SUCCESS,
                            credentials.LastSessionArgs, credentials.User));
                    }
                    return;
                } else if (PerformLogin(credentials)) {
                    return;
                }
            }
            ShowLoginDialog(LanguageManager.Model.LoginLogIn, String.Empty, credentials.User);
        }