codeeditordesigner.cs
来自「Fireball.CodeEditor is an source code ed」· CS 代码 · 共 46 行
CS
46 行
//ORIGINAL LGPL SOURCE CODE FINDED ON COMPONA LGPL SOURCE CODE
using System;
using System.ComponentModel.Design;
using System.Windows.Forms.Design;
using Fireball.Syntax;
namespace Fireball.Windows.Forms.CodeEditor
{
/// <summary>
/// Designer for the SyntaxBoxControl
/// </summary>
public class CodeEditorDesigner : ControlDesigner
{
public CodeEditorDesigner() : base()
{
}
protected ISelectionService SelectionService
{
get { return (ISelectionService) this.GetService(typeof (ISelectionService)); }
}
protected void OnActivate(object s, EventArgs e)
{
}
protected virtual IDesignerHost DesignerHost
{
get { return (IDesignerHost) base.GetService(typeof (IDesignerHost)); }
}
public override void InitializeNewComponent(System.Collections.IDictionary defaultValues)
{
base.InitializeNewComponent(defaultValues);
if (DesignerHost != null)
{
DesignerTransaction trans = DesignerHost.CreateTransaction("Adding Syntaxdocument");
SyntaxDocument sd = DesignerHost.CreateComponent(typeof(SyntaxDocument)) as SyntaxDocument;
CodeEditorControl sb = this.Control as CodeEditorControl;
sb.Document = sd;
trans.Commit();
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?