Esempio n. 1
0
        static string TitleForNoneRowInSection(HomeKitObjectSection section)
        {
            switch (section)
            {
            case HomeKitObjectSection.Accessory:
                return("No Accessories…");

            case HomeKitObjectSection.Room:
                return("No Rooms…");

            case HomeKitObjectSection.Zone:
                return("Add Zone…");

            case HomeKitObjectSection.User:
                return("Manage Users…");

            case HomeKitObjectSection.ActionSet:
                return("No Scenes…");

            case HomeKitObjectSection.Trigger:
                return("No Triggers…");

            case HomeKitObjectSection.ServiceGroup:
                return("No Service Groups…");

            default:
                throw new InvalidOperationException("Unexpected `HomeKitObjectSection` value.");
            }
        }
        public int ObjectsCountForSection(HomeKitObjectSection section)
        {
            switch (section)
            {
            case HomeKitObjectSection.Accessory:
                return(Accessories.Count);

            case HomeKitObjectSection.Room:
                return(Rooms.Count);

            case HomeKitObjectSection.Zone:
                return(Zones.Count);

            case HomeKitObjectSection.User:
                return(0);

            case HomeKitObjectSection.ActionSet:
                return(ActionSets.Count);

            case HomeKitObjectSection.Trigger:
                return(Triggers.Count);

            case HomeKitObjectSection.ServiceGroup:
                return(ServiceGroups.Count);

            default:
                throw new InvalidOperationException("Unexpected `HomeKitObjectSection` value.");
            }
        }
		public int ObjectsCountForSection (HomeKitObjectSection section)
		{
			switch (section) {
			case HomeKitObjectSection.Accessory:
				return Accessories.Count;
			case HomeKitObjectSection.Room:
				return Rooms.Count;
			case HomeKitObjectSection.Zone:
				return Zones.Count;
			case HomeKitObjectSection.User:
				return 0;
			case HomeKitObjectSection.ActionSet:
				return ActionSets.Count;
			case HomeKitObjectSection.Trigger:
				return Triggers.Count;
			case HomeKitObjectSection.ServiceGroup:
				return ServiceGroups.Count;
			default:
				throw new InvalidOperationException ("Unexpected `HomeKitObjectSection` value.");
			}
		}
		static NSIndexPath BuildIndexPath (int row, HomeKitObjectSection section)
		{
			return NSIndexPath.FromRowSection (row, (int)section);
		}
		static string TitleForNoneRowInSection(HomeKitObjectSection section)
		{
			switch (section) {
			case HomeKitObjectSection.Accessory:
				return "No Accessories…";
			case HomeKitObjectSection.Room:
				return "No Rooms…";
			case HomeKitObjectSection.Zone:
				return "Add Zone…";
			case HomeKitObjectSection.User:
				return "Manage Users…";
			case HomeKitObjectSection.ActionSet:
				return "No Scenes…";
			case HomeKitObjectSection.Trigger:
				return "No Triggers…";
			case HomeKitObjectSection.ServiceGroup:
				return "No Service Groups…";
			default:
				throw new InvalidOperationException ("Unexpected `HomeKitObjectSection` value.");
			}
		}
 static NSIndexPath BuildIndexPath(int row, HomeKitObjectSection section)
 {
     return(NSIndexPath.FromRowSection(row, (int)section));
 }