public override void Play(bool isAsync) { lock (_StatusLock) { if (this._Status != VideoStatus.Playing) { if (VideoSource != null) { if (!this.TitlePanel.InvokeRequired) { this.Caption = VideoSource.VideoName; this.TitlePanel.Visible = ShowTitle; } if (StretchToFit) { this.video.SizeMode = PictureBoxSizeMode.StretchImage; } else { this.video.SizeMode = PictureBoxSizeMode.Zoom; } FrmXinlutongContainer.GetInstance().RequestVideo(VideoSource.MediaSource, axHV_OnReceiveVideo); this._Status = VideoStatus.Playing; } } } }
public override void Close() { lock (_StatusLock) { if (VideoSource != null) { FrmXinlutongContainer.GetInstance().CancelVideo(VideoSource.MediaSource, axHV_OnReceiveVideo); } this._Status = VideoStatus.Disconnected; } if (!this.TitlePanel.InvokeRequired) { this.TitlePanel.Visible = false; this.video.Image = null; } }