private void LoadPageSetting()
        {
            IVideoSourceDescription videoDesc = ListVideoProvider[_DeviceInfo.ProviderName];

            sourcePage = videoDesc.GetSettingsPage();
            sourcePage.SetConfiguration((object)_DeviceInfo);
            List <CameraInfo> listCam = new List <CameraInfo>();

            if (_DeviceInfo.ListCamera != null)
            {
                foreach (KeyValuePair <int, CameraInfo> item in _DeviceInfo.ListCamera)
                {
                    listCam.Add(item.Value);
                }
            }
            sourcePage.DeviceName = _DeviceInfo.Name;
            sourcePage.ListCam    = listCam;
            Control control = (Control)sourcePage;

            this.Width         = control.Width;
            this.Height        = control.Height + pnBottom.Height + 30;
            pbBtContainer.Left = (this.Width - pbBtContainer.Width) / 2;

            control.Dock = DockStyle.Fill;
            pnTop.Controls.Add(control);
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Left          = (Screen.PrimaryScreen.WorkingArea.Width - this.Width) / 2;
        }
        private void LoadPageSetting()
        {
            IVideoSourceDescription videoDesc = ListVideoProvider[_DeviceInfo.ProviderName];
            sourcePage = videoDesc.GetSettingsPage();
            sourcePage.SetConfiguration((object)_DeviceInfo);
            List<CameraInfo> listCam = new List<CameraInfo>();
            if (_DeviceInfo.ListCamera != null)
            {
                foreach (KeyValuePair<int,CameraInfo> item in _DeviceInfo.ListCamera)
                {
                    listCam.Add(item.Value);
                }
            }
            sourcePage.DeviceName = _DeviceInfo.Name;
            sourcePage.ListCam = listCam;
            Control control = (Control)sourcePage;
            this.Width = control.Width;
            this.Height = control.Height + pnBottom.Height + 30;
            pbBtContainer.Left = (this.Width - pbBtContainer.Width) / 2;

            control.Dock = DockStyle.Fill;
            pnTop.Controls.Add(control);
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Left = (Screen.PrimaryScreen.WorkingArea.Width - this.Width) / 2;
        }
Beispiel #3
0
        private void LoadPageSetting()
        {
            if (sourcePage != null)
            {
                Controls.Remove((Control)sourcePage);
            }
            deviceDescription1.Visible = false;
            IVideoSourceDescription videoDesc = deviceDescription1.VideoDesc;

            sourcePage = videoDesc.GetSettingsPage();


            sourcePage.DeviceName = deviceDescription1.DeviceEntity.Name;
            Control control = (Control)sourcePage;

            this.Width         = control.Width;
            this.Height        = control.Height + pnBottom.Height + 30;
            pbBtContainer.Left = (this.Width - pbBtContainer.Width) / 2;

            control.Dock = DockStyle.Fill;
            pnTop.Controls.Add(control);
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Left          = (Screen.PrimaryScreen.WorkingArea.Width - this.Width) / 2;
        }
Beispiel #4
0
        private void LoadPageSetting()
        {
            if (sourcePage != null)
            {
                Controls.Remove((Control)sourcePage);
            }
            deviceDescription1.Visible = false;
            IVideoSourceDescription videoDesc = deviceDescription1.VideoDesc;
            sourcePage = videoDesc.GetSettingsPage();

            sourcePage.DeviceName = deviceDescription1.DeviceEntity.Name;
            Control control = (Control)sourcePage;
            this.Width = control.Width;
            this.Height = control.Height + pnBottom.Height + 30;
            pbBtContainer.Left = (this.Width - pbBtContainer.Width) / 2;

            control.Dock = DockStyle.Fill;
            pnTop.Controls.Add(control);
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Left = (Screen.PrimaryScreen.WorkingArea.Width - this.Width) / 2;
        }