应用介绍
此项目是R303T 指纹识别模块。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace test
{
public partial class Form1 : Form
{
SynoAPIExHelper fh = new SynoAPIExHelper();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
button1.PerformClick();
}
private void button1_Click(object sender, EventArgs e)
{
var v = fh.OpenDevice();
label1.Text = v.ToString();
if (v == ReturnValue.PS_OK)
{
foreach (var item in this.Controls)
{
if (item.GetType() == typeof(Button))
{
(item as Button).Enabled = true;
}
}
button1.Enabled = false;
button6.PerformClick();
}
}
private void button2_Click(object sender, EventArgs e)
{
label1.Text = fh.CloseDevice().ToString();
foreach (var item in this.Controls)
{
if (item.GetType() == typeof(Button))
{
(item as Button).Enabled = false;
}
}
button1.Enabled = true;
}
private void button3_Click(object sender, EventArgs e)
{
string path = "finger.bmp";
if (pictureBox1.BackgroundImage != null)
pictureBox1.BackgroundImage.Dispose();
pictureBox1.BackgroundImage = null;
File.Delete(path);
label1.Text = fh.SaveFigerBmp(path).ToString();
if (File.Exists(path))
{
Bitmap b = new Bitmap(path);
pictureBox1.BackgroundImage = b;
pictureBox1.BackgroundImageLayout = ImageLayout.Stretch;
}
else
{
pictureBox1.BackgroundImage = null;
}
}
private void button4_Click(object sender, EventArgs e)
{
int n = 0;
label1.Text = fh.AddFinger(out n).ToString();
label2.Text = n.ToString();
button6.PerformClick();
}
private void button5_Click(object sender, EventArgs e)
{
int n = 0;
label1.Text = fh.FindFinger(out n).ToString();
label2.Text = n.ToString();
}
private void button6_Click(object sender, EventArgs e)
{
listBox1.Items.Clear();
List<int> ll = new List<int>();
label1.Text = fh.GetAllFinger(out ll).ToString();
foreach (var item in ll)
{
listBox1.Items.Add(item);
}
}
private void button7_Click(object sender, EventArgs e)
{
label1.Text = fh.ClearAllFinger().ToString();
button6.PerformClick();
}
}
}
想了解详情请下载附件。
©版权声明:本文内容由互联网用户自发贡献,版权归原创作者所有,本站不拥有所有权,也不承担相关法律责任。如果您发现本站中有涉嫌抄袭的内容,欢迎发送邮件至: www_apollocode_net@163.com 进行举报,并提供相关证据,一经查实,本站将立刻删除涉嫌侵权内容。
转载请注明出处: apollocode » R303T 指纹识别模块
文件列表(部分)
名称 | 大小 | 修改日期 |
---|---|---|
SynoAPIEx.dll | 17.97 KB | 2018-04-26 |
test.exe | 6.23 KB | 2018-04-26 |
test.pdb | 4.91 KB | 2018-04-26 |
test.vshost.exe | 12.91 KB | 2018-04-26 |
Form1.cs | 0.78 KB | 2018-04-26 |
Form1.Designer.cs | 1.43 KB | 2018-04-26 |
Form1.resx | 1.50 KB | 2018-04-26 |
DesignTimeResolveAssemblyReferencesInput.cache | 1.14 KB | 2018-04-26 |
test.csproj.GenerateResource.Cache | 0.49 KB | 2018-04-26 |
test.exe | 6.30 KB | 2018-04-26 |
test.Form1.resources | 0.15 KB | 2018-04-26 |
test.pdb | 4.91 KB | 2018-04-26 |
Program.cs | 0.30 KB | 2018-04-26 |
AssemblyInfo.cs | 0.71 KB | 2018-04-26 |
SynoAPIEx.dll | 18.57 KB | 2018-04-26 |
SynoAPIExHelper.cs | 2.36 KB | 2018-04-26 |
test.csproj | 1.06 KB | 2018-04-26 |
城章GROW R303T电容指纹模块.png | 164.03 KB | 2018-04-26 |
Debug | 0.00 KB | 2018-04-26 |
Debug | 0.00 KB | 2020-08-04 |
bin | 0.00 KB | 2018-04-26 |
obj | 0.00 KB | 2018-04-26 |
Properties | 0.00 KB | 2018-04-26 |
test | 0.00 KB | 2018-04-26 |
R303T 指纹识别模块 | 0.00 KB | 2020-08-04 |
发表评论 取消回复