Example #1
0
        private static void DeleteDataItem(Type BaseType, object Item, XMLDataBase.DataBase DataBase, bool AutoSave)
        {
            List <PropertyInfo> NodedLocationProps = GetProprites(OBJS.Types.NodedLocation, BaseType);

            if (NodedLocationProps.Count != 0)
            {
                PropertyInfo NodeLocation = NodedLocationProps[0];

                object ItemObject = NodeLocation.GetValue(Item, null);
                string ItemValue  = ItemObject?.ToString() ?? "";

                DataBase.DeleteItem(ItemValue, AutoSave);
            }

            List <PropertyInfo> NodeIDProps = GetProprites(OBJS.Types.NodeID, BaseType);

            if (NodeIDProps.Count != 0)
            {
                PropertyInfo NodeIDProp = NodeIDProps[0];

                object ItemObject = NodeIDProp.GetValue(Item, null);
                int    ItemID     = (ItemObject != null) ? (int)ItemObject : -1;
            }
        }