Пример #1
0
 /// <inheritdoc />
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="account">账号</param>
 /// <param name="passwd">密码</param>
 /// <param name="userType">用户类型</param>
 /// <param name="name">姓名</param>
 /// <param name="sex">性别</param>
 /// <param name="age">年龄</param>
 /// <param name="address">地址</param>
 protected UserCore(string account, string passwd, string name, TheSex sex, int age, string address, Identity userType)
     : this(account, passwd, name, userType)
 {
     this.Sex     = sex;
     this._age    = age;
     this.Address = address;
 }
Пример #2
0
        /// <summary>
        /// 修改性别
        /// </summary>
        /// <param name="me">当前用户</param>
        public static void ChangeMySex(this UserCore me)
        {
            WriteLine("设置新性别: (选择: 上/下方向键   确定: 回车键) ");
            dynamic dm = Client.GetSelectorObject(new List <string> {
                "男", "女"
            }, TheSex.Male, TheSex.Frame);
            TheSex result = dm.GetSelect();

            //不使用动态加载
            //TheSex result = new Selector<TheSex>(new List<String> { "男", "女" }, TheSex.Male, TheSex.Frame).GetSubject();
            me.AddHistory(new Message("你", $"重新设置了性别({me.Sex = result})"));
            DisplayTheInformationOfSuccessfully();
        }
Пример #3
0
 /// <inheritdoc />
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="account">账户</param>
 /// <param name="passwd">密码</param>
 /// <param name="userType">用户类型</param>
 /// <param name="name">姓名</param>
 /// <param name="sex">性别</param>
 /// <param name="age">年龄</param>
 /// <param name="address">地址</param>
 public Student(string account, string passwd, string name, TheSex sex, int age, string address, Identity userType = Identity.Student)
     : base(account, passwd, name, sex, age, address, userType)
 {
 }