public NSIndexPath Remove(HMServiceGroup serviceGroup) { var indexPath = IndexPathOfObject(serviceGroup); ServiceGroups.RemoveAt(indexPath.Row); return(indexPath); }
public void DidRemoveServiceGroup(HMHome home, HMServiceGroup group) { if (ServiceGroup == group) { DismissViewController(true, null); } }
public void DidRemoveService(HMHome home, HMService service, HMServiceGroup group) { if (ServiceGroup == group) { ReloadData(); } }
public void DidRemoveServiceGroup(HMHome home, HMServiceGroup group) { if (group == ServiceGroup) { NavigationController.PopViewController(true); } }
async void TryRemove(HMServiceGroup serviceGroup) { try { await Home.RemoveServiceGroupAsync(serviceGroup); } catch (NSErrorException ex) { DisplayError(ex.Error); Add(serviceGroup); } }
public NSIndexPath Add (HMServiceGroup serviceGroup) { ServiceGroups.Add (serviceGroup); ServiceGroups.SortByLocalizedName (sg => sg.Name); return IndexPathOfObject (serviceGroup); }
public void DidUpdateNameForServiceGroup(HMHome home, HMServiceGroup group) { ReloadRowAt(ObjectCollection.IndexPathOfObject(group)); }
public void DidRemoveServiceGroup(HMHome home, HMServiceGroup group) { DeleteRowAt(ObjectCollection.Remove(group)); }
public void DidAddServiceGroup(HMHome home, HMServiceGroup group) { Add(group); }
void Add(HMServiceGroup serviceGroup) { InsertRowAt(ObjectCollection.Add(serviceGroup)); }
// returns: A list of services that exist in the home and have not yet been added to this service group. public static IEnumerable<HMService> ServicesNotAlreadyInServiceGroup (this HMHome self, HMServiceGroup serviceGroup) { var servicesInGroup = new HashSet<HMService> (serviceGroup.Services); Func<HMService, bool> filter = s => !servicesInGroup.Contains (s) && s.ServiceType != HMServiceType.AccessoryInformation; return self.GetAllServices ().Where (filter); }
public void DidRemoveServiceGroup (HMHome home, HMServiceGroup group) { if (ServiceGroup == group) DismissViewController (true, null); }
public void DidUpdateNameForServiceGroup (HMHome home, HMServiceGroup group) { ReloadRowAt (ObjectCollection.IndexPathOfObject (group)); }
public void DidRemoveServiceGroup (HMHome home, HMServiceGroup group) { DeleteRowAt (ObjectCollection.Remove (group)); }
public void DidAddServiceGroup (HMHome home, HMServiceGroup group) { Add(group); }
void Add (HMServiceGroup serviceGroup) { InsertRowAt (ObjectCollection.Add (serviceGroup)); }
async void TryRemove (HMServiceGroup serviceGroup) { try { await Home.RemoveServiceGroupAsync (serviceGroup); } catch (NSErrorException ex) { DisplayError (ex.Error); Add (serviceGroup); } }
public NSIndexPath Remove (HMServiceGroup serviceGroup) { var indexPath = IndexPathOfObject (serviceGroup); ServiceGroups.RemoveAt (indexPath.Row); return indexPath; }
public NSIndexPath IndexPathOfObject (HMServiceGroup serviceGroup) { var index = ServiceGroups.IndexOf (serviceGroup); return index < 0 ? null : BuildIndexPath (index, HomeKitObjectSection.ServiceGroup); }
public void DidRemoveServiceGroup (HMHome home, HMServiceGroup group) { if (group == ServiceGroup) NavigationController.PopViewController (true); }
public NSIndexPath Add(HMServiceGroup serviceGroup) { ServiceGroups.Add(serviceGroup); ServiceGroups.SortByLocalizedName(sg => sg.Name); return(IndexPathOfObject(serviceGroup)); }
public NSIndexPath IndexPathOfObject(HMServiceGroup serviceGroup) { var index = ServiceGroups.IndexOf(serviceGroup); return(index < 0 ? null : BuildIndexPath(index, HomeKitObjectSection.ServiceGroup)); }
public void DidRemoveService (HMHome home, HMService service, HMServiceGroup group) { if (ServiceGroup == group) ReloadData (); }
// returns: A list of services that exist in the home and have not yet been added to this service group. public static IEnumerable <HMService> ServicesNotAlreadyInServiceGroup(this HMHome self, HMServiceGroup serviceGroup) { var servicesInGroup = new HashSet <HMService> (serviceGroup.Services); Func <HMService, bool> filter = s => !servicesInGroup.Contains(s) && s.ServiceType != HMServiceType.AccessoryInformation; return(self.GetAllServices().Where(filter)); }