嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559
本次赞助数额为: 2 元微信扫码支付:2 元
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
模仿记事本的简单功能,包括改变字体、查找、改变颜色等等。这里主要实现记事本装载文件、保存文件及快捷键设置等功能。
if (txtBox.Modified == true)
{
DialogResult dr = MessageBox.Show("文件发生变化,是否更改保存?", "注意", MessageBoxButtons.YesNoCancel);
if (dr == DialogResult.Yes)
{
保存SToolStripMenuItem_Click(sender, e);
return;
}
else if (dr == DialogResult.No)
{
return;
}
else if (dr == DialogResult.Cancel)
{
e.Cancel = true;
}
}
----------------
int row = txtBox.GetLineFromCharIndex(txtBox.SelectionStart) 1;
int col = (txtBox.SelectionStart - txtBox.GetFirstCharIndexFromLine(txtBox.GetLineFromCharIndex(txtBox.SelectionStart))) 1;
toolStripStatusLblLocation.Text = "第 " row " 行, 第 " col " 列";
toolStripStatusLblNow.Text = "" DateTime.Now.ToLocalTime();