editor.cs
来自「SharpDevelop2.0.0 c#开发免费工具」· CS 代码 · 共 54 行
CS
54 行
using ICSharpCode.SharpDevelop.Gui;
using System;
using System.Windows.Forms;
namespace AlternateEditor
{
public class Editor : AbstractViewContent
{
RichTextBox rtb = new RichTextBox();
public override Control Control {
get {
return rtb;
}
}
public override bool IsReadOnly {
get {
return rtb.ReadOnly;
}
}
public Editor()
{
rtb.Dock = DockStyle.Fill;
}
public override void RedrawContent()
{
rtb.Refresh();
}
public override void Dispose()
{
rtb.Dispose();
}
public override void Save(string fileName)
{
rtb.SaveFile(fileName, RichTextBoxStreamType.PlainText);
TitleName = fileName;
IsDirty = false;
}
public override void Load(string fileName)
{
rtb.LoadFile(fileName, RichTextBoxStreamType.PlainText);
TitleName = fileName;
IsDirty = false;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?