void TempUpPlayer_OnStartPlay(StreamPlayer obj) { lock (LockObject) { if (VolumeDownPlayer == null) { if (VolumeUpPlayer != null) { VolumeDownPlayer = VolumeUpPlayer; VolumeDownPlayer.VolumeDown(); } } else { if (VolumeUpPlayer != null) { VolumeUpPlayer.Stop(); //VolumeUpPlayer.Dispose(); VolumeUpPlayer = null; } } VolumeUpPlayer = obj; VolumeUpPlayer.VolumeUp(); TempUpPlayer = null; } if (OnStart != null) { OnStart(); } }
private void _filePlayer_OnStartPlay(StreamPlayer obj) { lock ( _lockObject ) { StopRadio(); obj.VolumeUp(); } }
private void _temp_OnStartPlay(StreamPlayer obj) { if (_oldPlayer != null) { _oldPlayer.VolumeDownAndStop(); _oldPlayer = null; } obj.VolumeUp(); }