コード例 #1
0
 private void PlayPause()
 {
     PlayerHost.IsPlaying = !PlayerHost.IsPlaying;
     if (PlayerHost.IsPlaying)
     {
         PlayCommandExecuted?.Invoke(this, new EventArgs());
     }
     else
     {
         PauseCommandExecuted?.Invoke(this, new EventArgs());
     }
 }
コード例 #2
0
    private void PlayPause()
    {
        if (PlayerHost == null)
        {
            return;
        }

        PlayerHost.IsPlaying = !PlayerHost.IsPlaying;
        if (PlayerHost.IsPlaying)
        {
            PlayCommandExecuted?.Invoke(this, EventArgs.Empty);
        }
        else
        {
            PauseCommandExecuted?.Invoke(this, EventArgs.Empty);
        }
    }