using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace txtWrite
{
public partial class Form1 : Form
{
private string currentFilePath;//存储打开文件的字段
public Form1()
{
InitializeComponent();
}
//打开文件
private void tspOpen_Click(object sender, EventArgs e)
{
if (ofdFile.ShowDialog() == DialogResult.OK)
{
getFileName(ofdFile.FileName);
txtFile.Text = File.ReadAllText(currentFilePath);
}
}
//保存
private void tsmSave_Click(object sender, EventArgs e)
{