admin 管理员组文章数量: 887021
2023年12月20日发(作者:frequency函数视频)
C#中实现撤销、恢复、保存、退出、对齐代码
2009-10-27 09:30
private void 新建ToolStripMenuItem_Click(object sender,
EventArgs e)
{
= "";
}
private void 打开ToolStripMenuItem_Click(object sender,
EventArgs e)
{
OpenFileDialog openF = new OpenFileDialog();
= "文本文件(*.rtf)|*.rtf|文本文件(*.txt)|*.txt|所有文件(*.*)|*.*";
if (alog() == )
{
string strFileNmae = me;
string strExt = ension(strFileNmae);//对应命名空间
if (r() == ".rtf")
{
le(
@strFileNmae,
xt);
}
else if (r() == ".txt")
{
le(
@strFileNmae,
ext);
}
else
{
= "系统不支持该类型文件。";
}
}
}
private void 保存ToolStripMenuItem_Click(object sender,
EventArgs e)
{
SaveFileDialog saveF = new SaveFileDialog();
= "文本文件(*.rtf)|*.rtf|文本文件(*.txt)|*.txt|所有文件(*.*)|*.*";
eDirectory = true;
if (alog() == )
{
string strFileNmae = me;
le(
strFileNmae, xt);
}
}
private void 退出ToolStripMenuItem_Click(object sender,
EventArgs e)
{
();
}
private void 字体ToolStripMenuItem_Click(object sender,
EventArgs e)
{
FontDialog fontD = new FontDialog();
lor = true;
fects = true;
if (alog() == )
{
ionFont = ;
ionColor = ;
}
}
private void 颜色ToolStripMenuItem_Click(object sender,
EventArgs e)
{
ColorDialog colorD = new ColorDialog();
if (alog() == )
{
ionColor = ;
}
}
private void 左对齐ToolStripMenuItem_Click(object sender,
EventArgs e)
{
ionAlignment =
;
}
private void 居中ToolStripMenuItem_Click(object sender,
EventArgs e)
{
ionAlignment =
;
}
private void 右对齐ToolStripMenuItem_Click(object sender,
EventArgs e)
{
ionAlignment =
;
}
private void 撤销ToolStripMenuItem_Click(object sender,
EventArgs e)
{
();
}
private void 删除DToolStripMenuItem_Click(object sender,
EventArgs e)
{
();
}
private void 全选AToolStripMenuItem_Click(object sender,
EventArgs e)
{
All();
}
private void 恢复ToolStripMenuItem_Click(object sender,
EventArgs e)
{
();
}
版权声明:本文标题:C#中实现撤销、恢复、保存、退出、对齐代码 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.freenas.com.cn/free/1703012675h439621.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论