Last change
on this file since 643 was
635,
checked in by mstoeger, 16 years ago
|
Imported charting framework sources into HeuristicLab.Visualization (#294)
|
File size:
643 bytes
|
Rev | Line | |
---|
[635] | 1 | using System.Drawing;
|
---|
| 2 | using System.Windows.Forms;
|
---|
| 3 |
|
---|
| 4 | namespace HeuristicLab.Visualization {
|
---|
| 5 | public partial class CanvasUI : Control {
|
---|
| 6 | private readonly Canvas mainCanvas = new Canvas();
|
---|
| 7 |
|
---|
| 8 | public CanvasUI() {
|
---|
| 9 | InitializeComponent();
|
---|
| 10 | }
|
---|
| 11 |
|
---|
| 12 | public Canvas MainCanvas {
|
---|
| 13 | get { return mainCanvas; }
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 | protected override void OnPaint(PaintEventArgs pe) {
|
---|
| 17 | Graphics g = pe.Graphics;
|
---|
| 18 |
|
---|
| 19 | g.FillRectangle(Brushes.White, ClientRectangle);
|
---|
| 20 |
|
---|
| 21 | mainCanvas.Draw(g, ClientRectangle);
|
---|
| 22 |
|
---|
| 23 | g.DrawRectangle(Pens.Black, 0, 0, Width - 1, Height - 1);
|
---|
| 24 |
|
---|
| 25 | base.OnPaint(pe);
|
---|
| 26 | }
|
---|
| 27 | }
|
---|
| 28 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.