public void SelectItem(object ItemObject) { PlaceVM Place = ItemObject as PlaceVM; if (Place != null) { Navigation.PushAsync(new PlacePage(Place)); } }
public void SaveItem(object ItemObject) { PlaceVM Place = ItemObject as PlaceVM; if (Place != null && Place.IsValid) { Places.Add(Place); Back(); } }
public void ConfirmChanging(object ItemObject) { PlaceVM Place = ItemObject as PlaceVM; if (Place != null && Place.PropertiesBuffer.IsValid) { Place.Name = Place.PropertiesBuffer.Name; Place.Description = Place.PropertiesBuffer.Description; Place.Category = Place.PropertiesBuffer.Category; Place.Owner = Place.PropertiesBuffer.Owner; Place.PropertiesBuffer = null; Back(); } }
public void EditItem(object ItemObject) { PlaceVM Place = ItemObject as PlaceVM; if (Place != null) { Place.PropertiesBuffer = new PlaceVM.Buffer { Name = Place.Name, Description = Place.Description, Category = Place.Category, Owner = Place.Owner }; Navigation.PushAsync(new EditItemPage(Place)); } }
public void DeleteItem(object ItemObject) { PlaceVM Place = ItemObject as PlaceVM; Places?.Remove(Place); }