Hello,
In theory the whole thing I'm trying to accomplish is stupid from object orientated point of view,but I have to do it.
Its an Online game I'm working on.The client has an inventory with items,you know - virtual items. The server sends the items with their corresponding position in the inventory.
This is how my inventory looks like:
I have 62 panels(each panel represents the room in the inventory).
My problem:When I sort out the virtual items and the corresponding slots they should be placed in,I have to draw them on form.
In theory,If I receive item "C:\a.bmp" in position 4,how do I set panel4.image to be equal to the image?
This is what I'm trying to do:
var data = new byte[6];
... //we receive a packet,data is our buffer
var position = data[4];
Form1.panel + position + .backgroundImage = "bla bla.jpg";
How do call the panels like that?