身份证信息展示提取为自定义控件

Former-commit-id: 163775b3ac801b755ecdcbbae2a8895293c73ecb
TangShanKaiPing
wanggang 5 years ago
parent 6c4ce59062
commit 02cb542b57

@ -83,6 +83,12 @@
<Compile Include="Data\User.cs" />
<Compile Include="CVRSDK.cs" />
<Compile Include="Infrastructure\DllExtern.cs" />
<Compile Include="Controls\IdCard.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\IdCard.Designer.cs">
<DependentUpon>IdCard.cs</DependentUpon>
</Compile>
<Compile Include="Infrastructure\ImageHelper.cs" />
<Compile Include="Infrastructure\CVRHelper.cs" />
<Compile Include="Infrastructure\CVRSDK.cs" />
@ -97,6 +103,9 @@
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Controls\IdCard.resx">
<DependentUpon>IdCard.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>

@ -0,0 +1,327 @@
namespace CameraCard
{
partial class IdCard
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.idcSamIDValue = new System.Windows.Forms.Label();
this.idcSamIDLabel = new System.Windows.Forms.Label();
this.idcValidDateValue = new System.Windows.Forms.Label();
this.idcValidDateLabel = new System.Windows.Forms.Label();
this.idcDepartmentValue = new System.Windows.Forms.Label();
this.idcDepartmentLabel = new System.Windows.Forms.Label();
this.idcIdCardNoValue = new System.Windows.Forms.Label();
this.idcIdCardNoLabel = new System.Windows.Forms.Label();
this.idcBirthdayValue = new System.Windows.Forms.Label();
this.idcBirthdayLabel = new System.Windows.Forms.Label();
this.idcNationCodeValue = new System.Windows.Forms.Label();
this.idcNationCodeLabel = new System.Windows.Forms.Label();
this.idcNationValue = new System.Windows.Forms.Label();
this.idcNationLabel = new System.Windows.Forms.Label();
this.idcSexValue = new System.Windows.Forms.Label();
this.idcSexLabel = new System.Windows.Forms.Label();
this.idcAddressValue = new System.Windows.Forms.Label();
this.idcAddressLabel = new System.Windows.Forms.Label();
this.idcCnNameValue = new System.Windows.Forms.Label();
this.idcCnNameLabel = new System.Windows.Forms.Label();
this.idcNameValue = new System.Windows.Forms.Label();
this.idcNameLable = new System.Windows.Forms.Label();
this.idcPicture = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.idcPicture)).BeginInit();
this.SuspendLayout();
//
// idcSamIDValue
//
this.idcSamIDValue.AutoSize = true;
this.idcSamIDValue.Location = new System.Drawing.Point(79, 184);
this.idcSamIDValue.Name = "idcSamIDValue";
this.idcSamIDValue.Size = new System.Drawing.Size(17, 12);
this.idcSamIDValue.TabIndex = 51;
this.idcSamIDValue.Text = "空";
//
// idcSamIDLabel
//
this.idcSamIDLabel.AutoSize = true;
this.idcSamIDLabel.Location = new System.Drawing.Point(5, 184);
this.idcSamIDLabel.Name = "idcSamIDLabel";
this.idcSamIDLabel.Size = new System.Drawing.Size(77, 12);
this.idcSamIDLabel.TabIndex = 50;
this.idcSamIDLabel.Text = "安全模块号:";
//
// idcValidDateValue
//
this.idcValidDateValue.AutoSize = true;
this.idcValidDateValue.Location = new System.Drawing.Point(73, 160);
this.idcValidDateValue.Name = "idcValidDateValue";
this.idcValidDateValue.Size = new System.Drawing.Size(17, 12);
this.idcValidDateValue.TabIndex = 49;
this.idcValidDateValue.Text = "空";
//
// idcValidDateLabel
//
this.idcValidDateLabel.AutoSize = true;
this.idcValidDateLabel.Location = new System.Drawing.Point(5, 160);
this.idcValidDateLabel.Name = "idcValidDateLabel";
this.idcValidDateLabel.Size = new System.Drawing.Size(65, 12);
this.idcValidDateLabel.TabIndex = 48;
this.idcValidDateLabel.Text = "有效期限:";
//
// idcDepartmentValue
//
this.idcDepartmentValue.AutoSize = true;
this.idcDepartmentValue.Location = new System.Drawing.Point(71, 133);
this.idcDepartmentValue.Name = "idcDepartmentValue";
this.idcDepartmentValue.Size = new System.Drawing.Size(17, 12);
this.idcDepartmentValue.TabIndex = 47;
this.idcDepartmentValue.Text = "空";
//
// idcDepartmentLabel
//
this.idcDepartmentLabel.AutoSize = true;
this.idcDepartmentLabel.Location = new System.Drawing.Point(4, 135);
this.idcDepartmentLabel.Name = "idcDepartmentLabel";
this.idcDepartmentLabel.Size = new System.Drawing.Size(65, 12);
this.idcDepartmentLabel.TabIndex = 46;
this.idcDepartmentLabel.Text = "签发机关:";
//
// idcIdCardNoValue
//
this.idcIdCardNoValue.AutoSize = true;
this.idcIdCardNoValue.Location = new System.Drawing.Point(71, 109);
this.idcIdCardNoValue.Name = "idcIdCardNoValue";
this.idcIdCardNoValue.Size = new System.Drawing.Size(17, 12);
this.idcIdCardNoValue.TabIndex = 45;
this.idcIdCardNoValue.Text = "空";
//
// idcIdCardNoLabel
//
this.idcIdCardNoLabel.AutoSize = true;
this.idcIdCardNoLabel.Location = new System.Drawing.Point(4, 109);
this.idcIdCardNoLabel.Name = "idcIdCardNoLabel";
this.idcIdCardNoLabel.Size = new System.Drawing.Size(65, 12);
this.idcIdCardNoLabel.TabIndex = 44;
this.idcIdCardNoLabel.Text = "身份证号:";
//
// idcBirthdayValue
//
this.idcBirthdayValue.AutoSize = true;
this.idcBirthdayValue.Location = new System.Drawing.Point(46, 57);
this.idcBirthdayValue.Name = "idcBirthdayValue";
this.idcBirthdayValue.Size = new System.Drawing.Size(17, 12);
this.idcBirthdayValue.TabIndex = 43;
this.idcBirthdayValue.Text = "空";
//
// idcBirthdayLabel
//
this.idcBirthdayLabel.AutoSize = true;
this.idcBirthdayLabel.Location = new System.Drawing.Point(4, 57);
this.idcBirthdayLabel.Name = "idcBirthdayLabel";
this.idcBirthdayLabel.Size = new System.Drawing.Size(41, 12);
this.idcBirthdayLabel.TabIndex = 42;
this.idcBirthdayLabel.Text = "出生:";
//
// idcNationCodeValue
//
this.idcNationCodeValue.AutoSize = true;
this.idcNationCodeValue.Location = new System.Drawing.Point(247, 33);
this.idcNationCodeValue.Name = "idcNationCodeValue";
this.idcNationCodeValue.Size = new System.Drawing.Size(17, 12);
this.idcNationCodeValue.TabIndex = 41;
this.idcNationCodeValue.Text = "空";
//
// idcNationCodeLabel
//
this.idcNationCodeLabel.AutoSize = true;
this.idcNationCodeLabel.Location = new System.Drawing.Point(190, 33);
this.idcNationCodeLabel.Name = "idcNationCodeLabel";
this.idcNationCodeLabel.Size = new System.Drawing.Size(65, 12);
this.idcNationCodeLabel.TabIndex = 40;
this.idcNationCodeLabel.Text = "民族代码:";
//
// idcNationValue
//
this.idcNationValue.AutoSize = true;
this.idcNationValue.Location = new System.Drawing.Point(129, 33);
this.idcNationValue.Name = "idcNationValue";
this.idcNationValue.Size = new System.Drawing.Size(17, 12);
this.idcNationValue.TabIndex = 39;
this.idcNationValue.Text = "空";
//
// idcNationLabel
//
this.idcNationLabel.AutoSize = true;
this.idcNationLabel.Location = new System.Drawing.Point(92, 34);
this.idcNationLabel.Name = "idcNationLabel";
this.idcNationLabel.Size = new System.Drawing.Size(41, 12);
this.idcNationLabel.TabIndex = 38;
this.idcNationLabel.Text = "民族:";
//
// idcSexValue
//
this.idcSexValue.AutoSize = true;
this.idcSexValue.Location = new System.Drawing.Point(44, 34);
this.idcSexValue.Name = "idcSexValue";
this.idcSexValue.Size = new System.Drawing.Size(17, 12);
this.idcSexValue.TabIndex = 37;
this.idcSexValue.Text = "空";
//
// idcSexLabel
//
this.idcSexLabel.AutoSize = true;
this.idcSexLabel.Location = new System.Drawing.Point(4, 34);
this.idcSexLabel.Name = "idcSexLabel";
this.idcSexLabel.Size = new System.Drawing.Size(41, 12);
this.idcSexLabel.TabIndex = 36;
this.idcSexLabel.Text = "性别:";
//
// idcAddressValue
//
this.idcAddressValue.AutoSize = true;
this.idcAddressValue.Location = new System.Drawing.Point(46, 82);
this.idcAddressValue.Name = "idcAddressValue";
this.idcAddressValue.Size = new System.Drawing.Size(17, 12);
this.idcAddressValue.TabIndex = 35;
this.idcAddressValue.Text = "空";
//
// idcAddressLabel
//
this.idcAddressLabel.AutoSize = true;
this.idcAddressLabel.Location = new System.Drawing.Point(4, 82);
this.idcAddressLabel.Name = "idcAddressLabel";
this.idcAddressLabel.Size = new System.Drawing.Size(41, 12);
this.idcAddressLabel.TabIndex = 34;
this.idcAddressLabel.Text = "地址:";
//
// idcCnNameValue
//
this.idcCnNameValue.AutoSize = true;
this.idcCnNameValue.Location = new System.Drawing.Point(216, 9);
this.idcCnNameValue.Name = "idcCnNameValue";
this.idcCnNameValue.Size = new System.Drawing.Size(17, 12);
this.idcCnNameValue.TabIndex = 33;
this.idcCnNameValue.Text = "空";
//
// idcCnNameLabel
//
this.idcCnNameLabel.AutoSize = true;
this.idcCnNameLabel.Location = new System.Drawing.Point(153, 9);
this.idcCnNameLabel.Name = "idcCnNameLabel";
this.idcCnNameLabel.Size = new System.Drawing.Size(65, 12);
this.idcCnNameLabel.TabIndex = 32;
this.idcCnNameLabel.Text = "中文姓名:";
//
// idcNameValue
//
this.idcNameValue.AutoSize = true;
this.idcNameValue.Location = new System.Drawing.Point(44, 9);
this.idcNameValue.Name = "idcNameValue";
this.idcNameValue.Size = new System.Drawing.Size(17, 12);
this.idcNameValue.TabIndex = 31;
this.idcNameValue.Text = "空";
//
// idcNameLable
//
this.idcNameLable.AutoSize = true;
this.idcNameLable.Location = new System.Drawing.Point(4, 8);
this.idcNameLable.Name = "idcNameLable";
this.idcNameLable.Size = new System.Drawing.Size(41, 12);
this.idcNameLable.TabIndex = 30;
this.idcNameLable.Text = "姓名:";
//
// idcPicture
//
this.idcPicture.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.idcPicture.BackColor = System.Drawing.Color.Black;
this.idcPicture.Location = new System.Drawing.Point(314, 5);
this.idcPicture.Name = "idcPicture";
this.idcPicture.Size = new System.Drawing.Size(102, 126);
this.idcPicture.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.idcPicture.TabIndex = 29;
this.idcPicture.TabStop = false;
//
// IdCard
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.idcSamIDValue);
this.Controls.Add(this.idcSamIDLabel);
this.Controls.Add(this.idcValidDateValue);
this.Controls.Add(this.idcValidDateLabel);
this.Controls.Add(this.idcDepartmentValue);
this.Controls.Add(this.idcDepartmentLabel);
this.Controls.Add(this.idcIdCardNoValue);
this.Controls.Add(this.idcIdCardNoLabel);
this.Controls.Add(this.idcBirthdayValue);
this.Controls.Add(this.idcBirthdayLabel);
this.Controls.Add(this.idcNationCodeValue);
this.Controls.Add(this.idcNationCodeLabel);
this.Controls.Add(this.idcNationValue);
this.Controls.Add(this.idcNationLabel);
this.Controls.Add(this.idcSexValue);
this.Controls.Add(this.idcSexLabel);
this.Controls.Add(this.idcAddressValue);
this.Controls.Add(this.idcAddressLabel);
this.Controls.Add(this.idcCnNameValue);
this.Controls.Add(this.idcCnNameLabel);
this.Controls.Add(this.idcNameValue);
this.Controls.Add(this.idcNameLable);
this.Controls.Add(this.idcPicture);
this.Name = "IdCard";
this.Size = new System.Drawing.Size(420, 200);
((System.ComponentModel.ISupportInitialize)(this.idcPicture)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
public System.Windows.Forms.Label idcSamIDValue;
public System.Windows.Forms.Label idcSamIDLabel;
public System.Windows.Forms.Label idcValidDateValue;
public System.Windows.Forms.Label idcValidDateLabel;
public System.Windows.Forms.Label idcDepartmentValue;
public System.Windows.Forms.Label idcDepartmentLabel;
public System.Windows.Forms.Label idcIdCardNoValue;
public System.Windows.Forms.Label idcIdCardNoLabel;
public System.Windows.Forms.Label idcBirthdayValue;
public System.Windows.Forms.Label idcBirthdayLabel;
public System.Windows.Forms.Label idcNationCodeValue;
public System.Windows.Forms.Label idcNationCodeLabel;
public System.Windows.Forms.Label idcNationValue;
public System.Windows.Forms.Label idcNationLabel;
public System.Windows.Forms.Label idcSexValue;
public System.Windows.Forms.Label idcSexLabel;
public System.Windows.Forms.Label idcAddressValue;
public System.Windows.Forms.Label idcAddressLabel;
public System.Windows.Forms.Label idcCnNameValue;
public System.Windows.Forms.Label idcCnNameLabel;
public System.Windows.Forms.Label idcNameValue;
public System.Windows.Forms.Label idcNameLable;
public System.Windows.Forms.PictureBox idcPicture;
}
}

