public IVideoView Add(AVIClass c) { IVideoView v; if (c == null) { return(null); } v = this.Find(c.Camera); if (v == null) { AVIView x = new AVIView(); x.AVIClass = c; x.VisibleChanged += new EventHandler(this.IView_VisibleChanged); this.CameraPanel.Controls.Add(x); x.ViewRatio = this.ViewRatio; CameraBoardAddNewEventArgs e = new CameraBoardAddNewEventArgs(x); this.OnCameraBoardAddNewEvent(e); e = null; v = x; this.ShortcutAdd(v); } else { v.ViewRatio = this.ViewRatio; v.Me.Visible = true; } return(v); }
public bool Remove(AVIClass c) { foreach (Control t in this.CameraPanel.Controls) { AVIView v = t as AVIView; if (v != null && v.AVIClass.FileName.Equals(c.FileName)) { v.Stop(); this.CameraPanel.Controls.Remove(v.Me); this.ShortcutRemove(v); break; } } return(true); }
public IVideoView Add(AVIClass c) { IVideoView v; if (c == null) { return null; } v = this.Find(c.Camera); if (v == null) { AVIView x = new AVIView(); x.AVIClass = c; x.VisibleChanged += new EventHandler(this.IView_VisibleChanged); this.CameraPanel.Controls.Add(x); x.ViewRatio = this.ViewRatio; CameraBoardAddNewEventArgs e = new CameraBoardAddNewEventArgs(x); this.OnCameraBoardAddNewEvent(e); e = null; v = x; this.ShortcutAdd(v); } else { v.ViewRatio = this.ViewRatio; v.Me.Visible = true; } return v; }