• 大小: 1.29M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-26
  • 语言: C#
  • 标签: 摄像头  拍照  摄像  打开  

资源简介

可以搜素本机摄像头,并呈现图像,实现拍照功能

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using AForge.Video.DirectShow;

namespace WindowsFormsApp27
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private FilterInfoCollection videodevices;
        private VideoCaptureDevice Source;
        private int indexf = 0;

        private void Form1_Load(object sender EventArgs e)
        {

        }
        private void Camlist()
        {
            videodevices = new FilterInfoCollection(FilterCategory.VideoInputDevice);

            if (videodevices.Count == 0)
            {
             

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-10-31 11:37  WindowsFormsApp27\
     目录           0  2018-10-31 11:37  WindowsFormsApp27\.vs\
     目录           0  2018-10-31 11:37  WindowsFormsApp27\.vs\WindowsFormsApp27\
     目录           0  2018-10-31 11:37  WindowsFormsApp27\.vs\WindowsFormsApp27\v15\
     文件       61952  2019-04-17 09:32  WindowsFormsApp27\.vs\WindowsFormsApp27\v15\.suo
     目录           0  2018-10-31 11:37  WindowsFormsApp27\.vs\WindowsFormsApp27\v15\Server\
     目录           0  2018-10-31 11:37  WindowsFormsApp27\.vs\WindowsFormsApp27\v15\Server\sqlite3\
     文件           0  2018-10-31 10:56  WindowsFormsApp27\.vs\WindowsFormsApp27\v15\Server\sqlite3\db.lock
     文件      729088  2019-04-17 09:29  WindowsFormsApp27\.vs\WindowsFormsApp27\v15\Server\sqlite3\storage.ide
     文件       32768  2019-04-17 09:28  WindowsFormsApp27\.vs\WindowsFormsApp27\v15\Server\sqlite3\storage.ide-shm
     文件     4132392  2019-04-17 09:32  WindowsFormsApp27\.vs\WindowsFormsApp27\v15\Server\sqlite3\storage.ide-wal
     目录           0  2019-04-17 09:30  WindowsFormsApp27\WindowsFormsApp27\
     文件        5838  2018-10-31 11:27  WindowsFormsApp27\WindowsFormsApp27\Form1.Designer.cs
     文件        2671  2019-04-17 09:30  WindowsFormsApp27\WindowsFormsApp27\Form1.cs
     文件        5817  2018-10-31 11:27  WindowsFormsApp27\WindowsFormsApp27\Form1.resx
     文件         498  2018-10-31 10:56  WindowsFormsApp27\WindowsFormsApp27\Program.cs
     目录           0  2018-10-31 11:37  WindowsFormsApp27\WindowsFormsApp27\Properties\
     文件        1332  2018-10-31 10:56  WindowsFormsApp27\WindowsFormsApp27\Properties\AssemblyInfo.cs
     文件        2847  2018-10-31 10:56  WindowsFormsApp27\WindowsFormsApp27\Properties\Resources.Designer.cs
     文件        5612  2018-10-31 10:56  WindowsFormsApp27\WindowsFormsApp27\Properties\Resources.resx
     文件        1104  2018-10-31 10:56  WindowsFormsApp27\WindowsFormsApp27\Properties\Settings.Designer.cs
     文件         249  2018-10-31 10:56  WindowsFormsApp27\WindowsFormsApp27\Properties\Settings.settings
     文件        7252  2018-10-31 11:18  WindowsFormsApp27\WindowsFormsApp27\WindowsFormsApp27.csproj
     目录           0  2018-10-31 11:37  WindowsFormsApp27\WindowsFormsApp27\bin\
     目录           0  2018-10-31 11:37  WindowsFormsApp27\WindowsFormsApp27\bin\Debug\
     文件       44544  2013-07-15 23:04  WindowsFormsApp27\WindowsFormsApp27\bin\Debug\AForge.Controls.dll
     文件       66108  2013-07-15 23:04  WindowsFormsApp27\WindowsFormsApp27\bin\Debug\AForge.Controls.xml
     文件       20480  2013-07-15 23:07  WindowsFormsApp27\WindowsFormsApp27\bin\Debug\AForge.DebuggerVisualizers (2010).dll
     文件       15872  2013-07-15 23:04  WindowsFormsApp27\WindowsFormsApp27\bin\Debug\AForge.Fuzzy.dll
     文件       80837  2013-07-15 23:04  WindowsFormsApp27\WindowsFormsApp27\bin\Debug\AForge.Fuzzy.xml
     文件       25600  2013-07-15 23:04  WindowsFormsApp27\WindowsFormsApp27\bin\Debug\AForge.Genetic.dll
............此处省略53个文件信息

评论

共有 条评论