public PreferencesWindowController(MacPlatform platform, BowlPlayer player)
     : base("PreferencesWindow")
 {
     Platform = platform;
     BowlPlayer = player;
     Initialize ();
 }
Example #2
0
        public static MacPlatform Initialize(MacPlatform platform)
        {
            if (IsInitialized)
                throw new InvalidOperationException ("Runtime cannot be Initialized twice.");

            // Initialize Native library
            dlopen (platform.ResourceNamed ("Native.dylib"), 0x1);

            IsInitialized = true;

            return platform;
        }
Example #3
0
        public override void AwakeFromNib()
        {
            Platform = Runtime.Initialize (new MacPlatform ());
            // Do this before we start listening for notifications.
            Platform.Preferences.StartAtLogin = AppStartAtLogin;
            Platform.Preferences.Changed += PreferencesChanged;

            Controller = new AwarenessController (Platform);
            Controller.FirstRun += FirstRun;
            Controller.BowlPlayer.WillPlay += BowlPlayerWillPlay;
            Controller.BowlPlayer.StartedPlaying += BowlPlayerStartedPlaying;
            Controller.BreakTimer.BreakChecked += HandleBreakChecked;

            iTunes = new iTunes (Platform);

            if (Platform.MacPreferences.ShowInMenuBar)
                CreateAndDisplayStatusItem ();

            base.AwakeFromNib ();
        }
 public AboutWindowController(MacPlatform platform)
     : base("AboutWindow")
 {
     Platform = platform;
     Initialize ();
 }