private void HandleAddMember()
 {
     var inputName = memberView.GetStringInput(100, "Enter member name", 3);
     var inputSocialSecurityNumber = memberView.GetStringInput(11, "Enter social security number (YYMMDD-XXXX or XXX-XX-XXXX)", 9, @"^(?:\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[1-2]\d|3[0-1])\-?\d{4}|\d{3}\-?\d{2}\-?\d{4})$");
     var savedMember = memberRegister.AddMember(inputName, inputSocialSecurityNumber);
     boatManager = memberRegister.GetBoatManager(savedMember);
     HandleMember(savedMember);
 }
        private void HandleMemberList(bool showDetailed)
        {
            memberView.DisplayMemberList(showDetailed);
            int validMaxInput = memberRegister.GetMemberList().Count;

            var input = memberView.GetIntegerInput(validMaxInput, "Pick member");

            if (input != 0)
            {
                var memberId = memberRegister.GetMemberList()[input - 1].Id;
                var member = memberRegister.GetMemberInfo(memberId);
                boatManager = memberRegister.GetBoatManager(member);
                HandleMember(member);
            }
        }
Esempio n. 3
0
        public Member(string name, string socialSecurityNumber, int memberId)
        {
            BoatManager = new BoatManager();
            Id = memberId;
            Name = name;
            SocialSecurityNumber = socialSecurityNumber;

            BoatManager.PropertyChanged += BoatManager_PropertyChanged;
        }