예제 #1
0
        /// <summary>
        /// Sign up & close.
        /// </summary>
        /// <returns></returns>
        protected override async Task CloseDialog()
        {
            var res = await signUp.SignUpAsync(User.EMail, User.Nickname);

            if (!res)
            {
                Logger.Log.Error($"Sign Up error: {res.Code}");
                await this.ShowMessageBoxAsync(res.ToString(), MaterialMessageBoxButtons.Ok);
            }
            else if (!res.Result)
            {
                Logger.Log.Info($"Unsuccessful sign up {GetLog()}");
                await this.ShowMessageBoxAsync(res.Result.ToString(), MaterialMessageBoxButtons.Ok);
            }
            else
            {
                Logger.Log.Info($"Successful sign up {GetLog()}");
                await this.ShowMessageBoxAsync(Resources.Result_SucessfulSignUp, MaterialMessageBoxButtons.Ok);

                OwnerIdentifier.Close();
            }

            string GetLog() => $"(email: {User.EMail}, nick: {User.Nickname})";
        }
예제 #2
0
        public int OnRegister()
        {
            var res = _apiSignUpService.SignUpAsync(userModel);

            return(res.Id);
        }