public IDisposable ConnectView(IVideoView view) { var videoView = view as RxVideoView; videoView.SetPlayer(ThePlayer); return(new PlayerViewConnection() { Player = ThePlayer, View = view }); }
public void PauseAll(bool on) { foreach (Control t in this.CameraPanel.Controls) { IVideoView v = t as IVideoView; if (v != null) { v.Pause(on); } } }
private void cameraBoardMain_CameraBoardAddNew(object sender, CameraBoardAddNewEventArgs e) { IVideoView v = e.VideoView; if (v is CameraView) { CameraView n = (CameraView)v; n.EventStatusChanged += new CameraViewStatusChangedEventHandler(this.CameraView_CameraViewStatusChanged); n.EventAlarmCountChanged += new CameraViewAlarmCountChangedEventHandler(this.CameraView_CameraViewAlarmCountChanged); n.EventLog += new CameraViewLogEventHandler(this.CameraView_CameraViewLog); } }
public IVideoView Find(CameraClass c) { foreach (Control t in this.CameraPanel.Controls) { IVideoView v = t as IVideoView; if (v != null && v.CameraClass.ID == c.ID) { return(v); } } return(null); }
private List <IVideoBase> GetPlaybackListView() { List <IVideoBase> list = new List <IVideoBase>(); int count = _playbackPresenters.Count; for (int i = 0; i < count; i++) { IVideoView view = _playbackPresenters[i].GetView(); //view.ClearPanel(); list.Add(view); } return(list); }
public VideoPresenter(IVideoView view, Action backHandler) { ComposContainer.Instance().Compose(this); if (view != null) { _view = view; _backHandler = backHandler; _view.Back += Back; _view.CreatePrintScreen += CreateScreen; BindMoveCommandHandler(); _printScreenModel.SendMessage += ErrorMessage; _printScreenModel.Created += PrintScreenCreated; _printScreenModel.Progress += Progress; } }
public IDisposable ConnectView(IVideoView view) { if (view is RxVideoView) { TheExoPlayer.SetVideoTextureView((RxVideoView)view); } else { (view as RxFullPlayerView)?.SetPlayer(TheExoPlayer); } return(new PlayerViewConnection() { Player = TheExoPlayer, View = view }); }
public bool Remove(IFileClass c) { foreach (Control t in this.CameraPanel.Controls) { IFileView v = t as IFileView; if (v != null && v.FileClass.ID.Equals(c.ID)) { if (t is IVideoView) { IVideoView x = t as IVideoView; x.Stop(); } this.CameraPanel.Controls.Remove(t); this.ShortcutRemove(t as IView); break; } } return(true); }
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; }
public override void OnApplyTemplate() { base.ApplyTemplate(); if (IsDesignMode) { return; } FlyleafWF = (FlyleafWF)Template.FindName(PART_PlayerView, this); //Player = flyleafWF.Player; windowsFormsHost = (WindowsFormsHost)Template.FindName(PART_PlayerHost, this); WindowFront = new FlyleafWindow(windowsFormsHost); var curContent = Content; IsUpdatingContent = true; try { Content = null; } finally { IsUpdatingContent = false; } // TBR: Parsing the Player and VideoView to Control/ViewModel //if (curContent != null && curContent is IVideoView) ((IVideoView)curContent).FlyleafView = this; WindowFront.SetContent((UIElement)curContent); WindowFront.DataContext = DataContext; if (curContent != null && curContent is IVideoView) { ControlRequiresPlayer = ((IVideoView)curContent); } if (Player != null && Player.VideoView == null) { Player.VideoView = this; Player.Control = FlyleafWF; Console.WriteLine("OnApplyTemplate() Sets Control to Player"); if (ControlRequiresPlayer != null) { ControlRequiresPlayer.Player = Player; } } }
public bool Remove(CameraClass c) { foreach (Control t in this.CameraPanel.Controls) { IView v = t as IView; if (v != null) { if (false == v.Owner.ID.Equals(c.ID)) { continue; } if (v is IVideoView) { IVideoView x = (IVideoView)v; x.Stop(); } this.CameraPanel.Controls.Remove(v.Me); this.ShortcutRemove(v); break; } } return(true); }
public CameraBoardAddNewEventArgs(IVideoView v) { this.v = v; }
public CameraBoardAddNewEventArgs(IVideoView v) { this.v = v; }