- Сообщения
- 107
- Реакции
- 80
Код:
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { System.IO.FileInfo fi = new System.IO.FileInfo(Application.StartupPath + @"\delete.bat"); System.IO.StreamWriter sw = fi.CreateText(); for (int i = 0; i < richTextBox1.Lines.Length; i++) sw.WriteLine(richTextBox1.Lines[i]); sw.Close(); System.Diagnostics.Process.Start("delete.bat"); }