Exemplo n.º 1
0
        void BowlPlayerStartedPlaying(object sender, BowlPlayerEventArgs e)
        {
            if (Controller.BowlPlayer.IsPlaying)
            {
                return;
            }

            NSApplication.SharedApplication.RequestUserAttention(NSRequestUserAttentionType.InformationalRequest);
        }
Exemplo n.º 2
0
        void BowlPlayerWillPlay(object sender, BowlPlayerEventArgs e)
        {
            if (Controller.BowlPlayer.IsPlaying)
            {
                return;
            }

            var duration = BowlPlayer.TimeBetweenBowls.Seconds * (e.TimesPlayed - 1) + BowlSound.SoundDuration.Seconds;

            iTunes.GoQuiet(duration.Seconds());

            // We sleep for a moment to let iTunes go quiet.
            Platform.ThreadSleep(1.Second ());
        }