private void label1_Click(object sender, EventArgs e)
        {
            foreach (Control ctl in CaneraChangeList.GetPanel3.Controls)
            {
                if (ctl.GetType() == typeof(CameraChangeControl))
                {
                    CameraChangeControl ccc = (CameraChangeControl)ctl;
                    ccc.label1.ForeColor = Color.White;
                }
            }
            this.label1.ForeColor = Color.Yellow;
            string[] camera = new string[3];
            DbControl.SwitchCameraDB(this.TabIndex);
            camera = DbControl.SelectCameraById(this.TabIndex);
            string ip   = camera[0];
            string user = camera[1];
            string pwd  = camera[2];

            if (CameraPlay.Stop())
            {
                if (CameraPlay.Login(ip, user, pwd))
                {
                    CameraPlay.Play();
                }
            }
        }
Пример #2
0
        private void frmShow_Load(object sender, EventArgs e)
        {
            pnlRightBody.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31)))));
            // pnlRightTelescopic.BackColor = Color.Transparent;
            // pnlRightTelescopic.Parent = pbVideoShow;
            classListItemControl1.funClick = classListItemControl2.funClick = classListItemControl3.funClick = classListItemControl1.funClick = classListItemControl4.funClick = new ClassListItemControl.dlgtItemClick(classChanged);
            label1.BackColor       = Color.Transparent;
            pnlClassList.BackColor = Color.Transparent;
            //pnlToolbar.BackColor = Color.Transparent;
            // pnlToolbar.Parent = pbVideoShow;

            SetBtnStyle(btnTelescopic);
            SetBtnStyle(btnSetting);
            SetBtnStyle(btnLive);

            //settingListControl1.Parent = pbVideoShow;

            btnLive.Enabled = false;

            //预览视频
            CameraPlay.Init(this.pbVideoShow);
            string[] camera = new string[4];
            camera = DbControl.GetUseCameraDB();
            if (camera != null)
            {
                int    id   = int.Parse(camera[0]);
                string ip   = camera[1];
                string user = camera[2];
                string pwd  = camera[3];
                foreach (Control ctl in CaneraChangeList.GetPanel3.Controls)
                {
                    if (ctl.GetType() == typeof(CameraChangeControl))
                    {
                        CameraChangeControl ccc = (CameraChangeControl)ctl;
                        if (ccc.TabIndex == id)
                        {
                            ccc.GetLabel.ForeColor = Color.Yellow;
                            break;
                        }
                    }
                }
                if (CameraPlay.Login(ip, user, pwd))
                {
                    CameraPlay.Play();
                }
            }
        }