Esempio n. 1
0
        private void StopMedia()
        {
            if (media == null)
            {
                return;
            }

            media.Stop();
            media = null;

            startButton.Enabled = true;
            stopButton.Enabled = false;

            started = false;
        }
Esempio n. 2
0
        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);
            }
        }