资源简介
https://github.com/VictorYXL/You-draw-and-I-guess
基于C#的局域网内你画我猜小游戏
包含客户端与服务器
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using AForge;
using AForge.Video;
using AForge.Video.DirectShow;
using AForge.Imaging;
using AForge.Imaging.Filters;
namespace Client
{
public partial class Camera : Form
{
VideoCaptureDevice camera;
Panel mp;
FilterInfoCollection videoDevices;
public Camera(Panel mp)
{
this.mp = mp;
this.Disposed += Camera_Disposed;
InitializeComponent();
this.FormBorderstyle = FormBorderstyle.FixedSingle;
videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice);
for (int i = 0; i < videoDevices.Count; i++)
{
String videoName = videoDevices[i].Name;
if (videoName.Substring(0 5) != “Corel“)
cmb_Camrea.Items.Add(videoName);
else {
videoDevices.RemoveAt(i);
i--;
}
camera = null;
}
}
void Camera_Disposed(object sender EventArgs e)
{
videoPlayer.SignalToStop();
videoPlayer.WaitForStop();
}
private void cmb_Camrea_SelectedIndexChanged(object sender EventArgs e)
{
camera = new VideoCaptureDevice(videoDevices[cmb_Camrea.SelectedIndex].MonikerString);
camera.DesiredframeSize = new Size(540400);
camera.DesiredframeRate = 1;
this.videoPlayer.VideoSource = camera;
this.videoPlayer.Start();
}
private void btn_Cancel_Click(object sender EventArgs e)
{
videoPlayer.SignalToStop();
videoPlayer.WaitForStop();
this.Dispose();
}
private void btn_Grap_Click(object sender EventArgs e)
{
Bitmap img = new Bitmap(740 400);
videoPlayer.DrawToBitmap(imgnew Rectangle(1000videoPlayer.WidthvideoPlayer.Height));
mp.DrawCamera(img);
videoPlayer.SignalToStop();
videoPlayer.WaitForStop();
this.Dispose();
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-03-27 22:01 12 Game1.0\
目录 0 2018-03-27 22:01 12 Game1.0\.git\
文件 34 2017-10-29 01:08 12 Game1.0\.git\COMMIT_EDITMSG
文件 250 2017-10-29 01:08 12 Game1.0\.git\config
文件 73 2017-10-29 01:07 12 Game1.0\.git\desc
文件 23 2017-10-29 01:07 12 Game1.0\.git\HEAD
目录 0 2018-03-27 22:01 12 Game1.0\.git\hooks\
文件 478 2017-10-29 01:07 12 Game1.0\.git\hooks\applypatch-msg.sample
文件 896 2017-10-29 01:07 12 Game1.0\.git\hooks\commit-msg.sample
文件 189 2017-10-29 01:07 12 Game1.0\.git\hooks\post-update.sample
文件 424 2017-10-29 01:07 12 Game1.0\.git\hooks\pre-applypatch.sample
文件 1642 2017-10-29 01:07 12 Game1.0\.git\hooks\pre-commit.sample
文件 1348 2017-10-29 01:07 12 Game1.0\.git\hooks\pre-push.sample
文件 4951 2017-10-29 01:07 12 Game1.0\.git\hooks\pre-reba
文件 544 2017-10-29 01:07 12 Game1.0\.git\hooks\pre-receive.sample
文件 1239 2017-10-29 01:07 12 Game1.0\.git\hooks\prepare-commit-msg.sample
文件 3610 2017-10-29 01:07 12 Game1.0\.git\hooks\update.sample
文件 23081 2017-10-29 01:08 12 Game1.0\.git\index
目录 0 2018-03-27 22:01 12 Game1.0\.git\info\
文件 240 2017-10-29 01:07 12 Game1.0\.git\info\exclude
目录 0 2018-03-27 22:01 12 Game1.0\.git\logs\
文件 179 2017-10-29 01:08 12 Game1.0\.git\logs\HEAD
目录 0 2018-03-27 22:01 12 Game1.0\.git\logs\refs\
目录 0 2018-03-27 22:01 12 Game1.0\.git\logs\refs\heads\
文件 179 2017-10-29 01:08 12 Game1.0\.git\logs\refs\heads\master
目录 0 2018-03-27 22:01 12 Game1.0\.git\logs\refs\remotes\
目录 0 2018-03-27 22:01 12 Game1.0\.git\logs\refs\remotes\origin\
文件 142 2017-10-29 01:09 12 Game1.0\.git\logs\refs\remotes\origin\master
目录 0 2018-03-27 22:01 12 Game1.0\.git\ob
目录 0 2018-03-27 22:01 12 Game1.0\.git\ob
文件 8648 2017-10-29 01:08 12 Game1.0\.git\ob
............此处省略520个文件信息
- 上一篇:WPF 自动更新
- 下一篇:C#基于AE空间分析源码
相关资源
- C#基于AE空间分析源码
- 基于Web的实验室管理系统(C#)
- C#如何访问firebird2.5.8嵌入式小型数据
- C#微信企业付款到银行卡demo真实可用
- C# 7.0 in a Nutshell The Definitive Reference 无
- C# 5.0 in a Nutshell(5th) 无水印pdf
- 在线考试系统C#
- C#界面设计教程
- C#Windows窗口人事管理系统
- C#实现的简单在线考试系统功能齐全
- 校园一卡通管理系统
- 旅游管理系统代码+设计文档
- 考勤系统 C#+SqlServer
- C#调用Godex(科诚)打印机打印1,2维
- c# 固定资产源码,支持sql ,access,完
- c#程序设计(清晰版)
- C#生成与求解数独
- C#图书管理系统三层架构
- 成语接龙C#代码以前写的,暂时放这里
- C#超级通信调试工具源码20130916
- c# 开源搜索引擎完整的
- 用C#编写的个人理财管理系统
- C#学生成绩管理系统260085
- c#图书管理系统C#源码和SQL数据库
- C# NPOI_2.3.0版插件
- html和c#交互小
- 使用WPF+MVVMlight编写的Socket服务器/多客
- SiriusCoder C#代码生成器
- 留言板 留言板 sql c# vs 留言板 sql c#
- C#.net宠物商店管理系统带数据库完整
评论
共有 条评论