summaryrefslogtreecommitdiffstats
path: root/examples/activeqt/dotnet/wrapper/main.cs
blob: 1d430298c0273dcdfe647a35def2c6ceed6255ce (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
//! [0]
using System;

namespace WrapperApp
{
	class App
	{
		void Run()
		{
			netWorker worker = new netWorker();

			worker.statusStringChanged += new netWorker.__Delegate_statusStringChanged(onStatusStringChanged);

			System.Console.Out.WriteLine(worker.StatusString);

			System.Console.Out.WriteLine("Working cycle begins...");
			worker.StatusString = "Working";
			worker.StatusString = "Lunch Break";
			worker.StatusString = "Working";
			worker.StatusString = "Idle";
			System.Console.Out.WriteLine("Working cycle ends...");
		}

		private void onStatusStringChanged(string str)
		{
			System.Console.Out.WriteLine(str);
		}

		[STAThread]
//! [0] //! [1]
		static void Main(string[] args)
		{
			App app = new App();
			app.Run();
		}
//! [1] //! [2]
	}
//! [2] //! [3]
}
//! [3]