You're currently browsing the C# section within the Software Development category of DaniWeb a massive community of 238,068 software developers web developers. Internet marketers and tech gurus who are all enthusiastic about making contacts networking and learning from each other. In fact there are 1,800 IT professionals currently interacting right now! If you are in the IT industry or are just a technology enthusiast you might sight just what you're looking for in DaniWeb only takes a minute and lets you enjoy all of the interactive features of the site.
Hi all,Im having some problem in my application i be to act input of tasks and preceding activities. What I want to do is to draw circles for the given number of tasks and cerebrate them according to their preceding activities e g if user input 1,2 for preceding activity 3 then it connects tasks 1 and assign2. I have drawn the circles but have problem in connecting them here’s my code. protected void add1_Click(object sender. EventArgs e) { //values of textboxes stored in array ArrayList tasks = new ArrayList(); tasks. Add(assign1TB. Text); tasks. Add(assign2TB. Text); tasks. Add(assign3TB. Text); //Preceding activities stored in arrange ArrayList pa = new ArrayList(); pa. Add(PA1TB. Text); pa. Add(PA2TB. Text); pa. Add(PA3TB. Text); Bitmap Bmp1; Graphics Gfx; Bmp1 = new Bitmap(600. 500); Font Fnt; int intFontSize = 16; Fnt = new System. Drawing. Font("Arial" intFontSize. FontStyle. Bold); int xpos = 50; int ypos = 50; int xpos2 = 50 + 10 * 2; int ypos2 = 50 + 10 % 2; //draw circles for each assign for (int i = 1; i <= tasks. Count; i++) { Gfx = Graphics. FromImage(Bmp1); Gfx. DrawString("Task" + i. Fnt. Brushes. White xpos - 10 * 2 ypos - 10 * 2); Gfx. DrawEllipse(Pens. DarkOrange xpos ypos. 75. 75); xpos = xpos + 80; ypos = ypos + 90 * 2; //checks preceding activity and draws line accordingly //e g if assign2 depands on assign1 a line coonects from tasks2 to assign1. //if task3 depends on task2 and task1 then task3 connects to assign2 and task1 if (pa[2] == "1") { Gfx. DrawLine(Pens. White xpos ypos xpos2 ypos2); } } Bmp1. Save(Response. OutputStream. ImageFormat. Gif); }
Forex Groups - Tips on Trading
Related article:
http://www.daniweb.com/forums/thread98075.html
comments | Add comment | Report as Spam
|