C#.net在在window forms窗体设计中怎么实现记事本的查找和替换功能
usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Da...
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Text;
namespace WindowsApplication6
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void 新建ToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void 打开ToolStripMenuItem_Click(object sender, EventArgs e)
{
openFileDialog1.Filter = "(*.txt)|*.txt|(*.rtf)|*.rtf|All File(*.*)|*.*";
openFileDialog1.FilterIndex = 1;
openFileDialog1.ShowDialog();
richTextBox1.LoadFile(openFileDialog1.FileName, RichTextBoxStreamType.PlainText);
}
private void 结束ToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
}
private void 字体ToolStripMenuItem_Click(object sender, EventArgs e)
{
fontDialog1.ShowDialog();
richTextBox1.SelectionFont = fontDialog1.Font;
}
private void 颜色ToolStripMenuItem_Click(object sender, EventArgs e)
{
colorDialog1.ShowDialog();
richTextBox1.SelectionColor = colorDialog1.Color;
}
private void 查找ToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void 替换ToolStripMenuItem_Click(object sender, EventArgs e)
{
}
}
}
private void 查找ToolStripMenuItem_Click(object sender, EventArgs e)
{
这里怎么写啊?
}
private void 替换ToolStripMenuItem_Click(object sender, EventArgs e)
{
这里怎么写啊?
} 展开
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Text;
namespace WindowsApplication6
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void 新建ToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void 打开ToolStripMenuItem_Click(object sender, EventArgs e)
{
openFileDialog1.Filter = "(*.txt)|*.txt|(*.rtf)|*.rtf|All File(*.*)|*.*";
openFileDialog1.FilterIndex = 1;
openFileDialog1.ShowDialog();
richTextBox1.LoadFile(openFileDialog1.FileName, RichTextBoxStreamType.PlainText);
}
private void 结束ToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
}
private void 字体ToolStripMenuItem_Click(object sender, EventArgs e)
{
fontDialog1.ShowDialog();
richTextBox1.SelectionFont = fontDialog1.Font;
}
private void 颜色ToolStripMenuItem_Click(object sender, EventArgs e)
{
colorDialog1.ShowDialog();
richTextBox1.SelectionColor = colorDialog1.Color;
}
private void 查找ToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void 替换ToolStripMenuItem_Click(object sender, EventArgs e)
{
}
}
}
private void 查找ToolStripMenuItem_Click(object sender, EventArgs e)
{
这里怎么写啊?
}
private void 替换ToolStripMenuItem_Click(object sender, EventArgs e)
{
这里怎么写啊?
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询