@ -0,0 +1,12 @@
using System.Windows.Forms;
namespace CameraCard
{
public partial class IdCard : UserControl
{
public IdCard()
{
InitializeComponent();
}
}
}

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

@ -30,29 +30,6 @@
{
System.Windows.Forms.TabPage tab1;
this.idcGroupBox = new System.Windows.Forms.GroupBox();
this.idcSamIDValue = new System.Windows.Forms.Label();
this.idcSamIDLabel = new System.Windows.Forms.Label();
this.idcValidDateValue = new System.Windows.Forms.Label();
this.idcValidDateLabel = new System.Windows.Forms.Label();
this.idcDepartmentValue = new System.Windows.Forms.Label();
this.idcDepartmentLabel = new System.Windows.Forms.Label();
this.idcIdCardNoValue = new System.Windows.Forms.Label();
this.idcIdCardNoLabel = new System.Windows.Forms.Label();
this.idcBirthdayValue = new System.Windows.Forms.Label();
this.idcBirthdayLabel = new System.Windows.Forms.Label();
this.idcNationCodeValue = new System.Windows.Forms.Label();
this.idcNationCodeLabel = new System.Windows.Forms.Label();
this.idcNationValue = new System.Windows.Forms.Label();
this.idcNationLabel = new System.Windows.Forms.Label();
this.idcSexValue = new System.Windows.Forms.Label();
this.idcSexLabel = new System.Windows.Forms.Label();
this.idcAddressValue = new System.Windows.Forms.Label();
this.idcAddressLabel = new System.Windows.Forms.Label();
this.idcCnNameValue = new System.Windows.Forms.Label();
this.idcCnNameLabel = new System.Windows.Forms.Label();
this.idcNameValue = new System.Windows.Forms.Label();
this.idcNameLable = new System.Windows.Forms.Label();
this.idcPicture = new System.Windows.Forms.PictureBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.photo = new System.Windows.Forms.PictureBox();
this.shotBtn = new System.Windows.Forms.Button();
@ -81,10 +58,10 @@
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.statusLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.versionLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.idCard = new CameraCard.IdCard();
tab1 = new System.Windows.Forms.TabPage();
tab1.SuspendLayout();
this.idcGroupBox.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.idcPicture)).BeginInit();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.photo)).BeginInit();
this.panel1.SuspendLayout();
@ -117,29 +94,7 @@
//
this.idcGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.idcGroupBox.Controls.Add(this.idcSamIDValue);
this.idcGroupBox.Controls.Add(this.idcSamIDLabel);
this.idcGroupBox.Controls.Add(this.idcValidDateValue);
this.idcGroupBox.Controls.Add(this.idcValidDateLabel);
this.idcGroupBox.Controls.Add(this.idcDepartmentValue);
this.idcGroupBox.Controls.Add(this.idcDepartmentLabel);
this.idcGroupBox.Controls.Add(this.idcIdCardNoValue);
this.idcGroupBox.Controls.Add(this.idcIdCardNoLabel);
this.idcGroupBox.Controls.Add(this.idcBirthdayValue);
this.idcGroupBox.Controls.Add(this.idcBirthdayLabel);
this.idcGroupBox.Controls.Add(this.idcNationCodeValue);
this.idcGroupBox.Controls.Add(this.idcNationCodeLabel);
this.idcGroupBox.Controls.Add(this.idcNationValue);
this.idcGroupBox.Controls.Add(this.idcNationLabel);
this.idcGroupBox.Controls.Add(this.idcSexValue);
this.idcGroupBox.Controls.Add(this.idcSexLabel);
this.idcGroupBox.Controls.Add(this.idcAddressValue);
this.idcGroupBox.Controls.Add(this.idcAddressLabel);
this.idcGroupBox.Controls.Add(this.idcCnNameValue);
this.idcGroupBox.Controls.Add(this.idcCnNameLabel);
this.idcGroupBox.Controls.Add(this.idcNameValue);
this.idcGroupBox.Controls.Add(this.idcNameLable);
this.idcGroupBox.Controls.Add(this.idcPicture);
this.idcGroupBox.Controls.Add(this.idCard);
this.idcGroupBox.Location = new System.Drawing.Point(174, 274);
this.idcGroupBox.Name = "idcGroupBox";
this.idcGroupBox.Size = new System.Drawing.Size(425, 222);
@ -147,215 +102,6 @@
this.idcGroupBox.TabStop = false;
this.idcGroupBox.Text = "身份证";
//
// idcSamIDValue
//
this.idcSamIDValue.AutoSize = true;
this.idcSamIDValue.Location = new System.Drawing.Point(82, 199);
this.idcSamIDValue.Name = "idcSamIDValue";
this.idcSamIDValue.Size = new System.Drawing.Size(17, 12);
this.idcSamIDValue.TabIndex = 28;
this.idcSamIDValue.Text = "空";
//
// idcSamIDLabel
//
this.idcSamIDLabel.AutoSize = true;
this.idcSamIDLabel.Location = new System.Drawing.Point(8, 199);
this.idcSamIDLabel.Name = "idcSamIDLabel";
this.idcSamIDLabel.Size = new System.Drawing.Size(77, 12);
this.idcSamIDLabel.TabIndex = 27;
this.idcSamIDLabel.Text = "安全模块号:";
//
// idcValidDateValue
//
this.idcValidDateValue.AutoSize = true;
this.idcValidDateValue.Location = new System.Drawing.Point(76, 175);
this.idcValidDateValue.Name = "idcValidDateValue";
this.idcValidDateValue.Size = new System.Drawing.Size(17, 12);
this.idcValidDateValue.TabIndex = 26;
this.idcValidDateValue.Text = "空";
//
// idcValidDateLabel
//
this.idcValidDateLabel.AutoSize = true;
this.idcValidDateLabel.Location = new System.Drawing.Point(8, 175);
this.idcValidDateLabel.Name = "idcValidDateLabel";
this.idcValidDateLabel.Size = new System.Drawing.Size(65, 12);
this.idcValidDateLabel.TabIndex = 25;
this.idcValidDateLabel.Text = "有效期限:";
//
// idcDepartmentValue
//
this.idcDepartmentValue.AutoSize = true;
this.idcDepartmentValue.Location = new System.Drawing.Point(74, 148);
this.idcDepartmentValue.Name = "idcDepartmentValue";
this.idcDepartmentValue.Size = new System.Drawing.Size(17, 12);
this.idcDepartmentValue.TabIndex = 24;
this.idcDepartmentValue.Text = "空";
//
// idcDepartmentLabel
//
this.idcDepartmentLabel.AutoSize = true;
this.idcDepartmentLabel.Location = new System.Drawing.Point(7, 150);
this.idcDepartmentLabel.Name = "idcDepartmentLabel";
this.idcDepartmentLabel.Size = new System.Drawing.Size(65, 12);
this.idcDepartmentLabel.TabIndex = 23;
this.idcDepartmentLabel.Text = "签发机关:";
//
// idcIdCardNoValue
//
this.idcIdCardNoValue.AutoSize = true;
this.idcIdCardNoValue.Location = new System.Drawing.Point(74, 124);
this.idcIdCardNoValue.Name = "idcIdCardNoValue";
this.idcIdCardNoValue.Size = new System.Drawing.Size(17, 12);
this.idcIdCardNoValue.TabIndex = 22;
this.idcIdCardNoValue.Text = "空";
//
// idcIdCardNoLabel
//
this.idcIdCardNoLabel.AutoSize = true;
this.idcIdCardNoLabel.Location = new System.Drawing.Point(7, 124);
this.idcIdCardNoLabel.Name = "idcIdCardNoLabel";
this.idcIdCardNoLabel.Size = new System.Drawing.Size(65, 12);
this.idcIdCardNoLabel.TabIndex = 21;
this.idcIdCardNoLabel.Text = "身份证号:";
//
// idcBirthdayValue
//
this.idcBirthdayValue.AutoSize = true;
this.idcBirthdayValue.Location = new System.Drawing.Point(49, 72);
this.idcBirthdayValue.Name = "idcBirthdayValue";
this.idcBirthdayValue.Size = new System.Drawing.Size(17, 12);
this.idcBirthdayValue.TabIndex = 20;
this.idcBirthdayValue.Text = "空";
//
// idcBirthdayLabel
//
this.idcBirthdayLabel.AutoSize = true;
this.idcBirthdayLabel.Location = new System.Drawing.Point(7, 72);
this.idcBirthdayLabel.Name = "idcBirthdayLabel";
this.idcBirthdayLabel.Size = new System.Drawing.Size(41, 12);
this.idcBirthdayLabel.TabIndex = 19;
this.idcBirthdayLabel.Text = "出生:";
//
// idcNationCodeValue
//
this.idcNationCodeValue.AutoSize = true;
this.idcNationCodeValue.Location = new System.Drawing.Point(250, 48);
this.idcNationCodeValue.Name = "idcNationCodeValue";
this.idcNationCodeValue.Size = new System.Drawing.Size(17, 12);
this.idcNationCodeValue.TabIndex = 18;
this.idcNationCodeValue.Text = "空";
//
// idcNationCodeLabel
//
this.idcNationCodeLabel.AutoSize = true;
this.idcNationCodeLabel.Location = new System.Drawing.Point(193, 48);
this.idcNationCodeLabel.Name = "idcNationCodeLabel";
this.idcNationCodeLabel.Size = new System.Drawing.Size(65, 12);
this.idcNationCodeLabel.TabIndex = 17;
this.idcNationCodeLabel.Text = "民族代码:";
//
// idcNationValue
//
this.idcNationValue.AutoSize = true;
this.idcNationValue.Location = new System.Drawing.Point(132, 48);
this.idcNationValue.Name = "idcNationValue";
this.idcNationValue.Size = new System.Drawing.Size(17, 12);
this.idcNationValue.TabIndex = 16;
this.idcNationValue.Text = "空";
//
// idcNationLabel
//
this.idcNationLabel.AutoSize = true;
this.idcNationLabel.Location = new System.Drawing.Point(95, 49);
this.idcNationLabel.Name = "idcNationLabel";
this.idcNationLabel.Size = new System.Drawing.Size(41, 12);
this.idcNationLabel.TabIndex = 15;
this.idcNationLabel.Text = "民族:";
//
// idcSexValue
//
this.idcSexValue.AutoSize = true;
this.idcSexValue.Location = new System.Drawing.Point(47, 49);
this.idcSexValue.Name = "idcSexValue";
this.idcSexValue.Size = new System.Drawing.Size(17, 12);
this.idcSexValue.TabIndex = 14;
this.idcSexValue.Text = "空";
//
// idcSexLabel
//
this.idcSexLabel.AutoSize = true;
this.idcSexLabel.Location = new System.Drawing.Point(7, 49);
this.idcSexLabel.Name = "idcSexLabel";
this.idcSexLabel.Size = new System.Drawing.Size(41, 12);
this.idcSexLabel.TabIndex = 13;
this.idcSexLabel.Text = "性别:";
//
// idcAddressValue
//
this.idcAddressValue.AutoSize = true;
this.idcAddressValue.Location = new System.Drawing.Point(49, 97);
this.idcAddressValue.Name = "idcAddressValue";
this.idcAddressValue.Size = new System.Drawing.Size(17, 12);
this.idcAddressValue.TabIndex = 12;
this.idcAddressValue.Text = "空";
//
// idcAddressLabel
//
this.idcAddressLabel.AutoSize = true;
this.idcAddressLabel.Location = new System.Drawing.Point(7, 97);
this.idcAddressLabel.Name = "idcAddressLabel";
this.idcAddressLabel.Size = new System.Drawing.Size(41, 12);
this.idcAddressLabel.TabIndex = 11;
this.idcAddressLabel.Text = "地址:";
//
// idcCnNameValue
//
this.idcCnNameValue.AutoSize = true;
this.idcCnNameValue.Location = new System.Drawing.Point(219, 24);
this.idcCnNameValue.Name = "idcCnNameValue";
this.idcCnNameValue.Size = new System.Drawing.Size(17, 12);
this.idcCnNameValue.TabIndex = 10;
this.idcCnNameValue.Text = "空";
//
// idcCnNameLabel
//
this.idcCnNameLabel.AutoSize = true;
this.idcCnNameLabel.Location = new System.Drawing.Point(156, 24);
this.idcCnNameLabel.Name = "idcCnNameLabel";
this.idcCnNameLabel.Size = new System.Drawing.Size(65, 12);
this.idcCnNameLabel.TabIndex = 9;
this.idcCnNameLabel.Text = "中文姓名:";
//
// idcNameValue
//
this.idcNameValue.AutoSize = true;
this.idcNameValue.Location = new System.Drawing.Point(47, 24);
this.idcNameValue.Name = "idcNameValue";
this.idcNameValue.Size = new System.Drawing.Size(17, 12);
this.idcNameValue.TabIndex = 8;
this.idcNameValue.Text = "空";
//
// idcNameLable
//
this.idcNameLable.AutoSize = true;
this.idcNameLable.Location = new System.Drawing.Point(7, 23);
this.idcNameLable.Name = "idcNameLable";
this.idcNameLable.Size = new System.Drawing.Size(41, 12);
this.idcNameLable.TabIndex = 7;
this.idcNameLable.Text = "姓名:";
//
// idcPicture
//
this.idcPicture.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.idcPicture.BackColor = System.Drawing.Color.Black;
this.idcPicture.Location = new System.Drawing.Point(317, 20);
this.idcPicture.Name = "idcPicture";
this.idcPicture.Size = new System.Drawing.Size(102, 126);
this.idcPicture.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.idcPicture.TabIndex = 6;
this.idcPicture.TabStop = false;
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
@ -642,6 +388,13 @@
this.versionLabel.Size = new System.Drawing.Size(14, 17);
this.versionLabel.Text = "v";
//
// idCard
//
this.idCard.Location = new System.Drawing.Point(-1, 16);
this.idCard.Name = "idCard";
this.idCard.Size = new System.Drawing.Size(420, 200);
this.idCard.TabIndex = 8;
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@ -656,8 +409,6 @@
this.Load += new System.EventHandler(this.MainFrom_Load);
tab1.ResumeLayout(false);
this.idcGroupBox.ResumeLayout(false);
this.idcGroupBox.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.idcPicture)).EndInit();
this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.photo)).EndInit();
this.panel1.ResumeLayout(false);
@ -693,29 +444,6 @@
private System.Windows.Forms.PictureBox photo;
private System.Windows.Forms.GroupBox idcGroupBox;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.PictureBox idcPicture;
private System.Windows.Forms.Label idcNameValue;
private System.Windows.Forms.Label idcNameLable;
private System.Windows.Forms.Label idcCnNameValue;
private System.Windows.Forms.Label idcCnNameLabel;
private System.Windows.Forms.Label idcAddressValue;
private System.Windows.Forms.Label idcAddressLabel;
private System.Windows.Forms.Label idcSexValue;
private System.Windows.Forms.Label idcSexLabel;
private System.Windows.Forms.Label idcNationValue;
private System.Windows.Forms.Label idcNationLabel;
private System.Windows.Forms.Label idcNationCodeLabel;
private System.Windows.Forms.Label idcNationCodeValue;
private System.Windows.Forms.Label idcBirthdayValue;
private System.Windows.Forms.Label idcBirthdayLabel;
private System.Windows.Forms.Label idcIdCardNoValue;
private System.Windows.Forms.Label idcIdCardNoLabel;
private System.Windows.Forms.Label idcDepartmentValue;
private System.Windows.Forms.Label idcDepartmentLabel;
private System.Windows.Forms.Label idcValidDateValue;
private System.Windows.Forms.Label idcValidDateLabel;
private System.Windows.Forms.Label idcSamIDValue;
private System.Windows.Forms.Label idcSamIDLabel;
private System.Windows.Forms.Button searchButton;
private System.Windows.Forms.TextBox numberValue;
private System.Windows.Forms.Label numberLabel;
@ -728,5 +456,6 @@
private System.Windows.Forms.Button checkUpdate;
private System.Windows.Forms.ToolStripStatusLabel versionLabel;
private System.Windows.Forms.ToolStripStatusLabel statusLabel;
private IdCard idCard;
}
}

