示例#1
0
 private void saveToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (saveFileDialog.ShowDialog() == DialogResult.OK)
     {
         try
         {
             FileTls fileTls = new FileTls(saveFileDialog.FileName);
             fileTls.WriteString(Output.Text);
         }
         catch (Exception eror)
         {
             MessageBox.Show(eror.Message, "ошибка");
         }
     }
 }
示例#2
0
文件: Program.cs 项目: InFly1/Attest2
 private static void StringFile(string str)
 {
     while (true)
     {
         try
         {
             Console.Write("введите имя файла: ");
             FileTls fileTls = new FileTls(Console.ReadLine());
             fileTls.WriteString(str);
             return;
         }
         catch (Exception eror)
         {
             Console.WriteLine(eror.Message);
         }
     }
 }