Inheritance: System.Windows.Forms.UserControl, IVideoView, IFileView, IGlobalization
コード例 #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);
        }
コード例 #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);
 }
コード例 #3
0
ファイル: CameraBoard.cs プロジェクト: zhuangyy/Motion
        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;
        }