blob: 58eb657baefb796be5dd99a0bf7aaf40d17bdc1a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
using System;
using Cairo;
using Gtk;
using GdiTest;
public partial class MainWindow : Gtk.Window
{
DrawingArea testDrawingArea;
DrawingArea lineToDrawingArea;
DrawingArea bitBltDrawingArea;
public MainWindow () : base(Gtk.WindowType.Toplevel)
{
Build ();
lineToDrawingArea = new LineToDrawingArea ();
bitBltDrawingArea = new BitBltDrawingArea ();
testDrawingArea = lineToDrawingArea;
testFrame.Add(testDrawingArea);
testFrame.ShowAll();
}
protected void OnDeleteEvent (object sender, DeleteEventArgs a)
{
Application.Quit ();
a.RetVal = true;
}
protected virtual void OnTestComboBoxChanged (object sender, System.EventArgs e)
{
if (testDrawingArea != null)
{
testFrame.Remove(testDrawingArea);
testDrawingArea = null;
}
String testSuiteName = testComboBox.ActiveText;
if (testSuiteName.Equals("LineTo"))
{
testDrawingArea = lineToDrawingArea;
testFrame.Add(testDrawingArea);
testFrame.ShowAll();
}
else if (testSuiteName.Equals("BitBlt"))
{
testDrawingArea = bitBltDrawingArea;
testFrame.Add(testDrawingArea);
testFrame.ShowAll();
}
}
}
|