diff options
Diffstat (limited to 'examples/activeqt/dotnet/wrapper/main.cs')
-rw-r--r-- | examples/activeqt/dotnet/wrapper/main.cs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/examples/activeqt/dotnet/wrapper/main.cs b/examples/activeqt/dotnet/wrapper/main.cs new file mode 100644 index 0000000..1d43029 --- /dev/null +++ b/examples/activeqt/dotnet/wrapper/main.cs @@ -0,0 +1,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] |