المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Flowchart - approach



C# Programming
03-30-2009, 09:13 PM
I need to develop a flow chart. I have an object that has 3 integers(an identifier, an upper node and a lower node). Would there be a big performance hit or better way than to create an array and arrange my objects in the array in order to process the image. For example:

First, the lower node is ALWAYS bigger than the upper node. Each area can only have two nodes. All the information will be passed to me and is stored in a datatable.

The list I am given has 10 objects. I set up an array with a depth of 10 and a width of 3(1/3 the # of objects). I place the lowest area(highest lower node) in the bottom and middle of the array and iterate the rest up.

Once I get all the objects placed in the array, I can get the real depth and width and call my graphics to draw the objects.

There shouldn't be more than 40 objects at a time, so theoretically, the max array size would be 40x13. The reason I have to make a bigger array is the flow could be a straight line or could branch off like crazy.

Am I way off on this? I am a newbie if it isn't obvious. I have an image of what the flowchart would look like, or, if anybody needs further explanation let me know. Thanks.