Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.CodeEditor/3.2/CodeViewer.cs @ 3381

Last change on this file since 3381 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 
1using System;
2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Data;
5using System.Drawing;
6using System.Linq;
7using System.Text;
8using System.Windows.Forms;
9
10namespace 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.