@ -180,43 +180,43 @@ namespace CameraCard
private void UpdateIdCardUI(IdCardModel model)
{
this.idcPicture.Image?.Dispose();
this.idcPicture.Image = model.Image;
this.idCard.idcPicture.Image?.Dispose();
this.idCard.idcPicture.Image = model.Image;
if (model.Type == "居民身份证")
{
this.idcAddressLabel.Visible = true;
this.idcAddressValue.Visible = true;
this.idcCnNameLabel.Visible = false;
this.idcCnNameValue.Visible = false;
this.idcAddressLabel.Visible = true;
this.idcAddressValue.Visible = true;
this.idcAddressValue.Text = model.Address;
this.idcNameLable.Text = "民族:";
this.idcNationCodeLabel.Text = "民族代码:";
this.idcIdCardNoLabel.Text = "身份证号";
this.idCard.idcAddressLabel.Visible = true;
this.idCard.idcAddressValue.Visible = true;
this.idCard.idcCnNameLabel.Visible = false;
this.idCard.idcCnNameValue.Visible = false;
this.idCard.idcAddressLabel.Visible = true;
this.idCard.idcAddressValue.Visible = true;
this.idCard.idcAddressValue.Text = model.Address;
this.idCard.idcNameLable.Text = "民族:";
this.idCard.idcNationCodeLabel.Text = "民族代码:";
this.idCard.idcIdCardNoLabel.Text = "身份证号";
}
else
{
this.idcAddressLabel.Visible = false;
this.idcAddressValue.Visible = false;
this.idcCnNameLabel.Visible = true;
this.idcCnNameValue.Visible = true;
this.idcAddressLabel.Visible = false;
this.idcAddressValue.Visible = false;
this.idcCnNameValue.Text = model.CnName;
this.idcNameLable.Text = "国籍:";
this.idcNationCodeLabel.Text = "国籍代码:";
this.idcIdCardNoLabel.Text = "证件号码";
this.idCard.idcAddressLabel.Visible = false;
this.idCard.idcAddressValue.Visible = false;
this.idCard.idcCnNameLabel.Visible = true;
this.idCard.idcCnNameValue.Visible = true;
this.idCard.idcAddressLabel.Visible = false;
this.idCard.idcAddressValue.Visible = false;
this.idCard.idcCnNameValue.Text = model.CnName;
this.idCard.idcNameLable.Text = "国籍:";
this.idCard.idcNationCodeLabel.Text = "国籍代码:";
this.idCard.idcIdCardNoLabel.Text = "证件号码";
}
this.idcNameValue.Text = model.Name;
this.idcSexValue.Text = model.Sex;
this.idcNationValue.Text = model.Nation;
this.idcNationCodeValue.Text = model.NationCode;
this.idcBirthdayValue.Text = model.Birthday;
this.idcIdCardNoValue.Text = model.IdCardNo;
this.idcDepartmentValue.Text = model.Department;
this.idcValidDateValue.Text = $"{model.ValidDateStart}-{model.ValidDateEnd}";
this.idcSamIDValue.Text = model.SamID;
this.idCard.idcNameValue.Text = model.Name;
this.idCard.idcSexValue.Text = model.Sex;
this.idCard.idcNationValue.Text = model.Nation;
this.idCard.idcNationCodeValue.Text = model.NationCode;
this.idCard.idcBirthdayValue.Text = model.Birthday;
this.idCard.idcIdCardNoValue.Text = model.IdCardNo;
this.idCard.idcDepartmentValue.Text = model.Department;
this.idCard.idcValidDateValue.Text = $"{model.ValidDateStart}-{model.ValidDateEnd}";
this.idCard.idcSamIDValue.Text = model.SamID;
}
private void checkUpdate_Click(object sender, EventArgs e)

Loading…
Cancel
Save