public PreferencesWindowController(MacPlatform platform, BowlPlayer player)
     : base("PreferencesWindow")
 {
     Platform = platform;
     BowlPlayer = player;
     Initialize ();
 }
예제 #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;
        }
예제 #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 ();
        }
예제 #4
0
 public AboutWindowController(MacPlatform platform)
     : base("AboutWindow")
 {
     Platform = platform;
     Initialize ();
 }