public override async void OnDialogOpened(IDialogParameters parameters) { await SetBusyAsync(async() => { await Task.Delay(1000); //加载本地的缓存信息 DisplayText = LocalTranslationHelper.Localize("Initializing"); accessTokenManager.AuthenticateResult = dataStorageService.RetrieveAuthenticateResult(); applicationContext.Load(dataStorageService.RetrieveTenantInfo(), dataStorageService.RetrieveLoginInfo()); //加载系统资源 DisplayText = LocalTranslationHelper.Localize("LoadResource"); await UserConfigurationManager.GetIfNeedsAsync(); //如果本地授权存在,直接进入系统首页 if (accessTokenManager.IsUserLoggedIn) { OnDialogClosed(); } else { OnDialogClosed(ButtonResult.No); } }); }