public FindBar(ToolStripContainer workspace, EditorControl editor) { this.editor = editor; var cancelImage = Image.FromFile("/res/critical.png".AsAbsolute()); var goImage = Image.FromFile("/res/findnexths.png".AsAbsolute()); workspace.BottomToolStripPanel.Controls.Add(this); Visible = false; Left = workspace.LeftToolStripPanel.Width; Items.Add("", cancelImage, (_, e) => Visible = false); Items.Add(new ToolStripLabel("Find What:")); ec = new FindBarTextBox() { Width = 300 }; ec.Dismissed += () => { Hide(); editor.Focus(); }; ec.Accepted += () => { DoFind(); }; var i = new ToolStripControlHost(ec) { AutoSize = false, Width = ec.Width }; Items.Add(i); Items.Add(new ToolStripButton("", goImage, (_, e) => DoFind())); RegExCheckBox = new CheckBox() { Text = "Regular Expression", AutoSize = false, Width = 130, Checked = false, BackColor = Color.Transparent, }; CaseSensitivityCheckBox = new CheckBox() { Text = "Case Sensitive", Checked = false, BackColor = Color.Transparent, }; var RegExHost = new ToolStripControlHost(RegExCheckBox) { AutoSize = false, Width = RegExCheckBox.Width }; var CaseHost = new ToolStripControlHost(CaseSensitivityCheckBox) { AutoSize = false, Width = CaseSensitivityCheckBox.Width }; Items.Add(RegExHost); Items.Add(CaseHost); }
/// <summary> /// Standart Konstruktor, sollte nicht zur öffnung oder erstellung eines /// Dokuments verwendet werden /// </summary> public EditorTab(MainForm mf) { InitializeComponent(); this.Title = ""; editor = new EditorControl(); editor.Parent = panel1; editor.Visible = true; editor.Dock = DockStyle.Fill; editor.ActiveTextAreaControl.TextArea.KeyDown += new KeyEventHandler(TextArea_KeyDown); editor.ActiveTextAreaControl.TextArea.DoProcessDialogKey += new ICSharpCode.TextEditor.DialogKeyProcessor(TextArea_DoProcessDialogKey); editor.TextChanged += new EventHandler(editor_TextChanged); editor.BringToFront(); editor.Focus(); }
public void Focus() { EditorControl.Focus(); }
protected internal override void PerformClick() { editor.Buffer.Overtype = !editor.Buffer.Overtype; editor.Focus(); }