يسلموا شريك بس تشاطر وجيب الحل مو تحط الشغل كله عليي (مو أنت تقعد وأنا أشتغل)

بس مو مشكلة أنا حليتها وهي الفكرة مع الحل متل مالي كاتب بالتقرير:
كود:
1: save & load the program data: We added it from the tools of the visual studio 2008 : SaveFileDialog OpenFileDialog And there an example to deal with name1 text box and state1 check box 1.1.1: SAVE FILE code: SaveFileDialog saveFileDialog1 = new SaveFileDialog(); saveFileDialog1.Filter = "lpt file|*.lpt"; saveFileDialog1.Title = "Save a LPT File"; saveFileDialog1.AutoUpgradeEnabled = true; saveFileDialog1.ShowDialog(); StreamWriter stW = new StreamWriter(saveFileDialog1.FileName); stW.Write(name1.Text + ","); stW.Write(state1.Checked.ToString() + ","); stW.Flush(); stW.Close(); 1.1.2: SAVE FILE idea: The save idea here are that the file will be save the program data in text file have an extension lpt and the splitter between the data is the comma ( , ). 1.2.1: LOAD FILE code: openFileDialog1.Filter = "lpt file|*.lpt"; openFileDialog1.Title = "open a LPT File"; openFileDialog1.FileName = ""; if (openFileDialog1.ShowDialog() == DialogResult.OK) { StreamReader stR = new StreamReader(openFileDialog1.FileName); string haveText; haveText = stR.ReadToEnd(); string[] a; a = haveText.Trim(',').Split(','); foreach (string c in a) name1.Text = a[0]; foreach (string c in a) state1.Text = a[9]; 1.2.2:LOAD FILE idea: The idea of the load is the inverter of the save idea, in it we call load the file which have the extension lpt and it buts the data in it’s place according to our the programmer organization, and the program will take the next value when he find the comma ( , ).