Beispiel #1
0
        private void TimerTick(object sender, EventArgs e)
        {
            if (!autoPlay)
            {
                return;
            }

            int playing = AudioPlayingChecker.NumberApplicationsPlaying();

            //Start playing if it's not playing and nothing else is playing
            //Pause if something else is playing and it is playing
            if (!isPlaying)
            {
                if (playing == 0)
                {
                    this.play();
                }
            }
            else
            {
                if (playing > 1)
                {
                    this.pause();
                }
            }
        }
Beispiel #2
0
 public MainWindow()
 {
     InitializeComponent();
     checker = new AudioPlayingChecker();
 }