protected virtual void OnCameraBoardAddNewEvent(CameraBoardAddNewEventArgs e) { if (this.CameraBoardAddNew != null) { CameraBoardAddNew(this, e); } }
public IVideoView Add(CameraClass c) { IVideoView v; if (c == null) { return(null); } v = this.Find(c); if (v == null) { if (this.AtTheEdge() == true) { return(null); } CameraView x = new CameraView(); x.CameraClass = c; this.CameraPanel.Controls.Add(x); x.ViewRatio = this.ViewRatio; x.VisibleChanged += new EventHandler(this.IView_VisibleChanged); CameraBoardAddNewEventArgs e = new CameraBoardAddNewEventArgs(x); this.OnCameraBoardAddNewEvent(e); e = null; v = x; this.ShortcutAdd(v); } else { v.ViewRatio = this.ViewRatio; v.Me.Visible = true; } this.ScrollToView(v.CameraClass.ID); return(v); }
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); }
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 Add(CameraClass c) { IVideoView v; if (c == null) { return null; } v = this.Find(c); if (v == null) { if (this.AtTheEdge() == true) { return null; } CameraView x = new CameraView(); x.CameraClass = c; this.CameraPanel.Controls.Add(x); x.ViewRatio = this.ViewRatio; x.VisibleChanged += new EventHandler(this.IView_VisibleChanged); CameraBoardAddNewEventArgs e = new CameraBoardAddNewEventArgs(x); this.OnCameraBoardAddNewEvent(e); e = null; v = x; this.ShortcutAdd(v); } else { v.ViewRatio = this.ViewRatio; v.Me.Visible = true; } this.ScrollToView(v.CameraClass.ID); return v; }
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; }