Exemple #1
0
        private void OnNewAccount(object sender, Account.NewAccountEnum e)
        {
            switch (e)
            {
            //成功
            case Account.NewAccountEnum.Success:
                AreAccountConfirm = true;
                OnAccountConfirm?.Invoke();
                break;

            //存在账户
            case Account.NewAccountEnum.AccountExist:
                Reminder = "账户存在";
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(e), e, null);
            }
        }
Exemple #2
0
        private void OnConfirm(object sender, Account.ConfirmEnum e)
        {
            switch (e)
            {
            //成功
            case Account.ConfirmEnum.Success:
                AreAccountConfirm = true;
                OnAccountConfirm?.Invoke();
                break;

            //没有找到账户
            case Account.ConfirmEnum.AccountNotExist:
                Reminder = "没有找到账户";
                break;

            //错误
            case Account.ConfirmEnum.KeyError:
                Reminder = "密码错误";
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(e), e, null);
            }
        }