Inheritance: INotifyPropertyChanged
Esempio n. 1
0
        public AirlinerClassMVVM(AirlinerClass.ClassType type, int seating, Boolean canDelete)
        {
            this.CanDelete      = canDelete;
            this.Type           = type;
            this.Seating        = seating;
            this.RegularSeating = seating;
            this.Facilities     = new ObservableCollection <AirlinerClassFacilityMVVM>();

            foreach (AirlinerFacility.FacilityType facType in Enum.GetValues(typeof(AirlinerFacility.FacilityType)))
            {
                AirlinerClassFacilityMVVM facility = new AirlinerClassFacilityMVVM(facType);

                foreach (AirlinerFacility fac in AirlinerFacilities.GetFacilities(facType))
                {
                    facility.Facilities.Add(fac);
                }


                this.Facilities.Add(facility);
            }
        }
        public AirlinerClassMVVM(AirlinerClass.ClassType type, int seating, int maxseats, Boolean canDelete)
        {
            this.CanDelete = canDelete;
            this.Type = type;
            this.Seating = seating;
            this.MaxSeats = maxseats;
            this.RegularSeating = seating;
            this.Facilities = new ObservableCollection<AirlinerClassFacilityMVVM>();

            foreach (AirlinerFacility.FacilityType facType in Enum.GetValues(typeof(AirlinerFacility.FacilityType)))
            {
                AirlinerClassFacilityMVVM facility = new AirlinerClassFacilityMVVM(facType);

                foreach (AirlinerFacility fac in AirlinerFacilities.GetFacilities(facType))
                    facility.Facilities.Add(fac);

                this.Facilities.Add(facility);

            }
        }