Welcome to mirror list, hosted at ThFree Co, Russian Federation.

MainWindow.cs « GdiTest - github.com/FreeRDP/GdiTest.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e422090bd13551b3b7550e8c6512f6b997a4f238 (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
54
55
56
57
58
59
60
using System;
using Cairo;
using Gtk;

using GdiTest;

public partial class MainWindow : Gtk.Window
{
	TestDrawingArea testDrawingArea;
	TestDrawingArea lineToDrawingArea;
	TestDrawingArea 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();
		}
	}
	protected virtual void OnDumpButtonClicked (object sender, System.EventArgs e)
	{
		String dumpText = testDrawingArea.getDumpText();
		dumpTextView.Buffer.Text = dumpText;
	}
	
	
}