u are right mr Graus ..i just wanna to thank u specially for ur effort with me ..god bless u my brother ; its the last time to ask about this project ..i swear . cheers;);
mr jets
Posts
-
Read from text file -
Read from text filedo u mean like that : if(openFileDialog1.ShowDialog()==DialogResult.OK) { StreamReader streamReader=new StreamReader(openFileDialog1.FileName); string m=streamReader.ReadToEnd(); string []x= m.Split(); MessageBox.Show(m); streamReader.Close(); } but this displays all the data in the file even after putting commas between data like 1 23 38 0 0 0 1 ,2.... iam lost !:confused:
-
Read from text file ..!i didnt get any usefull answer ..plzz i will appreciate any helppp !;)
-
Read from text fileheloo guys.. u really doing agreat job ..any way i have created strings for each shape (lines,polygons,..) each string contains informations about the shape( x1,y1,x2,y2,R,G,B,pen width) ..Now how can i make my prog read from the text and draw the shapes ..as example the line string : public void AddSv(Line l , ref string str) { if(drawwhat==1)// as one means lines str +="1"+"\n"+l.First.X.ToString()+"\n"+ l.First.Y.ToString()+"\n"+ l.Second.X.ToString()+"\n"+ l.Second.Y.ToString()+"\n"+ l.Pen.Color.R.ToString()+"\n"+ l.Pen.Color.G.ToString()+"\n"+ l.Pen.Color.B.ToString()+"\n"+ l.Pen.Width.ToString()+"\n\n"; after i draw the line i click on save to send the informations to the text : private void button1_Click(object sender, System.EventArgs e) { //save System.IO.FileStream fs = new System.IO.FileStream("c:\\graphics.txt", System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.Write, System.IO.FileShare.ReadWrite); StreamWriter streamWriter=new StreamWriter(fs); streamWriter.WriteLine(LineSv); streamWriter.Flush(); streamWriter.Close(); fs.Close(); }as u can see i dealing vs 2003 . Regards;;)
-
Read from text file..!thanks..but iam looking for the idea to make it reads line by line and draw the line ..should i use split fuction..or if condition..iam LOST!!:confused:
-
Read from text file..!heloo guys..thanks alot u really doing agreat job ..any way i have finally created strings for each shape (lines,polygons,..) each string contains informations about the shape( x1,y1,x2,y2,R,G,B,pen width) ..Now how can i make my prog read from the text and draw the shapes ..as example the line string : public void AddSv(Line l , ref string str) { if(drawwhat==1)// as one means lines str +="1"+"\n"+l.First.X.ToString()+"\n"+ l.First.Y.ToString()+"\n"+ l.Second.X.ToString()+"\n"+ l.Second.Y.ToString()+"\n"+ l.Pen.Color.R.ToString()+"\n"+ l.Pen.Color.G.ToString()+"\n"+ l.Pen.Color.B.ToString()+"\n"+ l.Pen.Width.ToString()+"\n\n"; after i draw the line i click on save to send the informations to the text : private void button1_Click(object sender, System.EventArgs e) { //save System.IO.FileStream fs = new System.IO.FileStream("c:\\graphics.txt", System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.Write, System.IO.FileShare.ReadWrite); StreamWriter streamWriter=new StreamWriter(fs); streamWriter.WriteLine(LineSv); streamWriter.Flush(); streamWriter.Close(); fs.Close(); } Regards;P;
-
Read from text file ..!heloo guys..thanks alot u really doing agreat job ..any way i have finally created strings for each shape (lines,polygons,..) each string contains informations about the shape( x1,y1,x2,y2,R,G,B,pen width) ..Now how can i make my prog read from the text and draw the shapes ..as example the line string : public void AddSv(Line l , ref string str) { if(drawwhat==1)// as one means lines str +="1"+"\n"+l.First.X.ToString()+"\n"+ l.First.Y.ToString()+"\n"+ l.Second.X.ToString()+"\n"+ l.Second.Y.ToString()+"\n"+ l.Pen.Color.R.ToString()+"\n"+ l.Pen.Color.G.ToString()+"\n"+ l.Pen.Color.B.ToString()+"\n"+ l.Pen.Width.ToString()+"\n\n"; after i draw the line i click on save to send the informations to the text : private void button1_Click(object sender, System.EventArgs e) { //save System.IO.FileStream fs = new System.IO.FileStream("c:\\graphics.txt", System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.Write, System.IO.FileShare.ReadWrite); StreamWriter streamWriter=new StreamWriter(fs); streamWriter.WriteLine(LineSv); streamWriter.Flush(); streamWriter.Close(); fs.Close(); } Regards;);
-
Read from text file ..!!heloo guys..thanks alot u really doing agreat job ..any way i have finally created strings for each shape (lines,polygons,..) each string contains informations about the shape( x1,y1,x2,y2,R,G,B,pen width) ..Now how can i make my prog read from the text and draw the shapes ..as example the line string : public void AddSv(Line l , ref string str) { if(drawwhat==1)// as one means lines str +="1"+"\n"+l.First.X.ToString()+"\n"+ l.First.Y.ToString()+"\n"+ l.Second.X.ToString()+"\n"+ l.Second.Y.ToString()+"\n"+ l.Pen.Color.R.ToString()+"\n"+ l.Pen.Color.G.ToString()+"\n"+ l.Pen.Color.B.ToString()+"\n"+ l.Pen.Width.ToString()+"\n\n"; after i draw the line i click on save to send the informations to the text : private void button1_Click(object sender, System.EventArgs e) { //save System.IO.FileStream fs = new System.IO.FileStream("c:\\graphics.txt", System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.Write, System.IO.FileShare.ReadWrite); StreamWriter streamWriter=new StreamWriter(fs); streamWriter.WriteLine(LineSv); streamWriter.Flush(); streamWriter.Close(); fs.Close(); } Regards:confused:
-
urgent..pzzz!!heloo my friend..okie my for loop like that : for (int j=0; j < arraylist_points.Count; j++){...} so lets say i draw squar then line ..it will be saved in text file as..: Line {X=83,Y=58}{X=257,Y=172} Line {X=165,Y=55}{X=71,Y=251} its should write squar then line..not line twice..!!:confused:
-
saving drawing as text fileok i did that ..: if(drawwhat==1) { streamWriter.WriteLine("Line"); for(int j=0;j lessthan arraylist_points.Count;j++) { start=(Point)arraylist_points[j]; end=(Point)arraylist_points[j+1]; str_Line=start.ToString()+end.ToString(); streamWriter.WriteLine(str_Line); j++; } } else if(drawwhat==2) { streamWriter.WriteLine("squar"); for(int j=0;jlessthan arraylist_points.Count;j++) { start=(Point)arraylist_points[j]; end=(Point)arraylist_points[j+1]; str_Line=start.ToString()+end.ToString(); streamWriter.WriteLine(str_Line); j++; } } streamWriter.Flush(); streamWriter.Close(); fs.Close(); } it will be saved in text file as : squar {X=131,Y=61}{X=265,Y=143} {X=68,Y=106}{X=146,Y=196} or u can recommend me ausfull article talkin about this..thats will be abetter idea..:sigh::confused: Regards:);
-
saving drawing as text filehello my friend..i know it writes each point twice one for idicate the start ..and other indicate the last..but the problem is when i draw 2 shapes like line the squar ..it writes SQUAR WORD TWICE in the text file as: squar {X=151,Y=49}{X=281,Y=143} squar {X=55,Y=96}{X=157,Y=202}
-
helpp..plzz!helloo guys..okie iam creating acode that can draw different shapes(lines, squar,..etc)thats done then save their info in text file ..(like the start point ,end point,..etc)..thats cool too ; BUTT the problem is its writting the last thing i draw ..(if i draw line then squar ..it writes squar twice):confused: // save the file string str_Line; System.IO.FileStream fs = new System.IO.FileStream("c:\\graphics.txt", System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.Write, System.IO.FileShare.ReadWrite); StreamWriter streamWriter=new StreamWriter(fs); if(drawwhat==1) { for(int j=0;j less than arraylist_points.Count;j++) streamWriter.WriteLine("Line"); start=(Point)arraylist_points[j]; end=(Point)arraylist_points[j+1]; str_Line=start.ToString()+end.ToString(); streamWriter.WriteLine(str_Line); j++; } } else if(drawwhat==2) { for(int j=0;j { streamWriter.WriteLine("squar"); start=(Point)arraylist_points[j]; end=(Point)arraylist_points[j+1]; str_Line=start.ToString()+end.ToString(); streamWriter.WriteLine(str_Line); j++; } } streamWriter.Flush(); streamWriter.Close(); fs.Close(); } //note : i want the program read from text after saving it..iam dealing VS 2003 ! Regards;:sigh:
-
urgent..pzzz!!helloo guys..okie iam creating acode that can draw different shapes(lines, squar,..etc)thats done then save their info in text file ..(like the start point ,end point,..etc)..thats cool too ; BUTT the problem is its writting the last thing i draw ..(if i draw line then squar ..it writes squar twice):confused: // save the file string str_Line; System.IO.FileStream fs = new System.IO.FileStream("c:\\graphics.txt", System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.Write, System.IO.FileShare.ReadWrite); StreamWriter streamWriter=new StreamWriter(fs); if(drawwhat==1) { for(int j=0;j less than arraylist_points.Count;j++) streamWriter.WriteLine("Line"); start=(Point)arraylist_points[j]; end=(Point)arraylist_points[j+1]; str_Line=start.ToString()+end.ToString(); streamWriter.WriteLine(str_Line); j++; } } else if(drawwhat==2) { for(int j=0;j { streamWriter.WriteLine("squar"); start=(Point)arraylist_points[j]; end=(Point)arraylist_points[j+1]; str_Line=start.ToString()+end.ToString(); streamWriter.WriteLine(str_Line); j++; } } streamWriter.Flush(); streamWriter.Close(); fs.Close(); } //plzz brothers iam stuck !
-
saving drawing as text filehelloo guys..okie iam creating acode that can draw different shapes(lines, squar,..etc)thats done then save their info in text file ..(like the start point ,end point,..etc)..thats cool too ; BUTT the problem is its writting the last thing i draw ..(if i draw line then squar ..it writes squar twice):confused: // save the file string str_Line; System.IO.FileStream fs = new System.IO.FileStream("c:\\graphics.txt", System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.Write, System.IO.FileShare.ReadWrite); StreamWriter streamWriter=new StreamWriter(fs); if(drawwhat==1) { for(int j=0;j less than arraylist_points.Count;j++) streamWriter.WriteLine("Line"); start=(Point)arraylist_points[j]; end=(Point)arraylist_points[j+1]; str_Line=start.ToString()+end.ToString(); streamWriter.WriteLine(str_Line); j++; } } else if(drawwhat==2) { for(int j=0;j { streamWriter.WriteLine("squar"); start=(Point)arraylist_points[j]; end=(Point)arraylist_points[j+1]; str_Line=start.ToString()+end.ToString(); streamWriter.WriteLine(str_Line); j++; } } streamWriter.Flush(); streamWriter.Close(); fs.Close(); } //plzz brothers iam stuck !
-
saving my drawing as atext file...!!yah thats cool my bro..i have already used an arraylist and thats was my best : // save the file string str_Line; System.IO.FileStream fs = new System.IO.FileStream("c:\\graphics.txt", System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.Write, System.IO.FileShare.ReadWrite); StreamWriter streamWriter=new StreamWriter(fs); if(drawwhat==1) { for(int j=0;j
-
help..any one helpp..!yah its much better..thanks bro..i will be more geatfull if u recommended me any usefull article about that..cuz iam dealing with alot of shapes ..not just lines...thanks again for ur time. cheers;;)
-
help..any one helpp..!thanks alot bro..but we are not on the same page..ok assume that i draw aline i want after clicking on save button..it will save the (start point , end point ,RGB ,...)of that line in text file..!!:^)
-
help..any one helpp..!mmmm..sounds look cool my friend..but i didnt get any thing :-O..do u know any usefull article about this..i will be greatfull.! Regards:);
-
help..any one helpp..!yah bro..thats right i wanna to save my drawing as text file..but iam stuck..!:confused:
-
saving my drawing as atext file...!!hello guys..my program is about drawing some shapes like (lines ,polygons..etc)my nightmare is after drawing the shapes i wanna to save them as atext file which contains the (start point , end point , color ,..etc) iam using V.S 2003...i will apprecaite any help . Regards:sigh:;