Пример #1
0
 private void button4_Click(object sender, EventArgs e)
 {
     // 保存文件
     if (textBox2.Text != null)
     {
         if (FileOperate.WriteFile(textBox2.Text, textBox1.Text))
         {
             MessageBox.Show("保存成功");
         }
     }
 }
Пример #2
0
        private void button5_Click(object sender, EventArgs e)
        {
            // 打开文件
            OpenFileDialog openfile = new OpenFileDialog();
            FileOperate    oper     = new FileOperate();

            if (openfile.ShowDialog() == DialogResult.OK)
            {
                textBox2.Text = openfile.FileName;
                textBox1.Text = oper.ReadFile(openfile.FileName, tabPage5);
            }
        }