Exemplo n.º 1
0
        public void SelectItem(object ItemObject)
        {
            PlaceVM Place = ItemObject as PlaceVM;

            if (Place != null)
            {
                Navigation.PushAsync(new PlacePage(Place));
            }
        }
Exemplo n.º 2
0
        public void SaveItem(object ItemObject)
        {
            PlaceVM Place = ItemObject as PlaceVM;

            if (Place != null && Place.IsValid)
            {
                Places.Add(Place);
                Back();
            }
        }
Exemplo n.º 3
0
        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();
            }
        }
Exemplo n.º 4
0
        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));
            }
        }
Exemplo n.º 5
0
        public void DeleteItem(object ItemObject)
        {
            PlaceVM Place = ItemObject as PlaceVM;

            Places?.Remove(Place);
        }