Inheritance: System.Windows.Forms.UserControl, IVideoView, IFileView, IGlobalization
Exemple #1
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);
        }
Exemple #2
0
 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);
 }
Exemple #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;
        }