private void StopMedia() { if (media == null) { return; } media.Stop(); media = null; startButton.Enabled = true; stopButton.Enabled = false; started = false; }
private void StartMedia() { try { StopMedia(); startButton.Enabled = false; media = new MediaInstance(settings); media.Start(); startButton.Enabled = false; stopButton.Enabled = true; started = true; } catch (Exception e) { startButton.Enabled = true; UIHelper.Error(e); } }