Beispiel #1
0
        public void SelectItem(object ItemObject)
        {
            InventoryObjectVM InventoryObject = ItemObject as InventoryObjectVM;

            if (InventoryObject != null)
            {
                Navigation.PushAsync(new InventoryObjectPage(InventoryObject));
            }
        }
Beispiel #2
0
        public void SaveItem(object ItemObject)
        {
            InventoryObjectVM InventoryObject = ItemObject as InventoryObjectVM;

            if (InventoryObject != null && InventoryObject.IsValid)
            {
                InventoryObjects.Add(InventoryObject);
                Back();
            }
        }
Beispiel #3
0
        public void ConfirmChanging(object ItemObject)
        {
            InventoryObjectVM inventoryObject = ItemObject as InventoryObjectVM;

            if (inventoryObject != null && inventoryObject.PropertiesBuffer.IsValid)
            {
                inventoryObject.Name             = inventoryObject.PropertiesBuffer.Name;
                inventoryObject.Description      = inventoryObject.PropertiesBuffer.Description;
                inventoryObject.Category         = inventoryObject.PropertiesBuffer.Category;
                inventoryObject.PropertiesBuffer = null;
                Back();
            }
        }
Beispiel #4
0
        public void EditItem(object ItemObject)
        {
            InventoryObjectVM InventoryObject = ItemObject as InventoryObjectVM;

            if (InventoryObject != null)
            {
                InventoryObject.PropertiesBuffer = new InventoryObjectVM.Buffer
                {
                    Name        = InventoryObject.Name,
                    Description = InventoryObject.Description,
                    Category    = InventoryObject.Category,
                    Owner       = InventoryObject.Owner
                };
                Navigation.PushAsync(new EditItemPage(InventoryObject));
            }
        }
Beispiel #5
0
        public void DeleteItem(object ItemObject)
        {
            InventoryObjectVM InventoryObject = ItemObject as InventoryObjectVM;

            InventoryObjects?.Remove(InventoryObject);
        }