⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smartcard.cs

📁 Smart Card communication include tx and rx
💻 CS
📖 第 1 页 / 共 3 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using MifareReaderDemo;

namespace SmartCard
{
	/// <summary>
	/// Summary description for Form1.
	/// </summary>
	public class Form1 : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Button check_button;
		private System.Windows.Forms.TextBox txtCardID;
        private System.Windows.Forms.Label lblCardID;
        private System.Windows.Forms.GroupBox groupBox3;
        private Label label1;
        private Label label2;
        private GroupBox groupBox7;
        private Label label3;
        private Label label9;
        private Label label8;
        private Label label7;
        private Button button1;
        private TextBox RdS;
        private TextBox RdB;
        private GroupBox groupBox8;
        private Button button2;
        private TextBox WrD;
        private TextBox WrS;
        private TextBox WrB;
        private Label label4;
        private Label label5;
        private Label label6;
        private Label label10;
        private GroupBox groupBox9;
        private Label label15;
        private Label label16;
        private Label label17;
        private Button button3;
        private Label label11;
        private Label label12;
        private Label label13;
        private Label label14;
        private GroupBox groupBox10;
        private TextBox WBY;
        private TextBox WBP;
        private TextBox WBT;
        private Button button4;
        private TextBox WBI;
        private TextBox WBA;
        private TextBox WBN;
        private Label label24;
        private Label label18;
        private Label label19;
        private Label label20;
        private Label label21;
        private Label label22;
        private Label label23;
        private TextBox RBT;
        private TextBox RBI;
        private TextBox RBA;
        private TextBox RBN;
        private TextBox RBP;
        private TextBox RBY;
        private TextBox RdD;
        private Label label25;
        private Label label26;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public Form1()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.check_button = new System.Windows.Forms.Button();
			this.txtCardID = new System.Windows.Forms.TextBox();
			this.lblCardID = new System.Windows.Forms.Label();
			this.groupBox3 = new System.Windows.Forms.GroupBox();
			this.label1 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.groupBox7 = new System.Windows.Forms.GroupBox();
			this.RdD = new System.Windows.Forms.TextBox();
			this.button1 = new System.Windows.Forms.Button();
			this.RdS = new System.Windows.Forms.TextBox();
			this.RdB = new System.Windows.Forms.TextBox();
			this.label9 = new System.Windows.Forms.Label();
			this.label8 = new System.Windows.Forms.Label();
			this.label7 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.groupBox8 = new System.Windows.Forms.GroupBox();
			this.button2 = new System.Windows.Forms.Button();
			this.WrD = new System.Windows.Forms.TextBox();
			this.WrS = new System.Windows.Forms.TextBox();
			this.WrB = new System.Windows.Forms.TextBox();
			this.label4 = new System.Windows.Forms.Label();
			this.label5 = new System.Windows.Forms.Label();
			this.label6 = new System.Windows.Forms.Label();
			this.label10 = new System.Windows.Forms.Label();
			this.groupBox9 = new System.Windows.Forms.GroupBox();
			this.RBY = new System.Windows.Forms.TextBox();
			this.RBP = new System.Windows.Forms.TextBox();
			this.RBT = new System.Windows.Forms.TextBox();
			this.RBI = new System.Windows.Forms.TextBox();
			this.RBA = new System.Windows.Forms.TextBox();
			this.RBN = new System.Windows.Forms.TextBox();
			this.label15 = new System.Windows.Forms.Label();
			this.label16 = new System.Windows.Forms.Label();
			this.label17 = new System.Windows.Forms.Label();
			this.button3 = new System.Windows.Forms.Button();
			this.label11 = new System.Windows.Forms.Label();
			this.label12 = new System.Windows.Forms.Label();
			this.label13 = new System.Windows.Forms.Label();
			this.label14 = new System.Windows.Forms.Label();
			this.groupBox10 = new System.Windows.Forms.GroupBox();
			this.label18 = new System.Windows.Forms.Label();
			this.label19 = new System.Windows.Forms.Label();
			this.label20 = new System.Windows.Forms.Label();
			this.label21 = new System.Windows.Forms.Label();
			this.label22 = new System.Windows.Forms.Label();
			this.label23 = new System.Windows.Forms.Label();
			this.WBY = new System.Windows.Forms.TextBox();
			this.WBP = new System.Windows.Forms.TextBox();
			this.WBT = new System.Windows.Forms.TextBox();
			this.button4 = new System.Windows.Forms.Button();
			this.WBI = new System.Windows.Forms.TextBox();
			this.WBA = new System.Windows.Forms.TextBox();
			this.WBN = new System.Windows.Forms.TextBox();
			this.label24 = new System.Windows.Forms.Label();
			this.label25 = new System.Windows.Forms.Label();
			this.label26 = new System.Windows.Forms.Label();
			this.groupBox3.SuspendLayout();
			this.groupBox7.SuspendLayout();
			this.groupBox8.SuspendLayout();
			this.groupBox9.SuspendLayout();
			this.groupBox10.SuspendLayout();
			this.SuspendLayout();
			// 
			// check_button
			// 
			this.check_button.Location = new System.Drawing.Point(6, 7);
			this.check_button.Name = "check_button";
			this.check_button.Size = new System.Drawing.Size(154, 21);
			this.check_button.TabIndex = 0;
			this.check_button.Text = "Read Card Serial Number";
			this.check_button.Click += new System.EventHandler(this.check_button_Click);
			// 
			// txtCardID
			// 
			this.txtCardID.Location = new System.Drawing.Point(243, 10);
			this.txtCardID.Name = "txtCardID";
			this.txtCardID.ReadOnly = true;
			this.txtCardID.Size = new System.Drawing.Size(147, 20);
			this.txtCardID.TabIndex = 1;
			this.txtCardID.Text = "";
			this.txtCardID.TextChanged += new System.EventHandler(this.txtCardID_TextChanged);
			// 
			// lblCardID
			// 
			this.lblCardID.Location = new System.Drawing.Point(166, 12);
			this.lblCardID.Name = "lblCardID";
			this.lblCardID.Size = new System.Drawing.Size(71, 14);
			this.lblCardID.TabIndex = 3;
			this.lblCardID.Text = "Card Number";
			this.lblCardID.Click += new System.EventHandler(this.lblCardID_Click);
			// 
			// groupBox3
			// 
			this.groupBox3.Controls.Add(this.txtCardID);
			this.groupBox3.Controls.Add(this.lblCardID);
			this.groupBox3.Controls.Add(this.check_button);
			this.groupBox3.Location = new System.Drawing.Point(24, 68);
			this.groupBox3.Name = "groupBox3";
			this.groupBox3.Size = new System.Drawing.Size(412, 37);
			this.groupBox3.TabIndex = 12;
			this.groupBox3.TabStop = false;
			this.groupBox3.Enter += new System.EventHandler(this.groupBox3_Enter);
			// 
			// label1
			// 
			this.label1.AutoSize = true;
			this.label1.Font = new System.Drawing.Font("Times New Roman", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.label1.Location = new System.Drawing.Point(188, 16);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(88, 26);
			this.label1.TabIndex = 15;
			this.label1.Text = "DSL Lab";
			this.label1.Click += new System.EventHandler(this.label1_Click_1);
			// 
			// label2
			// 
			this.label2.AutoSize = true;
			this.label2.Font = new System.Drawing.Font("Times New Roman", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(178)));
			this.label2.Location = new System.Drawing.Point(118, 41);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(243, 26);
			this.label2.TabIndex = 16;
			this.label2.Text = "EE5815 Smart Card Demo";
			// 
			// groupBox7
			// 
			this.groupBox7.Controls.Add(this.RdD);
			this.groupBox7.Controls.Add(this.button1);
			this.groupBox7.Controls.Add(this.RdS);
			this.groupBox7.Controls.Add(this.RdB);
			this.groupBox7.Controls.Add(this.label9);
			this.groupBox7.Controls.Add(this.label8);
			this.groupBox7.Controls.Add(this.label7);
			this.groupBox7.Controls.Add(this.label3);
			this.groupBox7.Enabled = false;
			this.groupBox7.Location = new System.Drawing.Point(24, 122);
			this.groupBox7.Name = "groupBox7";
			this.groupBox7.Size = new System.Drawing.Size(195, 121);
			this.groupBox7.TabIndex = 17;
			this.groupBox7.TabStop = false;
			// 
			// RdD
			// 
			this.RdD.Location = new System.Drawing.Point(44, 62);
			this.RdD.Name = "RdD";
			this.RdD.ReadOnly = true;
			this.RdD.Size = new System.Drawing.Size(135, 20);
			this.RdD.TabIndex = 24;
			this.RdD.Text = "";
			this.RdD.TextChanged += new System.EventHandler(this.RdD_TextChanged);
			// 
			// button1
			// 
			this.button1.Enabled = false;
			this.button1.Location = new System.Drawing.Point(114, 86);
			this.button1.Name = "button1";
			this.button1.Size = new System.Drawing.Size(65, 23);
			this.button1.TabIndex = 23;
			this.button1.Text = "Read";
			this.button1.Click += new System.EventHandler(this.button1_Click_1);
			// 
			// RdS
			// 
			this.RdS.Location = new System.Drawing.Point(44, 38);
			this.RdS.MaxLength = 2;
			this.RdS.Name = "RdS";
			this.RdS.Size = new System.Drawing.Size(135, 20);
			this.RdS.TabIndex = 21;
			this.RdS.Text = "";
			this.RdS.TextChanged += new System.EventHandler(this.RdS_TextChanged);
			// 
			// RdB
			// 
			this.RdB.Location = new System.Drawing.Point(44, 14);
			this.RdB.MaxLength = 2;
			this.RdB.Name = "RdB";
			this.RdB.Size = new System.Drawing.Size(135, 20);
			this.RdB.TabIndex = 12;
			this.RdB.Text = "";
			this.RdB.TextChanged += new System.EventHandler(this.RdB_TextChanged);
			// 
			// label9
			// 
			this.label9.Location = new System.Drawing.Point(6, 62);
			this.label9.Name = "label9";
			this.label9.Size = new System.Drawing.Size(71, 14);
			this.label9.TabIndex = 7;
			this.label9.Text = "Data";
			// 
			// label8
			// 
			this.label8.Location = new System.Drawing.Point(6, 43);
			this.label8.Name = "label8";
			this.label8.Size = new System.Drawing.Size(71, 14);
			this.label8.TabIndex = 6;
			this.label8.Text = "Sector";
			this.label8.Click += new System.EventHandler(this.label8_Click);
			// 
			// label7
			// 
			this.label7.Location = new System.Drawing.Point(6, 19);
			this.label7.Name = "label7";
			this.label7.Size = new System.Drawing.Size(71, 14);
			this.label7.TabIndex = 5;
			this.label7.Text = "Block";
			this.label7.Click += new System.EventHandler(this.label7_Click);
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(10, 0);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(34, 15);
			this.label3.TabIndex = 4;
			this.label3.Text = "Read";
			this.label3.Click += new System.EventHandler(this.label3_Click);
			// 
			// groupBox8
			// 
			this.groupBox8.Controls.Add(this.button2);
			this.groupBox8.Controls.Add(this.WrD);
			this.groupBox8.Controls.Add(this.WrS);
			this.groupBox8.Controls.Add(this.WrB);
			this.groupBox8.Controls.Add(this.label4);
			this.groupBox8.Controls.Add(this.label5);
			this.groupBox8.Controls.Add(this.label6);
			this.groupBox8.Controls.Add(this.label10);
			this.groupBox8.Enabled = false;
			this.groupBox8.Location = new System.Drawing.Point(241, 122);
			this.groupBox8.Name = "groupBox8";
			this.groupBox8.Size = new System.Drawing.Size(195, 121);
			this.groupBox8.TabIndex = 18;
			this.groupBox8.TabStop = false;
			// 
			// button2
			// 
			this.button2.Enabled = false;
			this.button2.Location = new System.Drawing.Point(114, 86);
			this.button2.Name = "button2";
			this.button2.Size = new System.Drawing.Size(65, 23);
			this.button2.TabIndex = 23;
			this.button2.Text = "Write";
			this.button2.Click += new System.EventHandler(this.button2_Click);
			// 
			// WrD
			// 
			this.WrD.Location = new System.Drawing.Point(44, 62);
			this.WrD.MaxLength = 16;
			this.WrD.Name = "WrD";
			this.WrD.Size = new System.Drawing.Size(135, 20);
			this.WrD.TabIndex = 22;
			this.WrD.Text = "";
			// 
			// WrS
			// 
			this.WrS.Location = new System.Drawing.Point(44, 38);
			this.WrS.MaxLength = 2;
			this.WrS.Name = "WrS";
			this.WrS.Size = new System.Drawing.Size(135, 20);
			this.WrS.TabIndex = 21;
			this.WrS.Text = "";
			// 
			// WrB
			// 
			this.WrB.Location = new System.Drawing.Point(44, 14);
			this.WrB.MaxLength = 2;
			this.WrB.Name = "WrB";
			this.WrB.Size = new System.Drawing.Size(135, 20);
			this.WrB.TabIndex = 12;
			this.WrB.Text = "";
			this.WrB.TextChanged += new System.EventHandler(this.WrB_TextChanged);
			// 
			// label4
			// 
			this.label4.Location = new System.Drawing.Point(6, 62);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(71, 14);
			this.label4.TabIndex = 7;
			this.label4.Text = "Date";
			// 
			// label5
			// 
			this.label5.Location = new System.Drawing.Point(6, 43);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(71, 14);
			this.label5.TabIndex = 6;
			this.label5.Text = "Sector";
			// 
			// label6
			// 
			this.label6.Location = new System.Drawing.Point(6, 19);
			this.label6.Name = "label6";
			this.label6.Size = new System.Drawing.Size(71, 14);
			this.label6.TabIndex = 5;
			this.label6.Text = "Block";
			// 
			// label10
			// 
			this.label10.Location = new System.Drawing.Point(10, 0);
			this.label10.Name = "label10";
			this.label10.Size = new System.Drawing.Size(34, 15);
			this.label10.TabIndex = 4;
			this.label10.Text = "Write";
			// 
			// groupBox9
			// 
			this.groupBox9.Controls.Add(this.RBY);
			this.groupBox9.Controls.Add(this.RBP);
			this.groupBox9.Controls.Add(this.RBT);
			this.groupBox9.Controls.Add(this.RBI);
			this.groupBox9.Controls.Add(this.RBA);
			this.groupBox9.Controls.Add(this.RBN);
			this.groupBox9.Controls.Add(this.label15);
			this.groupBox9.Controls.Add(this.label16);
			this.groupBox9.Controls.Add(this.label17);
			this.groupBox9.Controls.Add(this.button3);
			this.groupBox9.Controls.Add(this.label11);
			this.groupBox9.Controls.Add(this.label12);
			this.groupBox9.Controls.Add(this.label13);
			this.groupBox9.Controls.Add(this.label14);
			this.groupBox9.Enabled = false;
			this.groupBox9.Location = new System.Drawing.Point(24, 248);
			this.groupBox9.Name = "groupBox9";
			this.groupBox9.Size = new System.Drawing.Size(412, 191);
			this.groupBox9.TabIndex = 19;
			this.groupBox9.TabStop = false;
			// 
			// RBY
			// 
			this.RBY.Location = new System.Drawing.Point(60, 138);
			this.RBY.Name = "RBY";
			this.RBY.ReadOnly = true;
			this.RBY.Size = new System.Drawing.Size(336, 20);
			this.RBY.TabIndex = 32;
			this.RBY.Text = "";
			// 
			// RBP
			// 
			this.RBP.Location = new System.Drawing.Point(60, 114);
			this.RBP.Name = "RBP";
			this.RBP.ReadOnly = true;
			this.RBP.Size = new System.Drawing.Size(336, 20);
			this.RBP.TabIndex = 31;
			this.RBP.Text = "";
			// 
			// RBT
			// 
			this.RBT.Location = new System.Drawing.Point(60, 89);
			this.RBT.Name = "RBT";

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -