I originally had them the items compare according to there names, but what if a user changes the name of an item... So i now compare the items with multiple things.Quote:
well i was thinking along time ago of giving this a shoot but with better AI/logic than that
what i mean is, you may (and prolly does) cast properties as an item object
then use linq to group them with there domain, for instance xxxxx-0 up to xxxxx-10
and for a better idea you may group them with there name
ex.
and then later you may do something likeCode:var ItemsGroups = from item in Items group item by item.name;
i was also thinking about having a data grid view showing all the items and there properties, editing/adding/deleting to that data grid view then save it whenever user is done, on a separate thread not to freeze the guiCode:foreach (var ItemGroup in ItemsGroups) { //do a check here on how many items in the itemgroup, if less than 9 break, however you may not even need that check but just incase foreach (ItemClass item in ItemGroup) { add the prefix and stuff } }
wish that was helpful, best of luck
I don't have an item class but i do use linq, The reason for that is, if i cast all of them into items i have to cast them back to save the file, which takes long.
I wrote the base code for this awhile back, And it seems i never used any threads besides the default UI thread. But i don't see the need for it.
Also i don't run through all the items to edit them, I only edit the items that require changes. And write them to the file.
Prefixes and Suffixes for items is not an issue though, its the floor icons that is the issue.
Thanks for your thoughts.