Last change
on this file since 3025 was
2659,
checked in by epitzer, 15 years ago
|
Add new Plugin that provides a code editor with syntax highlighting and code completion (#842)
|
File size:
628 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.ComponentModel;
|
---|
4 | using System.Data;
|
---|
5 | using System.Drawing;
|
---|
6 | using System.Linq;
|
---|
7 | using System.Text;
|
---|
8 | using System.Windows.Forms;
|
---|
9 |
|
---|
10 | namespace HeuristicLab.CodeEditor {
|
---|
11 | public partial class CodeViewer : Form {
|
---|
12 |
|
---|
13 | public CodeViewer() {
|
---|
14 | InitializeComponent();
|
---|
15 | textEditorControl1.IsReadOnly = true;
|
---|
16 | textEditorControl1.SetHighlighting("C#");
|
---|
17 | }
|
---|
18 |
|
---|
19 | public CodeViewer(string code) : this() {
|
---|
20 | textEditorControl1.Text = code;
|
---|
21 | }
|
---|
22 |
|
---|
23 | private void button1_Click(object sender, EventArgs e) {
|
---|
24 | Close();
|
---|
25 | }
|
---|
26 | }
|
---|
27 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.