Exemplo n.º 1
0
        public PilotViewModel(MainViewModel parent)
        {
            _parent = parent;
            SubmitPilot = new RelayCommand(PilotSubmit);

            Pilots = new List<Pilot>();

            Pilots.AddRange(_parent.PilotDatabase.GetPilots());
        }
Exemplo n.º 2
0
        public FamilyViewModel(MainViewModel parent)
        {
            ChildSelectCommand = new RelayCommand(DoEditChild, CanChildSelect);
            NewChildCommand = new RelayCommand(NewChildClicked);

            _parent = parent;

            _childrenNotCheckedIn = new List<Person>();
            _childrenNotCheckedIn.AddRange(_parent.FamilyDatabase.GetChildrenNotCheckedIn());
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the DataViewModel class.
        /// </summary>
        public DataViewModel(MainViewModel parent, Family family)
        {
            _parent = parent;
            _family = family;

            FamilySubmitCommand = new RelayCommand(FamilySubmit, CanSubmitFamily);
            BackUpCommand = new RelayCommand(BackUpSelected);
            AddFamilyMemberCommand = new RelayCommand(AddFamilyMember);
            DeleteSelectedCommand = new RelayCommand(DeleteSelectedMember, CanDeleteSelected);

            if (_family.FamilyMembers.Count == 0)
            {
                // No default Family member, create them.
                _family.AddFamilyMember(new Person("", "", PersonType.Child, 0.0));
            }

            _selectedFamilyMember = _family.FamilyMembers[0];
        }
Exemplo n.º 4
0
 public LoginViewModel(MainViewModel parent)
 {
     _parent = parent;
     AddVolCommand = new RelayCommand(UpdateVolName, CanUpdateVolName);
 }
 /// <summary>
 /// Initializes a new instance of the CheckInTypeSelectorViewModel class.
 /// </summary>
 public CheckInTypeSelectorViewModel(MainViewModel parent)
 {
     _parent = parent;
     PilotCommand = new RelayCommand(PilotSelected);
     FamilyCommand = new RelayCommand(FamilySelected);
 }