public void StopAll() { this.Cursor = Cursors.WaitCursor; foreach (Control t in this.CameraPanel.Controls) { IVideoView v = t as IVideoView; if ((v != null) && (v.IsRunning() == true)) { try { v.Stop(); } catch (ApplicationException ex) { MessageBox.Show("[" + v.CameraClass.Name + "]: " + ex.Message); } } } this.Cursor = Cursors.Default; }
public void StartAll() { this.Cursor = Cursors.WaitCursor; foreach (Control t in this.CameraPanel.Controls) { IVideoView v = t as IVideoView; if (v != null && (v.IsRunning() == false) && v.Me.Visible) { try { v.Start(); } catch (ApplicationException ax) { MessageBox.Show("[" + v.CameraClass.Name + "]: " + ax.Message); } } } this.Cursor = Cursors.Default; }