コード例 #1
0
ファイル: frmCamera.cs プロジェクト: NaturalWill/DMS
 private void button1_Click(object sender, EventArgs e)
 {
     using (frmSetting fs = new frmSetting())
     {
         fs.ShowDialog();
     }
 }
コード例 #2
0
ファイル: frmCamera.cs プロジェクト: NaturalWill/DMS
        private void frmCamera_Load(object sender, EventArgs e)
        {
            while (cConfig.CameraIndex < 0 || cConfig.resolutionIndex < 0)
            {
                if (frmSetting.isClose)
                {
                    break;
                }
                using (frmSetting fs = new frmSetting())
                {
                    fs.ShowDialog();
                }
            }

            if (frmSetting.isClose)
            {
                this.Close(); return;
            }

            ls2.Clear();
            _DeviceCapabilityInfo = null;
            _DeviceInfo           = ls1[cConfig.CameraIndex];
            foreach (DeviceCapabilityInfo info in camera.GetDeviceCapability(_DeviceInfo))
            {
                ls2.Add(info);
            }

            _DeviceCapabilityInfo = ls2[cConfig.resolutionIndex];

            if (_DeviceInfo != null && _DeviceCapabilityInfo != null)
            {
                if (camera.StartVideo(_DeviceInfo, _DeviceCapabilityInfo))
                {
                    btnphotograph.Enabled = true;
                }
            }
            toolStripStatusLabel1.Text = "工作中......";
            pictureBox2.Visible        = false;
        }
コード例 #3
0
ファイル: frmCamera.cs プロジェクト: NaturalWill/DMS
        private void frmCamera_Load(object sender, EventArgs e)
        {
            while (cConfig.CameraIndex < 0 || cConfig.resolutionIndex < 0)
            {
                if (frmSetting.isClose)
                { break; }
                using (frmSetting fs = new frmSetting())
                {
                    fs.ShowDialog();
                }

            }

            if (frmSetting.isClose)
            { this.Close(); return; }

            ls2.Clear();
            _DeviceCapabilityInfo = null;
            _DeviceInfo = ls1[cConfig.CameraIndex];
            foreach (DeviceCapabilityInfo info in camera.GetDeviceCapability(_DeviceInfo))
            {
                ls2.Add(info);
            }

            _DeviceCapabilityInfo = ls2[cConfig.resolutionIndex];

            if (_DeviceInfo != null && _DeviceCapabilityInfo != null)
            {
                if (camera.StartVideo(_DeviceInfo, _DeviceCapabilityInfo))
                {
                    btnphotograph.Enabled = true;
                }
            }
            toolStripStatusLabel1.Text = "工作中......";
            pictureBox2.Visible = false;
        }
コード例 #4
0
ファイル: frmCamera.cs プロジェクト: NaturalWill/DMS
 private void button1_Click(object sender, EventArgs e)
 {
     using (frmSetting fs = new frmSetting())
     {
         fs.ShowDialog();
     }
 }