]> git.r.bdr.sh - rbdr/super-polarity/blob - SuperPolarityMac/Program.cs
e6ab5cfcff83cbcb2c0c837749b0a4bbd918c271
[rbdr/super-polarity] / SuperPolarityMac / Program.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using MonoMac.AppKit;
5 using MonoMac.Foundation;
6
7 namespace SuperPolarity
8 {
9 static class Program
10 {
11 /// <summary>
12 /// The main entry point for the application.
13 /// </summary>
14 static void Main (string[] args)
15 {
16 NSApplication.Init ();
17
18 using (var p = new NSAutoreleasePool ()) {
19 NSApplication.SharedApplication.Delegate = new AppDelegate ();
20 NSApplication.Main (args);
21 }
22
23
24 }
25 }
26
27 class AppDelegate : NSApplicationDelegate
28 {
29 SuperPolarity superPolarity;
30
31 public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
32 {
33 superPolarity = new SuperPolarity();
34 superPolarity.Run ();
35 }
36
37 public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)
38 {
39 return true;
40 }
41 }
42 }
43
44