Exemplo n.º 1
0
 protected virtual void OnCameraBoardAddNewEvent(CameraBoardAddNewEventArgs e)
 {
     if (this.CameraBoardAddNew != null)
     {
         CameraBoardAddNew(this, e);
     }
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 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);
     }
 }
Exemplo n.º 5
0
 protected virtual void OnCameraBoardAddNewEvent(CameraBoardAddNewEventArgs e)
 {
     if (this.CameraBoardAddNew != null)
     {
         CameraBoardAddNew(this, e);
     }
 }
Exemplo n.º 6
0
        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;
        }
Exemplo n.º 7
0
        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;
        }