private void btnStartStop_Click(object sender, System.EventArgs e) { try { if (btnStartStop.Text == Start) { if (fgm == null) { BuildFilterGraph(); // Changing the bit rate on the fly hasn't been tested yet hsbBitRate.Enabled = false; } fgm.Run(); btnStartStop.Text = Stop; } else { // Pause, don't Stop, otherwise the media clock needs to be reset on the source // filter, and that isn't implemented yet. jasonv 3/29/2005 fgm.Pause(); btnStartStop.Text = Start; } } catch (Exception ex) { RtlAwareMessageBox.Show(this, string.Format(CultureInfo.CurrentCulture, Strings.DataStreamError, ex.ToString()), string.Empty, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1, (MessageBoxOptions)0); } }
private void btnStartStop_Click(object sender, System.EventArgs e) { try { if (btnStartStop.Text == Start) { if (fgm == null) { BuildFilterGraph(); // Changing the bit rate on the fly hasn't been tested yet hsbBitRate.Enabled = false; } fgm.Run(); btnStartStop.Text = Stop; } else { // Pause, don't Stop, otherwise the media clock needs to be reset on the source // filter, and that isn't implemented yet. jasonv 3/29/2005 fgm.Pause(); btnStartStop.Text = Start; } } catch (Exception ex) { MessageBox.Show(this, "Error starting or stopping the data stream. \r\n" + ex.ToString()); } }
private void btnPause_Click(object sender, System.EventArgs e) { fgm.Pause(); btnPlay.Enabled = true; btnPause.Enabled = false; // stop remains enabled }