Esempio n. 1
0
        private async Task AuthenticateSucceed(AbpAuthenticateResultModel result)
        {
            AuthenticateResultModel = result;

            if (AuthenticateResultModel.ShouldResetPassword)
            {
                dialog.ShowMessage("", Local.Localize("ChangePasswordToLogin"));
                return;
            }

            if (AuthenticateResultModel.RequiresTwoFactorVerification)
            {
                DialogParameters param = new DialogParameters();
                param.Add("Value", AuthenticateResultModel);
                await dialog.ShowDialogAsync(AppViewManager.SendTwoFactorCode, param, AppCommonConsts.LoginIdentifier);
            }

            if (!AuthenticateModel.IsTwoFactorVerification)
            {
                await dataStorageService.StoreAuthenticateResultAsync(AuthenticateResultModel);
            }

            await SetCurrentUserInfoAsync();

            await UserConfigurationManager.GetAsync();
        }
Esempio n. 2
0
        /// <summary>
        /// 询问窗口-指定标题
        /// </summary>
        /// <param name="hostDialogService"></param>
        /// <param name="title">标题</param>
        /// <param name="message">提示消息</param>
        /// <param name="IdentifierName">会话ID</param>
        /// <returns></returns>
        public static async Task <bool> Question(this IHostDialogService hostDialogService,
                                                 string title,
                                                 string message,
                                                 string IdentifierName = AppCommonConsts.RootIdentifier)
        {
            DialogParameters param = new DialogParameters();

            param.Add("Title", title);
            param.Add("Message", message);

            var dialogResult = await hostDialogService.ShowDialogAsync(AppViewManager.HostMessageBox, param, IdentifierName);

            return(dialogResult.Result == ButtonResult.OK);
        }
Esempio n. 3
0
        internal static async Task <IDialogResult> ShowDialog(
            IHostDialogService dialogHostService,
            MessageType messageType,
            string message
            , string IdentifierName = "")
        {
            if (string.IsNullOrWhiteSpace(IdentifierName))
            {
                IdentifierName = default_IdentifierName;
            }

            DialogParameters param = new DialogParameters();

            param.Add("Type", messageType);
            param.Add("Message", message);

            return(await dialogHostService.ShowDialogAsync("MessageView", param, IdentifierName));
        }