public void Open(IPlayerUserControl _owner, string _file, bool _autoPlay = true) { if (_ExclusiveLock) { return; } Close(); _ExclusiveOwner = _owner; _ExclusiveFile = _file; _ExclusiveAudioPlayer.Open(_file); if (_ExclusiveOwner != null) { _ExclusiveOwner.OnOpen(); } if (_autoPlay && _ExclusiveAudioPlayer.bFileIsOpen) { _ExclusiveAudioPlayer.Play(); if (_ExclusiveOwner != null) { _ExclusiveOwner.OnPlay(); } } }
public void Play() { if (_ExclusiveAudioPlayer.bFileIsOpen) { if (_ExclusiveAudioPlayer.Pause) { _ExclusiveAudioPlayer.Pause = false; if (_ExclusiveOwner != null) { _ExclusiveOwner.OnPlay(); } } else { _ExclusiveAudioPlayer.Play(); if (_ExclusiveOwner != null) { _ExclusiveOwner.OnPause(); } } //_ExclusiveAudioPlayer.Pause = false; } }