- private void Form1_Load(object sender, EventArgs e)
- {
- string appPath = Application.StartupPath + "\\app.dll";
- if (File.Exists(appPath))
- {
- //配置文件存在
- StreamReader sr = new StreamReader(appPath);
- int x = Convert.ToInt32(sr.ReadLine());
- int y = Convert.ToInt32(sr.ReadLine());
- int w = Convert.ToInt32(sr.ReadLine());
- int h = Convert.ToInt32(sr.ReadLine());
- int r = Convert.ToInt32(sr.ReadLine());
- int g = Convert.ToInt32(sr.ReadLine());
- int b = Convert.ToInt32(sr.ReadLine());
- this.Location = new Point(x, y);
- this.Size = new Size(w, h);
- txtText.ForeColor = Color.FromArgb(r, g, b);
- sr.Close();
-
-
- }
- }
-
- private void 撤销ToolStripMenuItem_Click(object sender, EventArgs e)
- {
- //关于文本撤销的到上一步的是实现方法
- }
-
复制代码 关于文本撤销的到上一步的是实现方法,就像Visual Studio工具一样如果当前这一行写错了,按一下Ctrl+Z撤销上一步的操作。
|