Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Mifare RFID WiFi Board Read/Write IC Card(4154)

1PCS RC522 13.56Mhz RFID Module for Arduino and Raspberry pi

https://www.youtube.com/watch?v=yP7-Isqxk98 http://www.decompiler.com/ https://www.tindie.com/products/icstation/mifare-rfid-wifi-board-readwrite-ic-card4154/ http://www.icstation.com/product_document/Download/4154_document.rar

  • disassembled application for analysis of the uart protocol
  • module does not offer any benefit compared to other boards with mfrc522 chip, there is no proper documentation of the protocol and you will need StLink V2 to upload new firmware to the STM8 chipMifare RFID WiFi Board Read/Write IC Card(4154)

1PCS RC522 13.56Mhz RFID Module for Arduino and Raspberry pi

https://www.youtube.com/watch?v=yP7-Isqxk98 http://www.decompiler.com/ https://www.tindie.com/products/icstation/mifare-rfid-wifi-board-readwrite-ic-card4154/ http://www.icstation.com/product_document/Download/4154_document.rar

  • disassembled application for analysis of the uart protocol
  • module does not offer any benefit compared to other boards with mfrc522 chip, there is no proper documentation of the protocol and you will need StLink V2 to upload new firmware to the STM8 chip
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO.Ports;
using System.Resources;
using System.Text.RegularExpressions;
using System.Windows.Forms;
namespace UartRc522
{
public class MainForm : Form
{
public enum ProState : byte
{
StateWait,
StateNomal,
StateTest
}
private IContainer components = null;
private TableLayoutPanel tableLayoutPanel1;
private TableLayoutPanel tableLayoutPanel2;
private TableLayoutPanel tableLayoutPanel3;
private GroupBox groupBoxDataReceive;
private GroupBox groupBoxDataTrans;
private GroupBox groupBoxCommand;
private GroupBox groupBoxComCommand;
private TextBox textBoxData16;
private TextBox textBoxData15;
private TextBox textBoxData14;
private TextBox textBoxData13;
private TextBox textBoxData12;
private TextBox textBoxData11;
private TextBox textBoxData10;
private TextBox textBoxData9;
private TextBox textBoxData8;
private TextBox textBoxData7;
private TextBox textBoxData6;
private TextBox textBoxData5;
private TextBox textBoxData4;
private TextBox textBoxData3;
private TextBox textBoxData2;
private TextBox textBoxData1;
private Button buttonHalt;
private Button buttonBackup;
private Button buttonIncrease;
private Button buttonDecrease;
private Button button1ValueWrite;
private Button button1ValueRead;
private Button buttonPcdWrite;
private Button buttonPcdRead;
private Button buttonAuth;
private Button buttonSele;
private Button buttonAntiCol;
private Button buttonRequest;
private TextBox textBoxBlockAddr;
private TextBox textBoxGoalAddr;
private TextBox textBoxSourceAddr;
private Label label4;
private Label label3;
private Label label2;
private TextBox textBoxValue;
private Label label1;
private Button buttonDataWrite;
private Button buttonDataRead;
private Button buttonIDRead;
private GroupBox groupBoxPassword;
private RadioButton radioButtonPassB;
private RadioButton radioButtonPassA;
private TextBox textBoxPassword6;
private TextBox textBoxPassword5;
private TextBox textBoxPassword4;
private TextBox textBoxPassword3;
private TextBox textBoxPassword2;
private TextBox textBoxPassword1;
private PictureBox pictureBox1;
private GroupBox groupBoxSerialPort;
private Button buttonOpenClose;
private Button buttonRefresh;
private ComboBox comboBoxSerialPort;
private GroupBox groupBoxStateSele;
private Button buttonTest;
private Button buttonPCState;
private SerialPort serialPort1;
private Button buttonTextClear;
private RichTextBox richTextBoxDataReceived;
private Label label5;
private byte[] SerialSendBuff = new byte[30];
private byte[] CardType;
private byte[] SeriesNum;
private byte[] Password;
private byte[] BlockData;
private byte[] SendData;
private byte[] PcdValue;
private ProState CurrentState;
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
((IDisposable)components).Dispose();
}
((Form)this).Dispose(disposing);
}
private void InitializeComponent()
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Expected O, but got Unknown
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Expected O, but got Unknown
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Expected O, but got Unknown
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_003d: Expected O, but got Unknown
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_0048: Expected O, but got Unknown
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Expected O, but got Unknown
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Expected O, but got Unknown
//IL_005f: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Expected O, but got Unknown
//IL_006a: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Expected O, but got Unknown
//IL_0075: Unknown result type (might be due to invalid IL or missing references)
//IL_007f: Expected O, but got Unknown
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Expected O, but got Unknown
//IL_008b: Unknown result type (might be due to invalid IL or missing references)
//IL_0095: Expected O, but got Unknown
//IL_0096: Unknown result type (might be due to invalid IL or missing references)
//IL_00a0: Expected O, but got Unknown
//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
//IL_00ab: Expected O, but got Unknown
//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: Expected O, but got Unknown
//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
//IL_00c1: Expected O, but got Unknown
//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
//IL_00cc: Expected O, but got Unknown
//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
//IL_00d7: Expected O, but got Unknown
//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
//IL_00e2: Expected O, but got Unknown
//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
//IL_00ed: Expected O, but got Unknown
//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
//IL_00f8: Expected O, but got Unknown
//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
//IL_0103: Expected O, but got Unknown
//IL_0104: Unknown result type (might be due to invalid IL or missing references)
//IL_010e: Expected O, but got Unknown
//IL_010f: Unknown result type (might be due to invalid IL or missing references)
//IL_0119: Expected O, but got Unknown
//IL_011a: Unknown result type (might be due to invalid IL or missing references)
//IL_0124: Expected O, but got Unknown
//IL_0125: Unknown result type (might be due to invalid IL or missing references)
//IL_012f: Expected O, but got Unknown
//IL_0130: Unknown result type (might be due to invalid IL or missing references)
//IL_013a: Expected O, but got Unknown
//IL_013b: Unknown result type (might be due to invalid IL or missing references)
//IL_0145: Expected O, but got Unknown
//IL_0146: Unknown result type (might be due to invalid IL or missing references)
//IL_0150: Expected O, but got Unknown
//IL_0151: Unknown result type (might be due to invalid IL or missing references)
//IL_015b: Expected O, but got Unknown
//IL_015c: Unknown result type (might be due to invalid IL or missing references)
//IL_0166: Expected O, but got Unknown
//IL_0167: Unknown result type (might be due to invalid IL or missing references)
//IL_0171: Expected O, but got Unknown
//IL_0172: Unknown result type (might be due to invalid IL or missing references)
//IL_017c: Expected O, but got Unknown
//IL_017d: Unknown result type (might be due to invalid IL or missing references)
//IL_0187: Expected O, but got Unknown
//IL_0188: Unknown result type (might be due to invalid IL or missing references)
//IL_0192: Expected O, but got Unknown
//IL_0193: Unknown result type (might be due to invalid IL or missing references)
//IL_019d: Expected O, but got Unknown
//IL_019e: Unknown result type (might be due to invalid IL or missing references)
//IL_01a8: Expected O, but got Unknown
//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
//IL_01b3: Expected O, but got Unknown
//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
//IL_01be: Expected O, but got Unknown
//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
//IL_01c9: Expected O, but got Unknown
//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
//IL_01d4: Expected O, but got Unknown
//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
//IL_01df: Expected O, but got Unknown
//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
//IL_01ea: Expected O, but got Unknown
//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
//IL_01f5: Expected O, but got Unknown
//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
//IL_0200: Expected O, but got Unknown
//IL_0201: Unknown result type (might be due to invalid IL or missing references)
//IL_020b: Expected O, but got Unknown
//IL_020c: Unknown result type (might be due to invalid IL or missing references)
//IL_0216: Expected O, but got Unknown
//IL_0217: Unknown result type (might be due to invalid IL or missing references)
//IL_0221: Expected O, but got Unknown
//IL_0222: Unknown result type (might be due to invalid IL or missing references)
//IL_022c: Expected O, but got Unknown
//IL_022d: Unknown result type (might be due to invalid IL or missing references)
//IL_0237: Expected O, but got Unknown
//IL_0238: Unknown result type (might be due to invalid IL or missing references)
//IL_0242: Expected O, but got Unknown
//IL_0243: Unknown result type (might be due to invalid IL or missing references)
//IL_024d: Expected O, but got Unknown
//IL_024e: Unknown result type (might be due to invalid IL or missing references)
//IL_0258: Expected O, but got Unknown
//IL_0259: Unknown result type (might be due to invalid IL or missing references)
//IL_0263: Expected O, but got Unknown
//IL_0264: Unknown result type (might be due to invalid IL or missing references)
//IL_026e: Expected O, but got Unknown
//IL_026f: Unknown result type (might be due to invalid IL or missing references)
//IL_0279: Expected O, but got Unknown
//IL_027a: Unknown result type (might be due to invalid IL or missing references)
//IL_0284: Expected O, but got Unknown
//IL_0285: Unknown result type (might be due to invalid IL or missing references)
//IL_028f: Expected O, but got Unknown
//IL_0290: Unknown result type (might be due to invalid IL or missing references)
//IL_029a: Expected O, but got Unknown
//IL_029b: Unknown result type (might be due to invalid IL or missing references)
//IL_02a5: Expected O, but got Unknown
//IL_02a6: Unknown result type (might be due to invalid IL or missing references)
//IL_02b0: Expected O, but got Unknown
//IL_02b1: Unknown result type (might be due to invalid IL or missing references)
//IL_02bb: Expected O, but got Unknown
//IL_02bc: Unknown result type (might be due to invalid IL or missing references)
//IL_02c6: Expected O, but got Unknown
//IL_02c7: Unknown result type (might be due to invalid IL or missing references)
//IL_02d1: Expected O, but got Unknown
//IL_02d2: Unknown result type (might be due to invalid IL or missing references)
//IL_02dc: Expected O, but got Unknown
//IL_02dd: Unknown result type (might be due to invalid IL or missing references)
//IL_02e7: Expected O, but got Unknown
//IL_02e8: Unknown result type (might be due to invalid IL or missing references)
//IL_02f2: Expected O, but got Unknown
//IL_02f9: Unknown result type (might be due to invalid IL or missing references)
//IL_0303: Expected O, but got Unknown
//IL_03ac: Unknown result type (might be due to invalid IL or missing references)
//IL_03b6: Expected O, but got Unknown
//IL_03c8: Unknown result type (might be due to invalid IL or missing references)
//IL_03d2: Expected O, but got Unknown
//IL_041a: Unknown result type (might be due to invalid IL or missing references)
//IL_0454: Unknown result type (might be due to invalid IL or missing references)
//IL_045e: Expected O, but got Unknown
//IL_0470: Unknown result type (might be due to invalid IL or missing references)
//IL_047a: Expected O, but got Unknown
//IL_048b: Unknown result type (might be due to invalid IL or missing references)
//IL_04c1: Unknown result type (might be due to invalid IL or missing references)
//IL_04cb: Expected O, but got Unknown
//IL_0545: Unknown result type (might be due to invalid IL or missing references)
//IL_057f: Unknown result type (might be due to invalid IL or missing references)
//IL_0589: Expected O, but got Unknown
//IL_059b: Unknown result type (might be due to invalid IL or missing references)
//IL_05a5: Expected O, but got Unknown
//IL_05b7: Unknown result type (might be due to invalid IL or missing references)
//IL_05c1: Expected O, but got Unknown
//IL_05d3: Unknown result type (might be due to invalid IL or missing references)
//IL_05dd: Expected O, but got Unknown
//IL_05ee: Unknown result type (might be due to invalid IL or missing references)
//IL_0660: Unknown result type (might be due to invalid IL or missing references)
//IL_0689: Unknown result type (might be due to invalid IL or missing references)
//IL_06d6: Unknown result type (might be due to invalid IL or missing references)
//IL_06fc: Unknown result type (might be due to invalid IL or missing references)
//IL_0754: Unknown result type (might be due to invalid IL or missing references)
//IL_077a: Unknown result type (might be due to invalid IL or missing references)
//IL_07df: Unknown result type (might be due to invalid IL or missing references)
//IL_0805: Unknown result type (might be due to invalid IL or missing references)
//IL_092b: Unknown result type (might be due to invalid IL or missing references)
//IL_0957: Unknown result type (might be due to invalid IL or missing references)
//IL_09a4: Unknown result type (might be due to invalid IL or missing references)
//IL_09ca: Unknown result type (might be due to invalid IL or missing references)
//IL_0a24: Unknown result type (might be due to invalid IL or missing references)
//IL_0a4a: Unknown result type (might be due to invalid IL or missing references)
//IL_0a9a: Unknown result type (might be due to invalid IL or missing references)
//IL_0acd: Unknown result type (might be due to invalid IL or missing references)
//IL_0b00: Unknown result type (might be due to invalid IL or missing references)
//IL_0b33: Unknown result type (might be due to invalid IL or missing references)
//IL_0b66: Unknown result type (might be due to invalid IL or missing references)
//IL_0b99: Unknown result type (might be due to invalid IL or missing references)
//IL_0bcc: Unknown result type (might be due to invalid IL or missing references)
//IL_0bff: Unknown result type (might be due to invalid IL or missing references)
//IL_0c32: Unknown result type (might be due to invalid IL or missing references)
//IL_0c65: Unknown result type (might be due to invalid IL or missing references)
//IL_0c98: Unknown result type (might be due to invalid IL or missing references)
//IL_0ccb: Unknown result type (might be due to invalid IL or missing references)
//IL_0d12: Unknown result type (might be due to invalid IL or missing references)
//IL_0d1c: Expected O, but got Unknown
//IL_0d29: Unknown result type (might be due to invalid IL or missing references)
//IL_0d55: Unknown result type (might be due to invalid IL or missing references)
//IL_0e20: Unknown result type (might be due to invalid IL or missing references)
//IL_0e49: Unknown result type (might be due to invalid IL or missing references)
//IL_0e89: Unknown result type (might be due to invalid IL or missing references)
//IL_0eaf: Unknown result type (might be due to invalid IL or missing references)
//IL_0f07: Unknown result type (might be due to invalid IL or missing references)
//IL_0f2d: Unknown result type (might be due to invalid IL or missing references)
//IL_0f99: Unknown result type (might be due to invalid IL or missing references)
//IL_0fa3: Expected O, but got Unknown
//IL_0fb5: Unknown result type (might be due to invalid IL or missing references)
//IL_0fbf: Expected O, but got Unknown
//IL_103d: Unknown result type (might be due to invalid IL or missing references)
//IL_1077: Unknown result type (might be due to invalid IL or missing references)
//IL_1081: Expected O, but got Unknown
//IL_1093: Unknown result type (might be due to invalid IL or missing references)
//IL_109d: Expected O, but got Unknown
//IL_10af: Unknown result type (might be due to invalid IL or missing references)
//IL_10b9: Expected O, but got Unknown
//IL_10cb: Unknown result type (might be due to invalid IL or missing references)
//IL_10d5: Expected O, but got Unknown
//IL_10e6: Unknown result type (might be due to invalid IL or missing references)
//IL_114e: Unknown result type (might be due to invalid IL or missing references)
//IL_117a: Unknown result type (might be due to invalid IL or missing references)
//IL_11b6: Unknown result type (might be due to invalid IL or missing references)
//IL_11cb: Unknown result type (might be due to invalid IL or missing references)
//IL_1204: Unknown result type (might be due to invalid IL or missing references)
//IL_1252: Unknown result type (might be due to invalid IL or missing references)
//IL_1278: Unknown result type (might be due to invalid IL or missing references)
//IL_1473: Unknown result type (might be due to invalid IL or missing references)
//IL_149c: Unknown result type (might be due to invalid IL or missing references)
//IL_14ec: Unknown result type (might be due to invalid IL or missing references)
//IL_1512: Unknown result type (might be due to invalid IL or missing references)
//IL_1549: Unknown result type (might be due to invalid IL or missing references)
//IL_157c: Unknown result type (might be due to invalid IL or missing references)
//IL_15b3: Unknown result type (might be due to invalid IL or missing references)
//IL_15e6: Unknown result type (might be due to invalid IL or missing references)
//IL_161d: Unknown result type (might be due to invalid IL or missing references)
//IL_1650: Unknown result type (might be due to invalid IL or missing references)
//IL_1687: Unknown result type (might be due to invalid IL or missing references)
//IL_16ba: Unknown result type (might be due to invalid IL or missing references)
//IL_16f1: Unknown result type (might be due to invalid IL or missing references)
//IL_1724: Unknown result type (might be due to invalid IL or missing references)
//IL_175b: Unknown result type (might be due to invalid IL or missing references)
//IL_178e: Unknown result type (might be due to invalid IL or missing references)
//IL_17c5: Unknown result type (might be due to invalid IL or missing references)
//IL_17f8: Unknown result type (might be due to invalid IL or missing references)
//IL_182f: Unknown result type (might be due to invalid IL or missing references)
//IL_1862: Unknown result type (might be due to invalid IL or missing references)
//IL_1899: Unknown result type (might be due to invalid IL or missing references)
//IL_18cc: Unknown result type (might be due to invalid IL or missing references)
//IL_1903: Unknown result type (might be due to invalid IL or missing references)
//IL_1936: Unknown result type (might be due to invalid IL or missing references)
//IL_196d: Unknown result type (might be due to invalid IL or missing references)
//IL_19a0: Unknown result type (might be due to invalid IL or missing references)
//IL_19d7: Unknown result type (might be due to invalid IL or missing references)
//IL_1a0a: Unknown result type (might be due to invalid IL or missing references)
//IL_1a41: Unknown result type (might be due to invalid IL or missing references)
//IL_1a74: Unknown result type (might be due to invalid IL or missing references)
//IL_1aa8: Unknown result type (might be due to invalid IL or missing references)
//IL_1adb: Unknown result type (might be due to invalid IL or missing references)
//IL_1b0e: Unknown result type (might be due to invalid IL or missing references)
//IL_1b41: Unknown result type (might be due to invalid IL or missing references)
//IL_1b74: Unknown result type (might be due to invalid IL or missing references)
//IL_1ba7: Unknown result type (might be due to invalid IL or missing references)
//IL_1d94: Unknown result type (might be due to invalid IL or missing references)
//IL_1dbd: Unknown result type (might be due to invalid IL or missing references)
//IL_1e00: Unknown result type (might be due to invalid IL or missing references)
//IL_1e34: Unknown result type (might be due to invalid IL or missing references)
//IL_1e77: Unknown result type (might be due to invalid IL or missing references)
//IL_1e9d: Unknown result type (might be due to invalid IL or missing references)
//IL_1ed3: Unknown result type (might be due to invalid IL or missing references)
//IL_1f06: Unknown result type (might be due to invalid IL or missing references)
//IL_1f3a: Unknown result type (might be due to invalid IL or missing references)
//IL_1f6d: Unknown result type (might be due to invalid IL or missing references)
//IL_1fb1: Unknown result type (might be due to invalid IL or missing references)
//IL_1fd7: Unknown result type (might be due to invalid IL or missing references)
//IL_2018: Unknown result type (might be due to invalid IL or missing references)
//IL_203e: Unknown result type (might be due to invalid IL or missing references)
//IL_2075: Unknown result type (might be due to invalid IL or missing references)
//IL_209b: Unknown result type (might be due to invalid IL or missing references)
//IL_20f7: Unknown result type (might be due to invalid IL or missing references)
//IL_211d: Unknown result type (might be due to invalid IL or missing references)
//IL_2179: Unknown result type (might be due to invalid IL or missing references)
//IL_219f: Unknown result type (might be due to invalid IL or missing references)
//IL_21fb: Unknown result type (might be due to invalid IL or missing references)
//IL_2221: Unknown result type (might be due to invalid IL or missing references)
//IL_2286: Unknown result type (might be due to invalid IL or missing references)
//IL_2290: Expected O, but got Unknown
//IL_229b: Unknown result type (might be due to invalid IL or missing references)
//IL_22c1: Unknown result type (might be due to invalid IL or missing references)
//IL_2319: Unknown result type (might be due to invalid IL or missing references)
//IL_233f: Unknown result type (might be due to invalid IL or missing references)
//IL_239a: Unknown result type (might be due to invalid IL or missing references)
//IL_23c0: Unknown result type (might be due to invalid IL or missing references)
//IL_241b: Unknown result type (might be due to invalid IL or missing references)
//IL_2441: Unknown result type (might be due to invalid IL or missing references)
//IL_249c: Unknown result type (might be due to invalid IL or missing references)
//IL_24c2: Unknown result type (might be due to invalid IL or missing references)
//IL_251d: Unknown result type (might be due to invalid IL or missing references)
//IL_2543: Unknown result type (might be due to invalid IL or missing references)
//IL_259b: Unknown result type (might be due to invalid IL or missing references)
//IL_25c1: Unknown result type (might be due to invalid IL or missing references)
//IL_2619: Unknown result type (might be due to invalid IL or missing references)
//IL_263f: Unknown result type (might be due to invalid IL or missing references)
//IL_2726: Unknown result type (might be due to invalid IL or missing references)
//IL_274f: Unknown result type (might be due to invalid IL or missing references)
//IL_2792: Unknown result type (might be due to invalid IL or missing references)
//IL_27b8: Unknown result type (might be due to invalid IL or missing references)
//IL_2813: Unknown result type (might be due to invalid IL or missing references)
//IL_2846: Unknown result type (might be due to invalid IL or missing references)
//IL_287d: Unknown result type (might be due to invalid IL or missing references)
//IL_28a3: Unknown result type (might be due to invalid IL or missing references)
//IL_28fb: Unknown result type (might be due to invalid IL or missing references)
//IL_2921: Unknown result type (might be due to invalid IL or missing references)
//IL_2989: Unknown result type (might be due to invalid IL or missing references)
//IL_29af: Unknown result type (might be due to invalid IL or missing references)
//IL_29f7: Unknown result type (might be due to invalid IL or missing references)
//IL_2a01: Expected O, but got Unknown
//IL_2a0d: Unknown result type (might be due to invalid IL or missing references)
//IL_2a21: Unknown result type (might be due to invalid IL or missing references)
//IL_2a37: Unknown result type (might be due to invalid IL or missing references)
//IL_2a60: Unknown result type (might be due to invalid IL or missing references)
//IL_2a6a: Expected O, but got Unknown
//IL_2a7e: Unknown result type (might be due to invalid IL or missing references)
//IL_2a94: Unknown result type (might be due to invalid IL or missing references)
components = (IContainer)(object)new Container();
ComponentResourceManager val = (ComponentResourceManager)(object)new ComponentResourceManager(typeof(MainForm));
tableLayoutPanel1 = (TableLayoutPanel)(object)new TableLayoutPanel();
tableLayoutPanel2 = (TableLayoutPanel)(object)new TableLayoutPanel();
groupBoxSerialPort = (GroupBox)(object)new GroupBox();
buttonOpenClose = (Button)(object)new Button();
buttonRefresh = (Button)(object)new Button();
comboBoxSerialPort = (ComboBox)(object)new ComboBox();
groupBoxPassword = (GroupBox)(object)new GroupBox();
radioButtonPassB = (RadioButton)(object)new RadioButton();
radioButtonPassA = (RadioButton)(object)new RadioButton();
textBoxPassword6 = (TextBox)(object)new TextBox();
textBoxPassword5 = (TextBox)(object)new TextBox();
textBoxPassword4 = (TextBox)(object)new TextBox();
textBoxPassword3 = (TextBox)(object)new TextBox();
textBoxPassword2 = (TextBox)(object)new TextBox();
textBoxPassword1 = (TextBox)(object)new TextBox();
pictureBox1 = (PictureBox)(object)new PictureBox();
groupBoxStateSele = (GroupBox)(object)new GroupBox();
buttonTest = (Button)(object)new Button();
buttonPCState = (Button)(object)new Button();
tableLayoutPanel3 = (TableLayoutPanel)(object)new TableLayoutPanel();
groupBoxDataReceive = (GroupBox)(object)new GroupBox();
richTextBoxDataReceived = (RichTextBox)(object)new RichTextBox();
buttonTextClear = (Button)(object)new Button();
groupBoxDataTrans = (GroupBox)(object)new GroupBox();
label5 = (Label)(object)new Label();
textBoxData16 = (TextBox)(object)new TextBox();
textBoxData15 = (TextBox)(object)new TextBox();
textBoxData14 = (TextBox)(object)new TextBox();
textBoxData13 = (TextBox)(object)new TextBox();
textBoxData12 = (TextBox)(object)new TextBox();
textBoxData11 = (TextBox)(object)new TextBox();
textBoxData10 = (TextBox)(object)new TextBox();
textBoxData9 = (TextBox)(object)new TextBox();
textBoxData8 = (TextBox)(object)new TextBox();
textBoxData7 = (TextBox)(object)new TextBox();
textBoxData6 = (TextBox)(object)new TextBox();
textBoxData5 = (TextBox)(object)new TextBox();
textBoxData4 = (TextBox)(object)new TextBox();
textBoxData3 = (TextBox)(object)new TextBox();
textBoxData2 = (TextBox)(object)new TextBox();
textBoxData1 = (TextBox)(object)new TextBox();
groupBoxCommand = (GroupBox)(object)new GroupBox();
textBoxValue = (TextBox)(object)new TextBox();
label1 = (Label)(object)new Label();
textBoxGoalAddr = (TextBox)(object)new TextBox();
textBoxSourceAddr = (TextBox)(object)new TextBox();
label3 = (Label)(object)new Label();
label2 = (Label)(object)new Label();
buttonHalt = (Button)(object)new Button();
buttonBackup = (Button)(object)new Button();
buttonIncrease = (Button)(object)new Button();
buttonDecrease = (Button)(object)new Button();
button1ValueWrite = (Button)(object)new Button();
button1ValueRead = (Button)(object)new Button();
buttonPcdWrite = (Button)(object)new Button();
buttonPcdRead = (Button)(object)new Button();
buttonAuth = (Button)(object)new Button();
buttonSele = (Button)(object)new Button();
buttonAntiCol = (Button)(object)new Button();
buttonRequest = (Button)(object)new Button();
groupBoxComCommand = (GroupBox)(object)new GroupBox();
buttonDataWrite = (Button)(object)new Button();
textBoxBlockAddr = (TextBox)(object)new TextBox();
buttonDataRead = (Button)(object)new Button();
buttonIDRead = (Button)(object)new Button();
label4 = (Label)(object)new Label();
serialPort1 = (SerialPort)(object)new SerialPort(components);
((Control)tableLayoutPanel1).SuspendLayout();
((Control)tableLayoutPanel2).SuspendLayout();
((Control)groupBoxSerialPort).SuspendLayout();
((Control)groupBoxPassword).SuspendLayout();
((ISupportInitialize)pictureBox1).BeginInit();
((Control)groupBoxStateSele).SuspendLayout();
((Control)tableLayoutPanel3).SuspendLayout();
((Control)groupBoxDataReceive).SuspendLayout();
((Control)groupBoxDataTrans).SuspendLayout();
((Control)groupBoxCommand).SuspendLayout();
((Control)groupBoxComCommand).SuspendLayout();
((Control)this).SuspendLayout();
tableLayoutPanel1.set_ColumnCount(2);
tableLayoutPanel1.get_ColumnStyles().Add((ColumnStyle)(object)new ColumnStyle((SizeType)2, 26.53595f));
tableLayoutPanel1.get_ColumnStyles().Add((ColumnStyle)(object)new ColumnStyle((SizeType)2, 73.46405f));
tableLayoutPanel1.get_Controls().Add((Control)(object)tableLayoutPanel2, 0, 0);
tableLayoutPanel1.get_Controls().Add((Control)(object)tableLayoutPanel3, 1, 0);
((Control)tableLayoutPanel1).set_Dock((DockStyle)5);
((Control)tableLayoutPanel1).set_Location(new Point(0, 0));
((Control)tableLayoutPanel1).set_Name("tableLayoutPanel1");
tableLayoutPanel1.set_RowCount(1);
tableLayoutPanel1.get_RowStyles().Add((RowStyle)(object)new RowStyle((SizeType)2, 100f));
tableLayoutPanel1.get_RowStyles().Add((RowStyle)(object)new RowStyle((SizeType)1, 529f));
((Control)tableLayoutPanel1).set_Size(new Size(765, 508));
((Control)tableLayoutPanel1).set_TabIndex(0);
tableLayoutPanel2.set_ColumnCount(1);
tableLayoutPanel2.get_ColumnStyles().Add((ColumnStyle)(object)new ColumnStyle((SizeType)2, 100f));
tableLayoutPanel2.get_Controls().Add((Control)(object)groupBoxSerialPort, 0, 0);
tableLayoutPanel2.get_Controls().Add((Control)(object)groupBoxPassword, 0, 2);
tableLayoutPanel2.get_Controls().Add((Control)(object)pictureBox1, 0, 3);
tableLayoutPanel2.get_Controls().Add((Control)(object)groupBoxStateSele, 0, 1);
((Control)tableLayoutPanel2).set_Dock((DockStyle)5);
((Control)tableLayoutPanel2).set_Location(new Point(3, 3));
((Control)tableLayoutPanel2).set_Name("tableLayoutPanel2");
tableLayoutPanel2.set_RowCount(4);
tableLayoutPanel2.get_RowStyles().Add((RowStyle)(object)new RowStyle((SizeType)2, 22.70916f));
tableLayoutPanel2.get_RowStyles().Add((RowStyle)(object)new RowStyle((SizeType)2, 16.13546f));
tableLayoutPanel2.get_RowStyles().Add((RowStyle)(object)new RowStyle((SizeType)2, 31.67331f));
tableLayoutPanel2.get_RowStyles().Add((RowStyle)(object)new RowStyle((SizeType)2, 29.28287f));
((Control)tableLayoutPanel2).set_Size(new Size(197, 502));
((Control)tableLayoutPanel2).set_TabIndex(0);
((Control)groupBoxSerialPort).get_Controls().Add((Control)(object)buttonOpenClose);
((Control)groupBoxSerialPort).get_Controls().Add((Control)(object)buttonRefresh);
((Control)groupBoxSerialPort).get_Controls().Add((Control)(object)comboBoxSerialPort);
((Control)groupBoxSerialPort).set_Dock((DockStyle)5);
((Control)groupBoxSerialPort).set_Location(new Point(3, 3));
((Control)groupBoxSerialPort).set_Name("groupBoxSerialPort");
((Control)groupBoxSerialPort).set_Size(new Size(191, 108));
((Control)groupBoxSerialPort).set_TabIndex(0);
groupBoxSerialPort.set_TabStop(false);
((Control)groupBoxSerialPort).set_Text("Serial Port");
((Control)buttonOpenClose).set_Enabled(false);
((Control)buttonOpenClose).set_Location(new Point(100, 66));
((Control)buttonOpenClose).set_Name("buttonOpenClose");
((Control)buttonOpenClose).set_Size(new Size(75, 23));
((Control)buttonOpenClose).set_TabIndex(2);
((Control)buttonOpenClose).set_Text("&Open");
((ButtonBase)buttonOpenClose).set_UseVisualStyleBackColor(true);
((Control)buttonOpenClose).add_Click((EventHandler)buttonOpenClose_Click);
((Control)buttonRefresh).set_Location(new Point(19, 66));
((Control)buttonRefresh).set_Name("buttonRefresh");
((Control)buttonRefresh).set_Size(new Size(75, 23));
((Control)buttonRefresh).set_TabIndex(1);
((Control)buttonRefresh).set_Text("&Refresh");
((ButtonBase)buttonRefresh).set_UseVisualStyleBackColor(true);
((Control)buttonRefresh).add_Click((EventHandler)buttonRefresh_Click);
((ListControl)comboBoxSerialPort).set_FormattingEnabled(true);
((Control)comboBoxSerialPort).set_Location(new Point(35, 29));
((Control)comboBoxSerialPort).set_Name("comboBoxSerialPort");
((Control)comboBoxSerialPort).set_Size(new Size(121, 20));
((Control)comboBoxSerialPort).set_TabIndex(0);
comboBoxSerialPort.add_SelectedIndexChanged((EventHandler)comboBoxSerialPort_SelectedIndexChanged);
((Control)comboBoxSerialPort).add_TextChanged((EventHandler)comboBoxSerialPort_TextChanged);
((Control)groupBoxPassword).get_Controls().Add((Control)(object)radioButtonPassB);
((Control)groupBoxPassword).get_Controls().Add((Control)(object)radioButtonPassA);
((Control)groupBoxPassword).get_Controls().Add((Control)(object)textBoxPassword6);
((Control)groupBoxPassword).get_Controls().Add((Control)(object)textBoxPassword5);
((Control)groupBoxPassword).get_Controls().Add((Control)(object)textBoxPassword4);
((Control)groupBoxPassword).get_Controls().Add((Control)(object)textBoxPassword3);
((Control)groupBoxPassword).get_Controls().Add((Control)(object)textBoxPassword2);
((Control)groupBoxPassword).get_Controls().Add((Control)(object)textBoxPassword1);
((Control)groupBoxPassword).set_Dock((DockStyle)5);
((Control)groupBoxPassword).set_Enabled(false);
((Control)groupBoxPassword).set_Location(new Point(3, 198));
((Control)groupBoxPassword).set_Name("groupBoxPassword");
((Control)groupBoxPassword).set_Size(new Size(191, 153));
((Control)groupBoxPassword).set_TabIndex(1);
groupBoxPassword.set_TabStop(false);
((Control)groupBoxPassword).set_Text("Password");
((Control)radioButtonPassB).set_AutoSize(true);
((Control)radioButtonPassB).set_Location(new Point(44, 99));
((Control)radioButtonPassB).set_Name("radioButtonPassB");
((Control)radioButtonPassB).set_Size(new Size(83, 16));
((Control)radioButtonPassB).set_TabIndex(7);
((Control)radioButtonPassB).set_Text("Password B");
((ButtonBase)radioButtonPassB).set_UseVisualStyleBackColor(true);
((Control)radioButtonPassA).set_AutoSize(true);
radioButtonPassA.set_Checked(true);
((Control)radioButtonPassA).set_Location(new Point(44, 77));
((Control)radioButtonPassA).set_Name("radioButtonPassA");
((Control)radioButtonPassA).set_Size(new Size(83, 16));
((Control)radioButtonPassA).set_TabIndex(6);
radioButtonPassA.set_TabStop(true);
((Control)radioButtonPassA).set_Text("Password A");
((ButtonBase)radioButtonPassA).set_UseVisualStyleBackColor(true);
((Control)textBoxPassword6).set_Location(new Point(144, 39));
((TextBoxBase)textBoxPassword6).set_MaxLength(2);
((Control)textBoxPassword6).set_Name("textBoxPassword6");
((Control)textBoxPassword6).set_Size(new Size(19, 21));
((Control)textBoxPassword6).set_TabIndex(5);
((Control)textBoxPassword6).set_Text("FF");
((Control)textBoxPassword5).set_Location(new Point(119, 39));
((TextBoxBase)textBoxPassword5).set_MaxLength(2);
((Control)textBoxPassword5).set_Name("textBoxPassword5");
((Control)textBoxPassword5).set_Size(new Size(19, 21));
((Control)textBoxPassword5).set_TabIndex(4);
((Control)textBoxPassword5).set_Text("FF");
((Control)textBoxPassword4).set_Location(new Point(94, 39));
((TextBoxBase)textBoxPassword4).set_MaxLength(2);
((Control)textBoxPassword4).set_Name("textBoxPassword4");
((Control)textBoxPassword4).set_Size(new Size(19, 21));
((Control)textBoxPassword4).set_TabIndex(3);
((Control)textBoxPassword4).set_Text("FF");
((Control)textBoxPassword3).set_Location(new Point(69, 39));
((TextBoxBase)textBoxPassword3).set_MaxLength(2);
((Control)textBoxPassword3).set_Name("textBoxPassword3");
((Control)textBoxPassword3).set_Size(new Size(19, 21));
((Control)textBoxPassword3).set_TabIndex(2);
((Control)textBoxPassword3).set_Text("FF");
((Control)textBoxPassword2).set_Location(new Point(44, 39));
((TextBoxBase)textBoxPassword2).set_MaxLength(2);
((Control)textBoxPassword2).set_Name("textBoxPassword2");
((Control)textBoxPassword2).set_Size(new Size(19, 21));
((Control)textBoxPassword2).set_TabIndex(1);
((Control)textBoxPassword2).set_Text("FF");
((Control)textBoxPassword1).set_Location(new Point(19, 39));
((TextBoxBase)textBoxPassword1).set_MaxLength(2);
((Control)textBoxPassword1).set_Name("textBoxPassword1");
((Control)textBoxPassword1).set_Size(new Size(19, 21));
((Control)textBoxPassword1).set_TabIndex(0);
((Control)textBoxPassword1).set_Text("FF");
((Control)pictureBox1).set_Dock((DockStyle)5);
pictureBox1.set_Image((Image)(object)(Image)((ResourceManager)(object)val).GetObject("pictureBox1.Image"));
((Control)pictureBox1).set_Location(new Point(3, 357));
((Control)pictureBox1).set_Name("pictureBox1");
((Control)pictureBox1).set_Size(new Size(191, 142));
pictureBox1.set_SizeMode((PictureBoxSizeMode)4);
pictureBox1.set_TabIndex(2);
pictureBox1.set_TabStop(false);
((Control)pictureBox1).add_Click((EventHandler)pictureBox1_Click);
((Control)pictureBox1).add_MouseEnter((EventHandler)pictureBox1_MouseEnter);
((Control)pictureBox1).add_MouseLeave((EventHandler)pictureBox1_MouseLeave);
((Control)groupBoxStateSele).get_Controls().Add((Control)(object)buttonTest);
((Control)groupBoxStateSele).get_Controls().Add((Control)(object)buttonPCState);
((Control)groupBoxStateSele).set_Dock((DockStyle)5);
((Control)groupBoxStateSele).set_Enabled(false);
((Control)groupBoxStateSele).set_Location(new Point(3, 117));
((Control)groupBoxStateSele).set_Name("groupBoxStateSele");
((Control)groupBoxStateSele).set_Size(new Size(191, 75));
((Control)groupBoxStateSele).set_TabIndex(3);
groupBoxStateSele.set_TabStop(false);
((Control)groupBoxStateSele).set_Text("State Select");
((Control)buttonTest).set_Location(new Point(100, 30));
((Control)buttonTest).set_Name("buttonTest");
((Control)buttonTest).set_Size(new Size(75, 23));
((Control)buttonTest).set_TabIndex(1);
((Control)buttonTest).set_Text("&Test");
((ButtonBase)buttonTest).set_UseVisualStyleBackColor(true);
((Control)buttonTest).add_Click((EventHandler)buttonTest_Click);
((Control)buttonPCState).set_Location(new Point(19, 30));
((Control)buttonPCState).set_Name("buttonPCState");
((Control)buttonPCState).set_Size(new Size(75, 23));
((Control)buttonPCState).set_TabIndex(0);
((Control)buttonPCState).set_Text("&Normal");
((ButtonBase)buttonPCState).set_UseVisualStyleBackColor(true);
((Control)buttonPCState).add_Click((EventHandler)buttonPCState_Click);
tableLayoutPanel3.set_ColumnCount(1);
tableLayoutPanel3.get_ColumnStyles().Add((ColumnStyle)(object)new ColumnStyle((SizeType)2, 100f));
tableLayoutPanel3.get_ColumnStyles().Add((ColumnStyle)(object)new ColumnStyle((SizeType)1, 20f));
tableLayoutPanel3.get_Controls().Add((Control)(object)groupBoxDataReceive, 0, 0);
tableLayoutPanel3.get_Controls().Add((Control)(object)groupBoxDataTrans, 0, 1);
tableLayoutPanel3.get_Controls().Add((Control)(object)groupBoxCommand, 0, 2);
tableLayoutPanel3.get_Controls().Add((Control)(object)groupBoxComCommand, 0, 3);
((Control)tableLayoutPanel3).set_Dock((DockStyle)5);
((Control)tableLayoutPanel3).set_Location(new Point(206, 3));
((Control)tableLayoutPanel3).set_Name("tableLayoutPanel3");
tableLayoutPanel3.set_RowCount(4);
tableLayoutPanel3.get_RowStyles().Add((RowStyle)(object)new RowStyle((SizeType)2, 46.92144f));
tableLayoutPanel3.get_RowStyles().Add((RowStyle)(object)new RowStyle((SizeType)2, 12.73885f));
tableLayoutPanel3.get_RowStyles().Add((RowStyle)(object)new RowStyle((SizeType)2, 24.30279f));
tableLayoutPanel3.get_RowStyles().Add((RowStyle)(object)new RowStyle((SizeType)2, 16.53386f));
((Control)tableLayoutPanel3).set_Size(new Size(556, 502));
((Control)tableLayoutPanel3).set_TabIndex(1);
((Control)groupBoxDataReceive).get_Controls().Add((Control)(object)richTextBoxDataReceived);
((Control)groupBoxDataReceive).get_Controls().Add((Control)(object)buttonTextClear);
((Control)groupBoxDataReceive).set_Dock((DockStyle)5);
((Control)groupBoxDataReceive).set_Enabled(false);
((Control)groupBoxDataReceive).set_Location(new Point(3, 3));
((Control)groupBoxDataReceive).set_Name("groupBoxDataReceive");
((Control)groupBoxDataReceive).set_Size(new Size(550, 228));
((Control)groupBoxDataReceive).set_TabIndex(0);
groupBoxDataReceive.set_TabStop(false);
((Control)groupBoxDataReceive).set_Text("Data Received");
((Control)richTextBoxDataReceived).set_BackColor(SystemColors.get_Window());
((Control)richTextBoxDataReceived).set_Location(new Point(16, 20));
((Control)richTextBoxDataReceived).set_Name("richTextBoxDataReceived");
((TextBoxBase)richTextBoxDataReceived).set_ReadOnly(true);
((Control)richTextBoxDataReceived).set_Size(new Size(517, 169));
((Control)richTextBoxDataReceived).set_TabIndex(2);
((Control)richTextBoxDataReceived).set_Text("");
((Control)richTextBoxDataReceived).add_TextChanged((EventHandler)richTextBoxDataReceived_TextChanged);
((Control)buttonTextClear).set_Location(new Point(27, 195));
((Control)buttonTextClear).set_Name("buttonTextClear");
((Control)buttonTextClear).set_Size(new Size(75, 23));
((Control)buttonTextClear).set_TabIndex(1);
((Control)buttonTextClear).set_Text("Clear");
((ButtonBase)buttonTextClear).set_UseVisualStyleBackColor(true);
((Control)buttonTextClear).add_Click((EventHandler)buttonTextClear_Click);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)label5);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData16);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData15);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData14);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData13);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData12);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData11);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData10);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData9);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData8);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData7);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData6);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData5);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData4);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData3);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData2);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData1);
((Control)groupBoxDataTrans).set_Dock((DockStyle)5);
((Control)groupBoxDataTrans).set_Enabled(false);
((Control)groupBoxDataTrans).set_Location(new Point(3, 237));
((Control)groupBoxDataTrans).set_Name("groupBoxDataTrans");
((Control)groupBoxDataTrans).set_Size(new Size(550, 57));
((Control)groupBoxDataTrans).set_TabIndex(1);
groupBoxDataTrans.set_TabStop(false);
((Control)groupBoxDataTrans).set_Text("Data Transmit(Hex)");
((Control)label5).set_AutoSize(true);
((Control)label5).set_Location(new Point(460, 23));
((Control)label5).set_Name("label5");
((Control)label5).set_Size(new Size(35, 12));
((Control)label5).set_TabIndex(22);
((Control)label5).set_Text("(Hex)");
((Control)textBoxData16).set_Location(new Point(433, 20));
((TextBoxBase)textBoxData16).set_MaxLength(2);
((Control)textBoxData16).set_Name("textBoxData16");
((Control)textBoxData16).set_Size(new Size(19, 21));
((Control)textBoxData16).set_TabIndex(21);
((Control)textBoxData16).set_Text("FF");
((Control)textBoxData15).set_Location(new Point(408, 20));
((TextBoxBase)textBoxData15).set_MaxLength(2);
((Control)textBoxData15).set_Name("textBoxData15");
((Control)textBoxData15).set_Size(new Size(19, 21));
((Control)textBoxData15).set_TabIndex(20);
((Control)textBoxData15).set_Text("EE");
((Control)textBoxData14).set_Location(new Point(383, 20));
((TextBoxBase)textBoxData14).set_MaxLength(2);
((Control)textBoxData14).set_Name("textBoxData14");
((Control)textBoxData14).set_Size(new Size(19, 21));
((Control)textBoxData14).set_TabIndex(19);
((Control)textBoxData14).set_Text("DD");
((Control)textBoxData13).set_Location(new Point(358, 20));
((TextBoxBase)textBoxData13).set_MaxLength(2);
((Control)textBoxData13).set_Name("textBoxData13");
((Control)textBoxData13).set_Size(new Size(19, 21));
((Control)textBoxData13).set_TabIndex(18);
((Control)textBoxData13).set_Text("CC");
((Control)textBoxData12).set_Location(new Point(333, 20));
((TextBoxBase)textBoxData12).set_MaxLength(2);
((Control)textBoxData12).set_Name("textBoxData12");
((Control)textBoxData12).set_Size(new Size(19, 21));
((Control)textBoxData12).set_TabIndex(17);
((Control)textBoxData12).set_Text("BB");
((Control)textBoxData11).set_Location(new Point(308, 20));
((TextBoxBase)textBoxData11).set_MaxLength(2);
((Control)textBoxData11).set_Name("textBoxData11");
((Control)textBoxData11).set_Size(new Size(19, 21));
((Control)textBoxData11).set_TabIndex(16);
((Control)textBoxData11).set_Text("AA");
((Control)textBoxData10).set_Location(new Point(283, 20));
((TextBoxBase)textBoxData10).set_MaxLength(2);
((Control)textBoxData10).set_Name("textBoxData10");
((Control)textBoxData10).set_Size(new Size(19, 21));
((Control)textBoxData10).set_TabIndex(15);
((Control)textBoxData10).set_Text("99");
((Control)textBoxData9).set_Location(new Point(258, 20));
((TextBoxBase)textBoxData9).set_MaxLength(2);
((Control)textBoxData9).set_Name("textBoxData9");
((Control)textBoxData9).set_Size(new Size(19, 21));
((Control)textBoxData9).set_TabIndex(14);
((Control)textBoxData9).set_Text("88");
((Control)textBoxData8).set_Location(new Point(233, 20));
((TextBoxBase)textBoxData8).set_MaxLength(2);
((Control)textBoxData8).set_Name("textBoxData8");
((Control)textBoxData8).set_Size(new Size(19, 21));
((Control)textBoxData8).set_TabIndex(13);
((Control)textBoxData8).set_Text("77");
((Control)textBoxData7).set_Location(new Point(208, 20));
((TextBoxBase)textBoxData7).set_MaxLength(2);
((Control)textBoxData7).set_Name("textBoxData7");
((Control)textBoxData7).set_Size(new Size(19, 21));
((Control)textBoxData7).set_TabIndex(12);
((Control)textBoxData7).set_Text("66");
((Control)textBoxData6).set_Location(new Point(183, 20));
((TextBoxBase)textBoxData6).set_MaxLength(2);
((Control)textBoxData6).set_Name("textBoxData6");
((Control)textBoxData6).set_Size(new Size(19, 21));
((Control)textBoxData6).set_TabIndex(11);
((Control)textBoxData6).set_Text("55");
((Control)textBoxData5).set_Location(new Point(158, 20));
((TextBoxBase)textBoxData5).set_MaxLength(2);
((Control)textBoxData5).set_Name("textBoxData5");
((Control)textBoxData5).set_Size(new Size(19, 21));
((Control)textBoxData5).set_TabIndex(10);
((Control)textBoxData5).set_Text("44");
((Control)textBoxData4).set_Location(new Point(133, 20));
((TextBoxBase)textBoxData4).set_MaxLength(2);
((Control)textBoxData4).set_Name("textBoxData4");
((Control)textBoxData4).set_Size(new Size(19, 21));
((Control)textBoxData4).set_TabIndex(9);
((Control)textBoxData4).set_Text("33");
((Control)textBoxData3).set_Location(new Point(108, 20));
((TextBoxBase)textBoxData3).set_MaxLength(2);
((Control)textBoxData3).set_Name("textBoxData3");
((Control)textBoxData3).set_Size(new Size(19, 21));
((Control)textBoxData3).set_TabIndex(8);
((Control)textBoxData3).set_Text("22");
((Control)textBoxData2).set_Location(new Point(83, 20));
((TextBoxBase)textBoxData2).set_MaxLength(2);
((Control)textBoxData2).set_Name("textBoxData2");
((Control)textBoxData2).set_Size(new Size(19, 21));
((Control)textBoxData2).set_TabIndex(7);
((Control)textBoxData2).set_Text("11");
((Control)textBoxData1).set_Location(new Point(58, 20));
((TextBoxBase)textBoxData1).set_MaxLength(2);
((Control)textBoxData1).set_Name("textBoxData1");
((Control)textBoxData1).set_Size(new Size(19, 21));
((Control)textBoxData1).set_TabIndex(6);
((Control)textBoxData1).set_Text("00");
((Control)groupBoxCommand).get_Controls().Add((Control)(object)textBoxValue);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)label1);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)textBoxGoalAddr);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)textBoxSourceAddr);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)label3);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)label2);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)buttonHalt);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)buttonBackup);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)buttonIncrease);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)buttonDecrease);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)button1ValueWrite);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)button1ValueRead);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)buttonPcdWrite);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)buttonPcdRead);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)buttonAuth);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)buttonSele);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)buttonAntiCol);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)buttonRequest);
((Control)groupBoxCommand).set_Dock((DockStyle)5);
((Control)groupBoxCommand).set_Enabled(false);
((Control)groupBoxCommand).set_Location(new Point(3, 300));
((Control)groupBoxCommand).set_Name("groupBoxCommand");
((Control)groupBoxCommand).set_Size(new Size(550, 115));
((Control)groupBoxCommand).set_TabIndex(2);
groupBoxCommand.set_TabStop(false);
((Control)groupBoxCommand).set_Text("Command");
((Control)textBoxValue).set_Location(new Point(355, 84));
((TextBoxBase)textBoxValue).set_MaxLength(10);
((Control)textBoxValue).set_Name("textBoxValue");
((Control)textBoxValue).set_Size(new Size(72, 21));
((Control)textBoxValue).set_TabIndex(4);
((Control)textBoxValue).set_Text("1");
((Control)label1).set_AutoSize(true);
((Control)label1).set_Location(new Point(303, 87));
((Control)label1).set_Name("label1");
((Control)label1).set_Size(new Size(41, 12));
((Control)label1).set_TabIndex(3);
((Control)label1).set_Text("Value:");
((Control)textBoxGoalAddr).set_Location(new Point(217, 84));
((TextBoxBase)textBoxGoalAddr).set_MaxLength(2);
((Control)textBoxGoalAddr).set_Name("textBoxGoalAddr");
((Control)textBoxGoalAddr).set_Size(new Size(35, 21));
((Control)textBoxGoalAddr).set_TabIndex(16);
((Control)textBoxGoalAddr).set_Text("2");
((Control)textBoxSourceAddr).set_Location(new Point(92, 84));
((TextBoxBase)textBoxSourceAddr).set_MaxLength(2);
((Control)textBoxSourceAddr).set_Name("textBoxSourceAddr");
((Control)textBoxSourceAddr).set_Size(new Size(35, 21));
((Control)textBoxSourceAddr).set_TabIndex(15);
((Control)textBoxSourceAddr).set_Text("1");
((Control)label3).set_AutoSize(true);
((Control)label3).set_Location(new Point(147, 87));
((Control)label3).set_Name("label3");
((Control)label3).set_Size(new Size(65, 12));
((Control)label3).set_TabIndex(13);
((Control)label3).set_Text("Goal Addr:");
((Control)label2).set_AutoSize(true);
((Control)label2).set_Location(new Point(15, 87));
((Control)label2).set_Name("label2");
((Control)label2).set_Size(new Size(77, 12));
((Control)label2).set_TabIndex(12);
((Control)label2).set_Text("Source Addr:");
((Control)buttonHalt).set_Location(new Point(444, 49));
((Control)buttonHalt).set_Name("buttonHalt");
((Control)buttonHalt).set_Size(new Size(75, 23));
((Control)buttonHalt).set_TabIndex(11);
((Control)buttonHalt).set_Text("Halt");
((ButtonBase)buttonHalt).set_UseVisualStyleBackColor(true);
((Control)buttonHalt).add_Click((EventHandler)buttonHalt_Click);
((Control)buttonBackup).set_Location(new Point(358, 49));
((Control)buttonBackup).set_Name("buttonBackup");
((Control)buttonBackup).set_Size(new Size(75, 23));
((Control)buttonBackup).set_TabIndex(10);
((Control)buttonBackup).set_Text("Backup");
((ButtonBase)buttonBackup).set_UseVisualStyleBackColor(true);
((Control)buttonBackup).add_Click((EventHandler)buttonBackup_Click);
((Control)buttonIncrease).set_Location(new Point(272, 49));
((Control)buttonIncrease).set_Name("buttonIncrease");
((Control)buttonIncrease).set_Size(new Size(75, 23));
((Control)buttonIncrease).set_TabIndex(9);
((Control)buttonIncrease).set_Text("Increase");
((ButtonBase)buttonIncrease).set_UseVisualStyleBackColor(true);
((Control)buttonIncrease).add_Click((EventHandler)buttonIncrease_Click);
((Control)buttonDecrease).set_Location(new Point(188, 49));
((Control)buttonDecrease).set_Name("buttonDecrease");
((Control)buttonDecrease).set_Size(new Size(75, 23));
((Control)buttonDecrease).set_TabIndex(8);
((Control)buttonDecrease).set_Text("Decrease");
((ButtonBase)buttonDecrease).set_UseVisualStyleBackColor(true);
((Control)buttonDecrease).add_Click((EventHandler)buttonDecrease_Click);
((Control)button1ValueWrite).set_Font((Font)(object)new Font("宋体", 9f, (FontStyle)0, (GraphicsUnit)3, (byte)134));
((Control)button1ValueWrite).set_Location(new Point(102, 49));
((Control)button1ValueWrite).set_Name("button1ValueWrite");
((Control)button1ValueWrite).set_Size(new Size(75, 23));
((Control)button1ValueWrite).set_TabIndex(7);
((Control)button1ValueWrite).set_Text("Val write");
((ButtonBase)button1ValueWrite).set_UseVisualStyleBackColor(true);
((Control)button1ValueWrite).add_Click((EventHandler)button1ValueWrite_Click);
((Control)button1ValueRead).set_Location(new Point(17, 49));
((Control)button1ValueRead).set_Name("button1ValueRead");
((Control)button1ValueRead).set_Size(new Size(75, 23));
((Control)button1ValueRead).set_TabIndex(6);
((Control)button1ValueRead).set_Text("Value Read");
((ButtonBase)button1ValueRead).set_UseVisualStyleBackColor(true);
((Control)button1ValueRead).add_Click((EventHandler)button1ValueRead_Click);
((Control)buttonPcdWrite).set_Location(new Point(444, 20));
((Control)buttonPcdWrite).set_Name("buttonPcdWrite");
((Control)buttonPcdWrite).set_Size(new Size(75, 23));
((Control)buttonPcdWrite).set_TabIndex(5);
((Control)buttonPcdWrite).set_Text("Pcd Write");
((ButtonBase)buttonPcdWrite).set_UseVisualStyleBackColor(true);
((Control)buttonPcdWrite).add_Click((EventHandler)buttonPcdWrite_Click);
((Control)buttonPcdRead).set_Location(new Point(358, 20));
((Control)buttonPcdRead).set_Name("buttonPcdRead");
((Control)buttonPcdRead).set_Size(new Size(75, 23));
((Control)buttonPcdRead).set_TabIndex(4);
((Control)buttonPcdRead).set_Text("Pcd Read");
((ButtonBase)buttonPcdRead).set_UseVisualStyleBackColor(true);
((Control)buttonPcdRead).add_Click((EventHandler)buttonPcdRead_Click);
((Control)buttonAuth).set_Location(new Point(272, 20));
((Control)buttonAuth).set_Name("buttonAuth");
((Control)buttonAuth).set_Size(new Size(75, 23));
((Control)buttonAuth).set_TabIndex(3);
((Control)buttonAuth).set_Text("Auth");
((ButtonBase)buttonAuth).set_UseVisualStyleBackColor(true);
((Control)buttonAuth).add_Click((EventHandler)buttonAuth_Click);
((Control)buttonSele).set_Location(new Point(188, 20));
((Control)buttonSele).set_Name("buttonSele");
((Control)buttonSele).set_Size(new Size(75, 23));
((Control)buttonSele).set_TabIndex(2);
((Control)buttonSele).set_Text("Select");
((ButtonBase)buttonSele).set_UseVisualStyleBackColor(true);
((Control)buttonSele).add_Click((EventHandler)buttonSele_Click);
((Control)buttonAntiCol).set_Location(new Point(102, 20));
((Control)buttonAntiCol).set_Name("buttonAntiCol");
((Control)buttonAntiCol).set_Size(new Size(75, 23));
((Control)buttonAntiCol).set_TabIndex(1);
((Control)buttonAntiCol).set_Text("Anti Coll");
((ButtonBase)buttonAntiCol).set_UseVisualStyleBackColor(true);
((Control)buttonAntiCol).add_Click((EventHandler)buttonAntiCol_Click);
((Control)buttonRequest).set_Location(new Point(17, 20));
((Control)buttonRequest).set_Name("buttonRequest");
((Control)buttonRequest).set_Size(new Size(75, 23));
((Control)buttonRequest).set_TabIndex(0);
((Control)buttonRequest).set_Text("Request");
((ButtonBase)buttonRequest).set_UseVisualStyleBackColor(true);
((Control)buttonRequest).add_Click((EventHandler)buttonRequest_Click);
((Control)groupBoxComCommand).get_Controls().Add((Control)(object)buttonDataWrite);
((Control)groupBoxComCommand).get_Controls().Add((Control)(object)textBoxBlockAddr);
((Control)groupBoxComCommand).get_Controls().Add((Control)(object)buttonDataRead);
((Control)groupBoxComCommand).get_Controls().Add((Control)(object)buttonIDRead);
((Control)groupBoxComCommand).get_Controls().Add((Control)(object)label4);
((Control)groupBoxComCommand).set_Dock((DockStyle)5);
((Control)groupBoxComCommand).set_Enabled(false);
((Control)groupBoxComCommand).set_Location(new Point(3, 421));
((Control)groupBoxComCommand).set_Name("groupBoxComCommand");
((Control)groupBoxComCommand).set_Size(new Size(550, 78));
((Control)groupBoxComCommand).set_TabIndex(3);
groupBoxComCommand.set_TabStop(false);
((Control)groupBoxComCommand).set_Text("Com Command");
((Control)buttonDataWrite).set_Location(new Point(419, 29));
((Control)buttonDataWrite).set_Name("buttonDataWrite");
((Control)buttonDataWrite).set_Size(new Size(76, 31));
((Control)buttonDataWrite).set_TabIndex(2);
((Control)buttonDataWrite).set_Text("Data Write");
((ButtonBase)buttonDataWrite).set_UseVisualStyleBackColor(true);
((Control)buttonDataWrite).add_Click((EventHandler)buttonDataWrite_Click);
((Control)textBoxBlockAddr).set_Location(new Point(205, 35));
((TextBoxBase)textBoxBlockAddr).set_MaxLength(2);
((Control)textBoxBlockAddr).set_Name("textBoxBlockAddr");
((Control)textBoxBlockAddr).set_Size(new Size(35, 21));
((Control)textBoxBlockAddr).set_TabIndex(17);
((Control)textBoxBlockAddr).set_Text("1");
((Control)buttonDataRead).set_Location(new Point(301, 29));
((Control)buttonDataRead).set_Name("buttonDataRead");
((Control)buttonDataRead).set_Size(new Size(76, 31));
((Control)buttonDataRead).set_TabIndex(1);
((Control)buttonDataRead).set_Text("Data Read");
((ButtonBase)buttonDataRead).set_UseVisualStyleBackColor(true);
((Control)buttonDataRead).add_Click((EventHandler)buttonDataRead_Click);
((Control)buttonIDRead).set_Location(new Point(16, 29));
((Control)buttonIDRead).set_Name("buttonIDRead");
((Control)buttonIDRead).set_Size(new Size(86, 31));
((Control)buttonIDRead).set_TabIndex(0);
((Control)buttonIDRead).set_Text("ID Read");
((ButtonBase)buttonIDRead).set_UseVisualStyleBackColor(true);
((Control)buttonIDRead).add_Click((EventHandler)buttonIDRead_Click);
((Control)label4).set_AutoSize(true);
((Control)label4).set_Location(new Point(128, 38));
((Control)label4).set_Name("label4");
((Control)label4).set_Size(new Size(71, 12));
((Control)label4).set_TabIndex(14);
((Control)label4).set_Text("Block Addr:");
serialPort1.set_BaudRate(115200);
serialPort1.add_DataReceived((SerialDataReceivedEventHandler)(object)new SerialDataReceivedEventHandler(serialPort1_DataReceived));
((ContainerControl)this).set_AutoScaleDimensions(new SizeF(6f, 12f));
((ContainerControl)this).set_AutoScaleMode((AutoScaleMode)1);
((Control)this).set_BackColor(SystemColors.get_Window());
((Form)this).set_ClientSize(new Size(765, 508));
((Control)this).get_Controls().Add((Control)(object)tableLayoutPanel1);
((Form)this).set_Icon((Icon)(object)(Icon)((ResourceManager)(object)val).GetObject("$this.Icon"));
((Form)this).set_MaximizeBox(false);
((Control)this).set_MaximumSize(new Size(773, 542));
((Control)this).set_MinimumSize(new Size(773, 542));
((Control)this).set_Name("MainForm");
((Form)this).set_StartPosition((FormStartPosition)1);
((Control)this).set_Text("RC522PC——ICStation");
((Form)this).add_Load((EventHandler)MainForm_Load);
((Control)tableLayoutPanel1).ResumeLayout(false);
((Control)tableLayoutPanel2).ResumeLayout(false);
((Control)groupBoxSerialPort).ResumeLayout(false);
((Control)groupBoxPassword).ResumeLayout(false);
((Control)groupBoxPassword).PerformLayout();
((ISupportInitialize)pictureBox1).EndInit();
((Control)groupBoxStateSele).ResumeLayout(false);
((Control)tableLayoutPanel3).ResumeLayout(false);
((Control)groupBoxDataReceive).ResumeLayout(false);
((Control)groupBoxDataTrans).ResumeLayout(false);
((Control)groupBoxDataTrans).PerformLayout();
((Control)groupBoxCommand).ResumeLayout(false);
((Control)groupBoxCommand).PerformLayout();
((Control)groupBoxComCommand).ResumeLayout(false);
((Control)groupBoxComCommand).PerformLayout();
((Control)this).ResumeLayout(false);
}
private string FillHex(string hex)
{
if (hex.Length == 1)
{
hex = "0" + hex;
}
return hex;
}
private void CommandReture(byte sele)
{
byte[] array;
if (sele == 0)
{
array = new byte[1]
{
12
};
serialPort1.Write(array, 0, 1);
return;
}
array = new byte[1]
{
127
};
serialPort1.Write(array, 0, 1);
array[0] = 12;
serialPort1.Write(array, 0, 1);
array[0] = 247;
serialPort1.Write(array, 0, 1);
}
private void CommandRequest()
{
byte[] array = new byte[1]
{
127
};
serialPort1.Write(array, 0, 1);
array[0] = 3;
serialPort1.Write(array, 0, 1);
array[0] = 82;
serialPort1.Write(array, 0, 1);
array[0] = 247;
serialPort1.Write(array, 0, 1);
}
private void CommandAnticoll()
{
byte[] array = new byte[1]
{
127
};
serialPort1.Write(array, 0, 1);
array[0] = 4;
serialPort1.Write(array, 0, 1);
array[0] = 247;
serialPort1.Write(array, 0, 1);
}
private void CommandSelect(byte[] series_num)
{
byte[] array = new byte[1]
{
127
};
serialPort1.Write(array, 0, 1);
array[0] = 5;
serialPort1.Write(array, 0, 1);
for (byte b = 0; b < 4; b = (byte)(b + 1))
{
array[0] = SeriesNum[b];
serialPort1.Write(array, 0, 1);
}
array[0] = 247;
serialPort1.Write(array, 0, 1);
}
private void CommandAuthState(byte pass_mode, byte addr, byte[] password, byte[] series_num)
{
byte[] array = new byte[1]
{
127
};
serialPort1.Write(array, 0, 1);
array[0] = 6;
serialPort1.Write(array, 0, 1);
array[0] = pass_mode;
serialPort1.Write(array, 0, 1);
array[0] = addr;
serialPort1.Write(array, 0, 1);
for (byte b = 0; b < 6; b = (byte)(b + 1))
{
array[0] = password[b];
serialPort1.Write(array, 0, 1);
}
for (byte b = 0; b < 4; b = (byte)(b + 1))
{
array[0] = series_num[b];
serialPort1.Write(array, 0, 1);
}
array[0] = 247;
serialPort1.Write(array, 0, 1);
}
private void CommandPcdRead(byte addr)
{
byte[] array = new byte[1]
{
127
};
serialPort1.Write(array, 0, 1);
array[0] = 7;
serialPort1.Write(array, 0, 1);
array[0] = addr;
serialPort1.Write(array, 0, 1);
array[0] = 247;
serialPort1.Write(array, 0, 1);
}
private void CommandPcdWrite(byte addr, byte[] dat)
{
byte[] array = new byte[1]
{
127
};
serialPort1.Write(array, 0, 1);
array[0] = 8;
serialPort1.Write(array, 0, 1);
array[0] = addr;
serialPort1.Write(array, 0, 1);
for (byte b = 0; b < 16; b = (byte)(b + 1))
{
array[0] = dat[b];
serialPort1.Write(array, 0, 1);
}
array[0] = 247;
serialPort1.Write(array, 0, 1);
}
private void CommandPcdValue(byte value_mode, byte addr, byte[] pcd_value)
{
byte[] array = new byte[1]
{
127
};
serialPort1.Write(array, 0, 1);
array[0] = 9;
serialPort1.Write(array, 0, 1);
array[0] = value_mode;
serialPort1.Write(array, 0, 1);
array[0] = addr;
serialPort1.Write(array, 0, 1);
for (byte b = 0; b < 4; b = (byte)(b + 1))
{
array[0] = pcd_value[3 - b];
serialPort1.Write(array, 0, 1);
}
array[0] = 247;
serialPort1.Write(array, 0, 1);
}
private void CommandBackup(byte source_addr, byte goal_addr)
{
byte[] array = new byte[1]
{
127
};
serialPort1.Write(array, 0, 1);
array[0] = 10;
serialPort1.Write(array, 0, 1);
array[0] = source_addr;
serialPort1.Write(array, 0, 1);
array[0] = goal_addr;
serialPort1.Write(array, 0, 1);
array[0] = 247;
serialPort1.Write(array, 0, 1);
}
private void CommandHalt()
{
byte[] array = new byte[1]
{
127
};
serialPort1.Write(array, 0, 1);
array[0] = 11;
serialPort1.Write(array, 0, 1);
array[0] = 247;
serialPort1.Write(array, 0, 1);
}
private void RefreshPassword()
{
Control val = ((Control)groupBoxPassword).get_Controls().Find("textBoxPassword1", true)[0];
TextBox val2 = val as TextBox;
for (byte b = 0; b < 6; b = (byte)(b + 1))
{
val = ((Control)groupBoxPassword).get_Controls().Find("textBoxPassword" + (b + 1), true)[0];
val2 = (val as TextBox);
Password[b] = Convert.ToByte(((Control)val2).get_Text(), 16);
}
}
private void Uint32ToArray(uint dat, ref byte[] data_array)
{
for (byte b = 0; b < 4; b = (byte)(b + 1))
{
data_array[3 - b] = (byte)((dat >> 8 * b) & 0xFF);
}
}
private void ArrayToUint32(byte[] data_array, ref uint dat)
{
for (byte b = 0; b < 4; b = (byte)(b + 1))
{
dat <<= 8;
dat |= data_array[3 - b];
}
}
private void RefreshSendData()
{
Control val = ((Control)groupBoxDataTrans).get_Controls().Find("textBoxData1", true)[0];
TextBox val2 = val as TextBox;
for (byte b = 0; b < 16; b = (byte)(b + 1))
{
val = ((Control)groupBoxDataTrans).get_Controls().Find("textBoxData" + (b + 1), true)[0];
val2 = (val as TextBox);
SendData[b] = Convert.ToByte(((Control)val2).get_Text(), 16);
}
}
private void GroupDisable(byte flag)
{
((Control)groupBoxComCommand).set_Enabled(false);
((Control)groupBoxCommand).set_Enabled(false);
((Control)groupBoxDataReceive).set_Enabled(false);
((Control)groupBoxDataTrans).set_Enabled(false);
((Control)groupBoxPassword).set_Enabled(false);
if (flag == 0)
{
((Control)groupBoxStateSele).set_Enabled(false);
}
}
private void GroupEnable(byte flag)
{
((Control)groupBoxComCommand).set_Enabled(true);
((Control)groupBoxCommand).set_Enabled(true);
((Control)groupBoxDataReceive).set_Enabled(true);
((Control)groupBoxDataTrans).set_Enabled(true);
((Control)groupBoxPassword).set_Enabled(true);
if (flag == 0)
{
((Control)groupBoxStateSele).set_Enabled(true);
}
}
private bool IsHexNum(string dat)
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Expected O, but got Unknown
string text = "^[0-1]+$";
Regex val = (Regex)(object)new Regex(text);
return val.IsMatch(dat);
}
public MainForm()
{
byte[] array = CardType = new byte[2];
array = (SeriesNum = new byte[4]);
Password = new byte[6]
{
255,
255,
255,
255,
255,
255
};
BlockData = new byte[16]
{
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255
};
SendData = new byte[16]
{
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255
};
array = (PcdValue = new byte[4]);
CurrentState = ProState.StateWait;
((Form)this)._002Ector();
InitializeComponent();
Control.set_CheckForIllegalCrossThreadCalls(false);
}
private void MainForm_Load(object sender, EventArgs e)
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Expected O, but got Unknown
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Expected O, but got Unknown
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Expected O, but got Unknown
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_0076: Expected O, but got Unknown
//IL_0134: Unknown result type (might be due to invalid IL or missing references)
//IL_013e: Expected O, but got Unknown
//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
//IL_01aa: Expected O, but got Unknown
comboBoxSerialPort.get_Items().AddRange((object[])SerialPort.GetPortNames());
((Control)textBoxSourceAddr).add_KeyPress((KeyPressEventHandler)(object)new KeyPressEventHandler(TextCheckZeroToNine));
((Control)textBoxValue).add_KeyPress((KeyPressEventHandler)(object)new KeyPressEventHandler(TextCheckZeroToNine));
((Control)textBoxGoalAddr).add_KeyPress((KeyPressEventHandler)(object)new KeyPressEventHandler(TextCheckZeroToNine));
((Control)textBoxBlockAddr).add_KeyPress((KeyPressEventHandler)(object)new KeyPressEventHandler(TextCheckZeroToNine));
((Control)textBoxSourceAddr).add_Leave((EventHandler)TextRangeCheck0To63);
((Control)textBoxValue).add_Leave((EventHandler)TextRangeCheck0ToHalf32);
((Control)textBoxGoalAddr).add_Leave((EventHandler)TextRangeCheck0To63);
((Control)textBoxBlockAddr).add_Leave((EventHandler)TextRangeCheck0To63);
Control val = ((Control)groupBoxDataTrans).get_Controls().Find("textBoxData1", true)[0];
TextBox val2 = val as TextBox;
for (byte b = 0; b < 16; b = (byte)(b + 1))
{
val = ((Control)groupBoxDataTrans).get_Controls().Find("textBoxData" + (b + 1), true)[0];
val2 = (val as TextBox);
((Control)val2).add_KeyPress((KeyPressEventHandler)(object)new KeyPressEventHandler(TextCheck));
((Control)val2).add_Leave((EventHandler)TextLenthCheck);
}
for (byte b = 0; b < 6; b = (byte)(b + 1))
{
val = ((Control)groupBoxPassword).get_Controls().Find("textBoxPassword" + (b + 1), true)[0];
val2 = (val as TextBox);
((Control)val2).add_KeyPress((KeyPressEventHandler)(object)new KeyPressEventHandler(TextCheck));
((Control)val2).add_Leave((EventHandler)TextLenthCheck);
}
}
private void comboBoxSerialPort_TextChanged(object sender, EventArgs e)
{
serialPort1.set_PortName(((Control)comboBoxSerialPort).get_Text());
((Control)buttonOpenClose).set_Enabled(true);
}
private void buttonOpenClose_Click(object sender, EventArgs e)
{
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
if (((Control)buttonOpenClose).get_Text() == "&Open")
{
try
{
serialPort1.Open();
((Control)buttonOpenClose).set_Text("&Close");
((Control)groupBoxStateSele).set_Enabled(true);
((Control)buttonRefresh).set_Enabled(false);
}
catch
{
MessageBox.Show("Serialport can not open!");
}
}
else
{
((Control)buttonOpenClose).set_Text("&Open");
serialPort1.Close();
((Control)buttonRefresh).set_Enabled(true);
GroupDisable(0);
}
}
private void buttonRefresh_Click(object sender, EventArgs e)
{
comboBoxSerialPort.get_Items().Clear();
comboBoxSerialPort.get_Items().AddRange((object[])SerialPort.GetPortNames());
}
private void comboBoxSerialPort_SelectedIndexChanged(object sender, EventArgs e)
{
if (((ListControl)comboBoxSerialPort).get_SelectedIndex() >= 0)
{
((Control)buttonOpenClose).set_Enabled(true);
}
}
private void richTextBoxDataReceived_TextChanged(object sender, EventArgs e)
{
((Control)richTextBoxDataReceived).Focus();
((TextBoxBase)richTextBoxDataReceived).Select(((TextBoxBase)richTextBoxDataReceived).get_TextLength(), 0);
((TextBoxBase)richTextBoxDataReceived).ScrollToCaret();
}
private void buttonTest_Click(object sender, EventArgs e)
{
//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
//IL_018c: Unknown result type (might be due to invalid IL or missing references)
if (((Control)buttonTest).get_Text() == "&Test")
{
byte[] array = new byte[1]
{
2
};
serialPort1.Write(array, 0, 1);
int tickCount = Environment.TickCount;
while (Environment.TickCount - tickCount <= 100)
{
}
if (serialPort1.get_BytesToRead() >= 1)
{
byte[] array2 = new byte[1];
serialPort1.Read(array2, 0, 1);
if (array2[0] == 2)
{
((Control)buttonTest).set_Text("R&eture");
((Control)richTextBoxDataReceived).set_Text("");
((Control)groupBoxDataReceive).set_Enabled(true);
((Control)buttonPCState).set_Enabled(false);
CurrentState = ProState.StateTest;
}
else
{
MessageBox.Show("Cannot find module!");
}
}
else
{
MessageBox.Show("Cannot find module!");
}
}
else
{
CommandReture(0);
int tickCount = Environment.TickCount;
while (Environment.TickCount - tickCount <= 100)
{
}
byte[] array2 = new byte[1];
serialPort1.Read(array2, 0, 1);
if (array2[0] == 170)
{
((Control)buttonTest).set_Text("&Test");
((Control)richTextBoxDataReceived).set_Text("");
((Control)groupBoxDataReceive).set_Enabled(false);
((Control)buttonPCState).set_Enabled(true);
CurrentState = ProState.StateWait;
}
else
{
MessageBox.Show("Cannot return!");
}
}
}
private void buttonTextClear_Click(object sender, EventArgs e)
{
((Control)richTextBoxDataReceived).set_Text("");
}
private void serialPort1_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
if (CurrentState == ProState.StateTest)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + serialPort1.ReadExisting());
}
}
private void buttonPCState_Click(object sender, EventArgs e)
{
//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
int tickCount;
if (((Control)buttonPCState).get_Text() == "&Normal")
{
byte[] array = new byte[1]
{
1
};
serialPort1.Write(array, 0, 1);
tickCount = Environment.TickCount;
while (Environment.TickCount - tickCount <= 5)
{
}
if (serialPort1.get_BytesToRead() == 1)
{
if (serialPort1.ReadByte() == 1)
{
CurrentState = ProState.StateNomal;
GroupEnable(1);
((Control)richTextBoxDataReceived).set_Text("");
((Control)buttonPCState).set_Text("R&eturn");
((Control)buttonTest).set_Enabled(false);
}
else
{
MessageBox.Show("Cannot start!");
}
}
else
{
MessageBox.Show("Cannot start!");
}
return;
}
CommandReture(1);
tickCount = Environment.TickCount;
while (Environment.TickCount - tickCount <= 50)
{
}
if (serialPort1.get_BytesToRead() >= 3)
{
byte[] array = new byte[3];
serialPort1.Read(array, 0, 3);
if (array[0] == 127 && array[1] == 247 && array[2] == 170)
{
CurrentState = ProState.StateWait;
GroupDisable(1);
((Control)richTextBoxDataReceived).set_Text("");
((Control)buttonPCState).set_Text("&Normal");
((Control)buttonTest).set_Enabled(true);
}
else
{
MessageBox.Show("Cannot return!");
}
}
else
{
MessageBox.Show("No answer!");
}
}
private void buttonRequest_Click(object sender, EventArgs e)
{
ButtonRequest_C();
}
private void ButtonRequest_C()
{
GroupDisable(0);
CommandRequest();
int tickCount = Environment.TickCount;
while (Environment.TickCount - tickCount <= 100)
{
}
byte[] array = new byte[4];
if (serialPort1.get_BytesToRead() == 4)
{
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
CardType[0] = array[1];
CardType[1] = array[2];
if (array[0] == 127 && array[3] == 247)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Request success!\nCard Type:" + array[1].ToString("X2") + " " + array[2].ToString("X2") + "\n");
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Request fallen!\n");
}
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Request fallen!\n");
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
}
GroupEnable(0);
}
private void buttonAntiCol_Click(object sender, EventArgs e)
{
ButtonAntiCol_C();
}
private void ButtonAntiCol_C()
{
GroupDisable(0);
CommandAnticoll();
int tickCount = Environment.TickCount;
while (Environment.TickCount - tickCount <= 100)
{
}
byte[] array = new byte[6];
if (serialPort1.get_BytesToRead() == 6)
{
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
for (byte b = 0; b < 4; b = (byte)(b + 1))
{
SeriesNum[b] = array[b + 1];
}
if (array[0] == 127 && array[5] == 247)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Anticoll success!\nSeries Number:" + array[1].ToString("X2") + " " + array[2].ToString("X2") + " " + array[3].ToString("X2") + " " + array[4].ToString("X2") + "\n");
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Anticoll fallen!\n");
}
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Anticoll fallen!\n");
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
}
GroupEnable(0);
}
private void buttonSele_Click(object sender, EventArgs e)
{
ButtonSele_C();
}
private void ButtonSele_C()
{
GroupDisable(0);
CommandSelect(SeriesNum);
int tickCount = Environment.TickCount;
while (Environment.TickCount - tickCount <= 100)
{
}
byte[] array = new byte[2];
if (serialPort1.get_BytesToRead() == 2)
{
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
if (array[0] == 127 && array[1] == 247)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Select success!\n");
}
else if (array[0] == 127 && array[1] == 85)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Select fallen!\n");
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Return fallen!\n");
}
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Cannot select!\n");
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
}
GroupEnable(0);
}
private void buttonAuth_Click(object sender, EventArgs e)
{
ButtonAuth_C();
}
private void ButtonAuth_C()
{
GroupDisable(0);
byte pass_mode = 96;
if (radioButtonPassB.get_Checked())
{
pass_mode = 97;
}
RefreshPassword();
byte addr = Convert.ToByte(((Control)textBoxBlockAddr).get_Text(), 10);
CommandAuthState(pass_mode, addr, Password, SeriesNum);
int tickCount = Environment.TickCount;
while (Environment.TickCount - tickCount <= 100)
{
}
byte[] array = new byte[2];
if (serialPort1.get_BytesToRead() == 2)
{
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
if (array[0] == 127 && array[1] == 247)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Authenticate success!\n");
}
else if (array[0] == 127 && array[1] == 85)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Authenticate fallen!\n");
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Cannot read!\n");
}
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "No answer!\n");
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
}
GroupEnable(0);
}
private void buttonPcdRead_Click(object sender, EventArgs e)
{
ButtonPcdRead_C();
}
private void ButtonPcdRead_C()
{
GroupDisable(0);
byte addr = Convert.ToByte(((Control)textBoxBlockAddr).get_Text(), 10);
CommandPcdRead(addr);
int tickCount = Environment.TickCount;
while (Environment.TickCount - tickCount <= 100)
{
}
byte[] array = new byte[18];
if (serialPort1.get_BytesToRead() == 18)
{
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
if (array[0] == 127 && array[17] == 247)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Block read success!\nBlock data:");
for (byte b = 0; b < 16; b = (byte)(b + 1))
{
BlockData[b] = array[b + 1];
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + BlockData[b].ToString("X2") + " ");
}
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "\n");
}
else if (array[0] == 127 && array[17] == 85)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Block read fallen!\n");
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Cannot read!\n");
}
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "No answer!\n");
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
}
GroupEnable(0);
}
private void buttonPcdWrite_Click(object sender, EventArgs e)
{
ButtonPcdWrite_C();
}
private void ButtonPcdWrite_C()
{
GroupDisable(0);
RefreshSendData();
byte addr = Convert.ToByte(((Control)textBoxBlockAddr).get_Text(), 10);
CommandPcdWrite(addr, SendData);
int tickCount = Environment.TickCount;
while (Environment.TickCount - tickCount <= 100)
{
}
byte[] array = new byte[2];
if (serialPort1.get_BytesToRead() == 2)
{
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
if (array[0] == 127 && array[1] == 247)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Block write success!\n");
}
else if (array[0] == 127 && array[1] == 85)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Block write fallen!\n");
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Cannot read!\n");
}
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "No answer!\n");
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
}
GroupEnable(0);
}
private void buttonBackup_Click(object sender, EventArgs e)
{
GroupDisable(0);
byte source_addr = Convert.ToByte(((Control)textBoxSourceAddr).get_Text(), 10);
byte goal_addr = Convert.ToByte(((Control)textBoxGoalAddr).get_Text(), 10);
CommandBackup(source_addr, goal_addr);
int tickCount = Environment.TickCount;
while (Environment.TickCount - tickCount <= 100)
{
}
byte[] array = new byte[2];
if (serialPort1.get_BytesToRead() == 2)
{
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
if (array[0] == 127 && array[1] == 247)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Backup success!\n");
}
else if (array[0] == 127 && array[1] == 85)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Backup fallen!\n");
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Cannot read!\n");
}
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "No answer!\n");
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
}
GroupEnable(0);
}
private void buttonDecrease_Click(object sender, EventArgs e)
{
GroupDisable(0);
uint dat = Convert.ToUInt32(((Control)textBoxValue).get_Text(), 10);
Uint32ToArray(dat, ref PcdValue);
byte addr = Convert.ToByte(((Control)textBoxBlockAddr).get_Text(), 10);
CommandPcdValue(192, addr, PcdValue);
int tickCount = Environment.TickCount;
while (Environment.TickCount - tickCount <= 100)
{
}
byte[] array = new byte[2];
if (serialPort1.get_BytesToRead() == 2)
{
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
if (array[0] == 127 && array[1] == 247)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Value decrease success!\n");
}
else if (array[0] == 127 && array[1] == 85)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Value decrease fallen!\n");
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Cannot read!\n");
}
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "No answer!\n");
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
}
GroupEnable(0);
}
private void buttonIncrease_Click(object sender, EventArgs e)
{
GroupDisable(0);
uint dat = Convert.ToUInt32(((Control)textBoxValue).get_Text(), 10);
Uint32ToArray(dat, ref PcdValue);
byte addr = Convert.ToByte(((Control)textBoxBlockAddr).get_Text(), 10);
CommandPcdValue(193, addr, PcdValue);
int tickCount = Environment.TickCount;
while (Environment.TickCount - tickCount <= 100)
{
}
byte[] array = new byte[2];
if (serialPort1.get_BytesToRead() == 2)
{
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
if (array[0] == 127 && array[1] == 247)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Value increase success!\n");
}
else if (array[0] == 127 && array[1] == 85)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Value increase fallen!\n");
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Cannot read!\n");
}
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "No answer!\n");
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
}
GroupEnable(0);
}
private void buttonHalt_Click(object sender, EventArgs e)
{
buttonHalt_C();
}
private void buttonHalt_C()
{
GroupDisable(0);
CommandHalt();
int tickCount = Environment.TickCount;
while (Environment.TickCount - tickCount <= 100)
{
}
byte[] array = new byte[2];
if (serialPort1.get_BytesToRead() == 2)
{
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
if (array[0] == 127 && array[1] == 247)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Halt success!\n");
}
else if (array[0] == 127 && array[1] == 85)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Halt fallen!\n");
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Cannot read!\n");
}
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "No answer!\n");
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
}
GroupEnable(0);
}
private void button1ValueWrite_Click(object sender, EventArgs e)
{
GroupDisable(0);
for (byte b = 0; b < 4; b = (byte)(b + 1))
{
SendData[b] = 0;
}
for (byte b = 0; b < 4; b = (byte)(b + 1))
{
SendData[b + 4] = byte.MaxValue;
}
for (byte b = 0; b < 4; b = (byte)(b + 1))
{
SendData[b + 8] = 0;
}
byte b2 = Convert.ToByte(((Control)textBoxBlockAddr).get_Text(), 10);
SendData[12] = b2;
SendData[14] = b2;
SendData[13] = (byte)(~b2);
SendData[15] = (byte)(~b2);
CommandPcdWrite(SendData[12], SendData);
int tickCount = Environment.TickCount;
while (Environment.TickCount - tickCount <= 100)
{
}
uint dat = Convert.ToUInt32(((Control)textBoxValue).get_Text(), 10);
Uint32ToArray(dat, ref PcdValue);
CommandPcdValue(193, b2, PcdValue);
tickCount = Environment.TickCount;
while (Environment.TickCount - tickCount <= 100)
{
}
byte[] array = new byte[4];
if (serialPort1.get_BytesToRead() == 4)
{
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
if (array[0] == 127 && array[1] == 247 && array[2] == 127 && array[3] == 247)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Write value success!\n");
}
else if (array[1] == 85 || array[3] == 85)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Write value fallen!\n");
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Cannot read!\n");
}
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "No answer!\n");
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
}
GroupEnable(0);
}
private void button1ValueRead_Click(object sender, EventArgs e)
{
GroupDisable(0);
byte b = Convert.ToByte(((Control)textBoxBlockAddr).get_Text(), 10);
CommandPcdRead(b);
int tickCount = Environment.TickCount;
while (Environment.TickCount - tickCount <= 100)
{
}
byte[] array = new byte[18];
if (serialPort1.get_BytesToRead() == 18)
{
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
if (array[0] == 127 && array[17] == 247)
{
bool flag = true;
for (byte b2 = 0; b2 < 16; b2 = (byte)(b2 + 1))
{
BlockData[b2] = array[b2 + 1];
}
for (byte b2 = 0; b2 < 4; b2 = (byte)(b2 + 1))
{
if (BlockData[b2] != BlockData[b2 + 8] || BlockData[b2] != (byte)(~BlockData[b2 + 4]))
{
flag = false;
}
}
if (BlockData[12] != b || BlockData[13] != (byte)(~b) || BlockData[14] != b || BlockData[15] != (byte)(~b))
{
flag = false;
}
if (flag)
{
uint dat = 0u;
for (byte b2 = 0; b2 < 4; b2 = (byte)(b2 + 1))
{
PcdValue[b2] = BlockData[b2];
}
ArrayToUint32(BlockData, ref dat);
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Value read success!\nValue:");
if (dat >= 2147483648u)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "-");
dat = 0 - dat;
}
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + dat + "\n");
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Format error!\n");
}
}
else if (array[0] == 127 && array[17] == 85)
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Value read fallen!\n");
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "Cannot read!\n");
}
}
else
{
((Control)richTextBoxDataReceived).set_Text(((Control)richTextBoxDataReceived).get_Text() + "No answer!\n");
serialPort1.Read(array, 0, serialPort1.get_BytesToRead());
}
GroupEnable(0);
}
private void buttonIDRead_Click(object sender, EventArgs e)
{
ButtonRequest_C();
ButtonAntiCol_C();
buttonHalt_C();
}
private void buttonDataRead_Click(object sender, EventArgs e)
{
ButtonRequest_C();
ButtonAntiCol_C();
ButtonSele_C();
ButtonAuth_C();
ButtonPcdRead_C();
buttonHalt_C();
}
private void buttonDataWrite_Click(object sender, EventArgs e)
{
ButtonRequest_C();
ButtonAntiCol_C();
ButtonSele_C();
ButtonAuth_C();
ButtonPcdWrite_C();
buttonHalt_C();
}
private void TextCheck(object sender, KeyPressEventArgs e)
{
//IL_0079: Unknown result type (might be due to invalid IL or missing references)
if ((e.get_KeyChar() < '0' || e.get_KeyChar() > '9') && e.get_KeyChar() != '\b' && e.get_KeyChar() != '.' && e.get_KeyChar() != 'A' && e.get_KeyChar() != 'B' && e.get_KeyChar() != 'C' && e.get_KeyChar() != 'D' && e.get_KeyChar() != 'E' && e.get_KeyChar() != 'F')
{
e.set_Handled(true);
MessageBox.Show("Please press numbers from 0 to F!");
}
}
private void TextCheckZeroToNine(object sender, KeyPressEventArgs e)
{
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
if ((e.get_KeyChar() < '0' || e.get_KeyChar() > '9') && e.get_KeyChar() != '\b' && e.get_KeyChar() != '.')
{
e.set_Handled(true);
MessageBox.Show("Please press numbers from 0 to 9!");
}
}
private void TextLenthCheck(object sender, EventArgs e)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
TextBox val = (TextBox)(object)(TextBox)sender;
if (((Control)val).get_Text() == "")
{
((Control)val).set_Text("FF");
}
else if (((Control)val).get_Text().Length == 1)
{
((Control)val).set_Text("0" + ((Control)val).get_Text());
}
}
private void TextRangeCheck0To63(object sender, EventArgs e)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_0030: Unknown result type (might be due to invalid IL or missing references)
TextBox val = (TextBox)(object)(TextBox)sender;
if (Convert.ToByte(((Control)val).get_Text()) > 63)
{
((Control)val).set_Text("1");
MessageBox.Show("Block range from 0 to 63!");
}
}
private void TextRangeCheck0ToHalf32(object sender, EventArgs e)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
TextBox val = (TextBox)(object)(TextBox)sender;
if (Convert.ToUInt64(((Control)val).get_Text()) > int.MaxValue)
{
((Control)val).set_Text("2147483647");
MessageBox.Show("Block range from 0 to 2147483647!");
}
}
private void pictureBox1_MouseEnter(object sender, EventArgs e)
{
((Control)this).set_Cursor(Cursors.get_Hand());
}
private void pictureBox1_MouseLeave(object sender, EventArgs e)
{
((Control)this).set_Cursor(Cursors.get_Default());
}
private void pictureBox1_Click(object sender, EventArgs e)
{
Process.Start("http://www.icstation.com");
}
}
}
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO.Ports;
using System.Resources;
using System.Text.RegularExpressions;
using System.Windows.Forms;
namespace UartRc522
{
public class MainForm : Form
{
public enum ProState : byte
{
StateWait,
StateNomal,
StateTest
}
private IContainer components = null;
private TableLayoutPanel tableLayoutPanel1;
private TableLayoutPanel tableLayoutPanel2;
private TableLayoutPanel tableLayoutPanel3;
private GroupBox groupBoxDataReceive;
private GroupBox groupBoxDataTrans;
private GroupBox groupBoxCommand;
private GroupBox groupBoxComCommand;
private TextBox textBoxData16;
private TextBox textBoxData15;
private TextBox textBoxData14;
private TextBox textBoxData13;
private TextBox textBoxData12;
private TextBox textBoxData11;
private TextBox textBoxData10;
private TextBox textBoxData9;
private TextBox textBoxData8;
private TextBox textBoxData7;
private TextBox textBoxData6;
private TextBox textBoxData5;
private TextBox textBoxData4;
private TextBox textBoxData3;
private TextBox textBoxData2;
private TextBox textBoxData1;
private Button buttonHalt;
private Button buttonBackup;
private Button buttonIncrease;
private Button buttonDecrease;
private Button button1ValueWrite;
private Button button1ValueRead;
private Button buttonPcdWrite;
private Button buttonPcdRead;
private Button buttonAuth;
private Button buttonSele;
private Button buttonAntiCol;
private Button buttonRequest;
private TextBox textBoxBlockAddr;
private TextBox textBoxGoalAddr;
private TextBox textBoxSourceAddr;
private Label label4;
private Label label3;
private Label label2;
private TextBox textBoxValue;
private Label label1;
private Button buttonDataWrite;
private Button buttonDataRead;
private Button buttonIDRead;
private GroupBox groupBoxPassword;
private RadioButton radioButtonPassB;
private RadioButton radioButtonPassA;
private TextBox textBoxPassword6;
private TextBox textBoxPassword5;
private TextBox textBoxPassword4;
private TextBox textBoxPassword3;
private TextBox textBoxPassword2;
private TextBox textBoxPassword1;
private PictureBox pictureBox1;
private GroupBox groupBoxSerialPort;
private Button buttonOpenClose;
private Button buttonRefresh;
private ComboBox comboBoxSerialPort;
private GroupBox groupBoxStateSele;
private Button buttonTest;
private Button buttonPCState;
private SerialPort serialPort1;
private Button buttonTextClear;
private RichTextBox richTextBoxDataReceived;
private Label label5;
private byte[] SerialSendBuff = new byte[30];
private byte[] CardType;
private byte[] SeriesNum;
private byte[] Password;
private byte[] BlockData;
private byte[] SendData;
private byte[] PcdValue;
private ProState CurrentState;
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
((IDisposable)components).Dispose();
}
((Form)this).Dispose(disposing);
}
private void InitializeComponent()
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Expected O, but got Unknown
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Expected O, but got Unknown
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Expected O, but got Unknown
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_003d: Expected O, but got Unknown
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_0048: Expected O, but got Unknown
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Expected O, but got Unknown
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Expected O, but got Unknown
//IL_005f: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Expected O, but got Unknown
//IL_006a: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Expected O, but got Unknown
//IL_0075: Unknown result type (might be due to invalid IL or missing references)
//IL_007f: Expected O, but got Unknown
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Expected O, but got Unknown
//IL_008b: Unknown result type (might be due to invalid IL or missing references)
//IL_0095: Expected O, but got Unknown
//IL_0096: Unknown result type (might be due to invalid IL or missing references)
//IL_00a0: Expected O, but got Unknown
//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
//IL_00ab: Expected O, but got Unknown
//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: Expected O, but got Unknown
//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
//IL_00c1: Expected O, but got Unknown
//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
//IL_00cc: Expected O, but got Unknown
//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
//IL_00d7: Expected O, but got Unknown
//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
//IL_00e2: Expected O, but got Unknown
//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
//IL_00ed: Expected O, but got Unknown
//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
//IL_00f8: Expected O, but got Unknown
//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
//IL_0103: Expected O, but got Unknown
//IL_0104: Unknown result type (might be due to invalid IL or missing references)
//IL_010e: Expected O, but got Unknown
//IL_010f: Unknown result type (might be due to invalid IL or missing references)
//IL_0119: Expected O, but got Unknown
//IL_011a: Unknown result type (might be due to invalid IL or missing references)
//IL_0124: Expected O, but got Unknown
//IL_0125: Unknown result type (might be due to invalid IL or missing references)
//IL_012f: Expected O, but got Unknown
//IL_0130: Unknown result type (might be due to invalid IL or missing references)
//IL_013a: Expected O, but got Unknown
//IL_013b: Unknown result type (might be due to invalid IL or missing references)
//IL_0145: Expected O, but got Unknown
//IL_0146: Unknown result type (might be due to invalid IL or missing references)
//IL_0150: Expected O, but got Unknown
//IL_0151: Unknown result type (might be due to invalid IL or missing references)
//IL_015b: Expected O, but got Unknown
//IL_015c: Unknown result type (might be due to invalid IL or missing references)
//IL_0166: Expected O, but got Unknown
//IL_0167: Unknown result type (might be due to invalid IL or missing references)
//IL_0171: Expected O, but got Unknown
//IL_0172: Unknown result type (might be due to invalid IL or missing references)
//IL_017c: Expected O, but got Unknown
//IL_017d: Unknown result type (might be due to invalid IL or missing references)
//IL_0187: Expected O, but got Unknown
//IL_0188: Unknown result type (might be due to invalid IL or missing references)
//IL_0192: Expected O, but got Unknown
//IL_0193: Unknown result type (might be due to invalid IL or missing references)
//IL_019d: Expected O, but got Unknown
//IL_019e: Unknown result type (might be due to invalid IL or missing references)
//IL_01a8: Expected O, but got Unknown
//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
//IL_01b3: Expected O, but got Unknown
//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
//IL_01be: Expected O, but got Unknown
//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
//IL_01c9: Expected O, but got Unknown
//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
//IL_01d4: Expected O, but got Unknown
//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
//IL_01df: Expected O, but got Unknown
//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
//IL_01ea: Expected O, but got Unknown
//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
//IL_01f5: Expected O, but got Unknown
//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
//IL_0200: Expected O, but got Unknown
//IL_0201: Unknown result type (might be due to invalid IL or missing references)
//IL_020b: Expected O, but got Unknown
//IL_020c: Unknown result type (might be due to invalid IL or missing references)
//IL_0216: Expected O, but got Unknown
//IL_0217: Unknown result type (might be due to invalid IL or missing references)
//IL_0221: Expected O, but got Unknown
//IL_0222: Unknown result type (might be due to invalid IL or missing references)
//IL_022c: Expected O, but got Unknown
//IL_022d: Unknown result type (might be due to invalid IL or missing references)
//IL_0237: Expected O, but got Unknown
//IL_0238: Unknown result type (might be due to invalid IL or missing references)
//IL_0242: Expected O, but got Unknown
//IL_0243: Unknown result type (might be due to invalid IL or missing references)
//IL_024d: Expected O, but got Unknown
//IL_024e: Unknown result type (might be due to invalid IL or missing references)
//IL_0258: Expected O, but got Unknown
//IL_0259: Unknown result type (might be due to invalid IL or missing references)
//IL_0263: Expected O, but got Unknown
//IL_0264: Unknown result type (might be due to invalid IL or missing references)
//IL_026e: Expected O, but got Unknown
//IL_026f: Unknown result type (might be due to invalid IL or missing references)
//IL_0279: Expected O, but got Unknown
//IL_027a: Unknown result type (might be due to invalid IL or missing references)
//IL_0284: Expected O, but got Unknown
//IL_0285: Unknown result type (might be due to invalid IL or missing references)
//IL_028f: Expected O, but got Unknown
//IL_0290: Unknown result type (might be due to invalid IL or missing references)
//IL_029a: Expected O, but got Unknown
//IL_029b: Unknown result type (might be due to invalid IL or missing references)
//IL_02a5: Expected O, but got Unknown
//IL_02a6: Unknown result type (might be due to invalid IL or missing references)
//IL_02b0: Expected O, but got Unknown
//IL_02b1: Unknown result type (might be due to invalid IL or missing references)
//IL_02bb: Expected O, but got Unknown
//IL_02bc: Unknown result type (might be due to invalid IL or missing references)
//IL_02c6: Expected O, but got Unknown
//IL_02c7: Unknown result type (might be due to invalid IL or missing references)
//IL_02d1: Expected O, but got Unknown
//IL_02d2: Unknown result type (might be due to invalid IL or missing references)
//IL_02dc: Expected O, but got Unknown
//IL_02dd: Unknown result type (might be due to invalid IL or missing references)
//IL_02e7: Expected O, but got Unknown
//IL_02e8: Unknown result type (might be due to invalid IL or missing references)
//IL_02f2: Expected O, but got Unknown
//IL_02f9: Unknown result type (might be due to invalid IL or missing references)
//IL_0303: Expected O, but got Unknown
//IL_03ac: Unknown result type (might be due to invalid IL or missing references)
//IL_03b6: Expected O, but got Unknown
//IL_03c8: Unknown result type (might be due to invalid IL or missing references)
//IL_03d2: Expected O, but got Unknown
//IL_041a: Unknown result type (might be due to invalid IL or missing references)
//IL_0454: Unknown result type (might be due to invalid IL or missing references)
//IL_045e: Expected O, but got Unknown
//IL_0470: Unknown result type (might be due to invalid IL or missing references)
//IL_047a: Expected O, but got Unknown
//IL_048b: Unknown result type (might be due to invalid IL or missing references)
//IL_04c1: Unknown result type (might be due to invalid IL or missing references)
//IL_04cb: Expected O, but got Unknown
//IL_0545: Unknown result type (might be due to invalid IL or missing references)
//IL_057f: Unknown result type (might be due to invalid IL or missing references)
//IL_0589: Expected O, but got Unknown
//IL_059b: Unknown result type (might be due to invalid IL or missing references)
//IL_05a5: Expected O, but got Unknown
//IL_05b7: Unknown result type (might be due to invalid IL or missing references)
//IL_05c1: Expected O, but got Unknown
//IL_05d3: Unknown result type (might be due to invalid IL or missing references)
//IL_05dd: Expected O, but got Unknown
//IL_05ee: Unknown result type (might be due to invalid IL or missing references)
//IL_0660: Unknown result type (might be due to invalid IL or missing references)
//IL_0689: Unknown result type (might be due to invalid IL or missing references)
//IL_06d6: Unknown result type (might be due to invalid IL or missing references)
//IL_06fc: Unknown result type (might be due to invalid IL or missing references)
//IL_0754: Unknown result type (might be due to invalid IL or missing references)
//IL_077a: Unknown result type (might be due to invalid IL or missing references)
//IL_07df: Unknown result type (might be due to invalid IL or missing references)
//IL_0805: Unknown result type (might be due to invalid IL or missing references)
//IL_092b: Unknown result type (might be due to invalid IL or missing references)
//IL_0957: Unknown result type (might be due to invalid IL or missing references)
//IL_09a4: Unknown result type (might be due to invalid IL or missing references)
//IL_09ca: Unknown result type (might be due to invalid IL or missing references)
//IL_0a24: Unknown result type (might be due to invalid IL or missing references)
//IL_0a4a: Unknown result type (might be due to invalid IL or missing references)
//IL_0a9a: Unknown result type (might be due to invalid IL or missing references)
//IL_0acd: Unknown result type (might be due to invalid IL or missing references)
//IL_0b00: Unknown result type (might be due to invalid IL or missing references)
//IL_0b33: Unknown result type (might be due to invalid IL or missing references)
//IL_0b66: Unknown result type (might be due to invalid IL or missing references)
//IL_0b99: Unknown result type (might be due to invalid IL or missing references)
//IL_0bcc: Unknown result type (might be due to invalid IL or missing references)
//IL_0bff: Unknown result type (might be due to invalid IL or missing references)
//IL_0c32: Unknown result type (might be due to invalid IL or missing references)
//IL_0c65: Unknown result type (might be due to invalid IL or missing references)
//IL_0c98: Unknown result type (might be due to invalid IL or missing references)
//IL_0ccb: Unknown result type (might be due to invalid IL or missing references)
//IL_0d12: Unknown result type (might be due to invalid IL or missing references)
//IL_0d1c: Expected O, but got Unknown
//IL_0d29: Unknown result type (might be due to invalid IL or missing references)
//IL_0d55: Unknown result type (might be due to invalid IL or missing references)
//IL_0e20: Unknown result type (might be due to invalid IL or missing references)
//IL_0e49: Unknown result type (might be due to invalid IL or missing references)
//IL_0e89: Unknown result type (might be due to invalid IL or missing references)
//IL_0eaf: Unknown result type (might be due to invalid IL or missing references)
//IL_0f07: Unknown result type (might be due to invalid IL or missing references)
//IL_0f2d: Unknown result type (might be due to invalid IL or missing references)
//IL_0f99: Unknown result type (might be due to invalid IL or missing references)
//IL_0fa3: Expected O, but got Unknown
//IL_0fb5: Unknown result type (might be due to invalid IL or missing references)
//IL_0fbf: Expected O, but got Unknown
//IL_103d: Unknown result type (might be due to invalid IL or missing references)
//IL_1077: Unknown result type (might be due to invalid IL or missing references)
//IL_1081: Expected O, but got Unknown
//IL_1093: Unknown result type (might be due to invalid IL or missing references)
//IL_109d: Expected O, but got Unknown
//IL_10af: Unknown result type (might be due to invalid IL or missing references)
//IL_10b9: Expected O, but got Unknown
//IL_10cb: Unknown result type (might be due to invalid IL or missing references)
//IL_10d5: Expected O, but got Unknown
//IL_10e6: Unknown result type (might be due to invalid IL or missing references)
//IL_114e: Unknown result type (might be due to invalid IL or missing references)
//IL_117a: Unknown result type (might be due to invalid IL or missing references)
//IL_11b6: Unknown result type (might be due to invalid IL or missing references)
//IL_11cb: Unknown result type (might be due to invalid IL or missing references)
//IL_1204: Unknown result type (might be due to invalid IL or missing references)
//IL_1252: Unknown result type (might be due to invalid IL or missing references)
//IL_1278: Unknown result type (might be due to invalid IL or missing references)
//IL_1473: Unknown result type (might be due to invalid IL or missing references)
//IL_149c: Unknown result type (might be due to invalid IL or missing references)
//IL_14ec: Unknown result type (might be due to invalid IL or missing references)
//IL_1512: Unknown result type (might be due to invalid IL or missing references)
//IL_1549: Unknown result type (might be due to invalid IL or missing references)
//IL_157c: Unknown result type (might be due to invalid IL or missing references)
//IL_15b3: Unknown result type (might be due to invalid IL or missing references)
//IL_15e6: Unknown result type (might be due to invalid IL or missing references)
//IL_161d: Unknown result type (might be due to invalid IL or missing references)
//IL_1650: Unknown result type (might be due to invalid IL or missing references)
//IL_1687: Unknown result type (might be due to invalid IL or missing references)
//IL_16ba: Unknown result type (might be due to invalid IL or missing references)
//IL_16f1: Unknown result type (might be due to invalid IL or missing references)
//IL_1724: Unknown result type (might be due to invalid IL or missing references)
//IL_175b: Unknown result type (might be due to invalid IL or missing references)
//IL_178e: Unknown result type (might be due to invalid IL or missing references)
//IL_17c5: Unknown result type (might be due to invalid IL or missing references)
//IL_17f8: Unknown result type (might be due to invalid IL or missing references)
//IL_182f: Unknown result type (might be due to invalid IL or missing references)
//IL_1862: Unknown result type (might be due to invalid IL or missing references)
//IL_1899: Unknown result type (might be due to invalid IL or missing references)
//IL_18cc: Unknown result type (might be due to invalid IL or missing references)
//IL_1903: Unknown result type (might be due to invalid IL or missing references)
//IL_1936: Unknown result type (might be due to invalid IL or missing references)
//IL_196d: Unknown result type (might be due to invalid IL or missing references)
//IL_19a0: Unknown result type (might be due to invalid IL or missing references)
//IL_19d7: Unknown result type (might be due to invalid IL or missing references)
//IL_1a0a: Unknown result type (might be due to invalid IL or missing references)
//IL_1a41: Unknown result type (might be due to invalid IL or missing references)
//IL_1a74: Unknown result type (might be due to invalid IL or missing references)
//IL_1aa8: Unknown result type (might be due to invalid IL or missing references)
//IL_1adb: Unknown result type (might be due to invalid IL or missing references)
//IL_1b0e: Unknown result type (might be due to invalid IL or missing references)
//IL_1b41: Unknown result type (might be due to invalid IL or missing references)
//IL_1b74: Unknown result type (might be due to invalid IL or missing references)
//IL_1ba7: Unknown result type (might be due to invalid IL or missing references)
//IL_1d94: Unknown result type (might be due to invalid IL or missing references)
//IL_1dbd: Unknown result type (might be due to invalid IL or missing references)
//IL_1e00: Unknown result type (might be due to invalid IL or missing references)
//IL_1e34: Unknown result type (might be due to invalid IL or missing references)
//IL_1e77: Unknown result type (might be due to invalid IL or missing references)
//IL_1e9d: Unknown result type (might be due to invalid IL or missing references)
//IL_1ed3: Unknown result type (might be due to invalid IL or missing references)
//IL_1f06: Unknown result type (might be due to invalid IL or missing references)
//IL_1f3a: Unknown result type (might be due to invalid IL or missing references)
//IL_1f6d: Unknown result type (might be due to invalid IL or missing references)
//IL_1fb1: Unknown result type (might be due to invalid IL or missing references)
//IL_1fd7: Unknown result type (might be due to invalid IL or missing references)
//IL_2018: Unknown result type (might be due to invalid IL or missing references)
//IL_203e: Unknown result type (might be due to invalid IL or missing references)
//IL_2075: Unknown result type (might be due to invalid IL or missing references)
//IL_209b: Unknown result type (might be due to invalid IL or missing references)
//IL_20f7: Unknown result type (might be due to invalid IL or missing references)
//IL_211d: Unknown result type (might be due to invalid IL or missing references)
//IL_2179: Unknown result type (might be due to invalid IL or missing references)
//IL_219f: Unknown result type (might be due to invalid IL or missing references)
//IL_21fb: Unknown result type (might be due to invalid IL or missing references)
//IL_2221: Unknown result type (might be due to invalid IL or missing references)
//IL_2286: Unknown result type (might be due to invalid IL or missing references)
//IL_2290: Expected O, but got Unknown
//IL_229b: Unknown result type (might be due to invalid IL or missing references)
//IL_22c1: Unknown result type (might be due to invalid IL or missing references)
//IL_2319: Unknown result type (might be due to invalid IL or missing references)
//IL_233f: Unknown result type (might be due to invalid IL or missing references)
//IL_239a: Unknown result type (might be due to invalid IL or missing references)
//IL_23c0: Unknown result type (might be due to invalid IL or missing references)
//IL_241b: Unknown result type (might be due to invalid IL or missing references)
//IL_2441: Unknown result type (might be due to invalid IL or missing references)
//IL_249c: Unknown result type (might be due to invalid IL or missing references)
//IL_24c2: Unknown result type (might be due to invalid IL or missing references)
//IL_251d: Unknown result type (might be due to invalid IL or missing references)
//IL_2543: Unknown result type (might be due to invalid IL or missing references)
//IL_259b: Unknown result type (might be due to invalid IL or missing references)
//IL_25c1: Unknown result type (might be due to invalid IL or missing references)
//IL_2619: Unknown result type (might be due to invalid IL or missing references)
//IL_263f: Unknown result type (might be due to invalid IL or missing references)
//IL_2726: Unknown result type (might be due to invalid IL or missing references)
//IL_274f: Unknown result type (might be due to invalid IL or missing references)
//IL_2792: Unknown result type (might be due to invalid IL or missing references)
//IL_27b8: Unknown result type (might be due to invalid IL or missing references)
//IL_2813: Unknown result type (might be due to invalid IL or missing references)
//IL_2846: Unknown result type (might be due to invalid IL or missing references)
//IL_287d: Unknown result type (might be due to invalid IL or missing references)
//IL_28a3: Unknown result type (might be due to invalid IL or missing references)
//IL_28fb: Unknown result type (might be due to invalid IL or missing references)
//IL_2921: Unknown result type (might be due to invalid IL or missing references)
//IL_2989: Unknown result type (might be due to invalid IL or missing references)
//IL_29af: Unknown result type (might be due to invalid IL or missing references)
//IL_29f7: Unknown result type (might be due to invalid IL or missing references)
//IL_2a01: Expected O, but got Unknown
//IL_2a0d: Unknown result type (might be due to invalid IL or missing references)
//IL_2a21: Unknown result type (might be due to invalid IL or missing references)
//IL_2a37: Unknown result type (might be due to invalid IL or missing references)
//IL_2a60: Unknown result type (might be due to invalid IL or missing references)
//IL_2a6a: Expected O, but got Unknown
//IL_2a7e: Unknown result type (might be due to invalid IL or missing references)
//IL_2a94: Unknown result type (might be due to invalid IL or missing references)
components = (IContainer)(object)new Container();
ComponentResourceManager val = (ComponentResourceManager)(object)new ComponentResourceManager(typeof(MainForm));
tableLayoutPanel1 = (TableLayoutPanel)(object)new TableLayoutPanel();
tableLayoutPanel2 = (TableLayoutPanel)(object)new TableLayoutPanel();
groupBoxSerialPort = (GroupBox)(object)new GroupBox();
buttonOpenClose = (Button)(object)new Button();
buttonRefresh = (Button)(object)new Button();
comboBoxSerialPort = (ComboBox)(object)new ComboBox();
groupBoxPassword = (GroupBox)(object)new GroupBox();
radioButtonPassB = (RadioButton)(object)new RadioButton();
radioButtonPassA = (RadioButton)(object)new RadioButton();
textBoxPassword6 = (TextBox)(object)new TextBox();
textBoxPassword5 = (TextBox)(object)new TextBox();
textBoxPassword4 = (TextBox)(object)new TextBox();
textBoxPassword3 = (TextBox)(object)new TextBox();
textBoxPassword2 = (TextBox)(object)new TextBox();
textBoxPassword1 = (TextBox)(object)new TextBox();
pictureBox1 = (PictureBox)(object)new PictureBox();
groupBoxStateSele = (GroupBox)(object)new GroupBox();
buttonTest = (Button)(object)new Button();
buttonPCState = (Button)(object)new Button();
tableLayoutPanel3 = (TableLayoutPanel)(object)new TableLayoutPanel();
groupBoxDataReceive = (GroupBox)(object)new GroupBox();
richTextBoxDataReceived = (RichTextBox)(object)new RichTextBox();
buttonTextClear = (Button)(object)new Button();
groupBoxDataTrans = (GroupBox)(object)new GroupBox();
label5 = (Label)(object)new Label();
textBoxData16 = (TextBox)(object)new TextBox();
textBoxData15 = (TextBox)(object)new TextBox();
textBoxData14 = (TextBox)(object)new TextBox();
textBoxData13 = (TextBox)(object)new TextBox();
textBoxData12 = (TextBox)(object)new TextBox();
textBoxData11 = (TextBox)(object)new TextBox();
textBoxData10 = (TextBox)(object)new TextBox();
textBoxData9 = (TextBox)(object)new TextBox();
textBoxData8 = (TextBox)(object)new TextBox();
textBoxData7 = (TextBox)(object)new TextBox();
textBoxData6 = (TextBox)(object)new TextBox();
textBoxData5 = (TextBox)(object)new TextBox();
textBoxData4 = (TextBox)(object)new TextBox();
textBoxData3 = (TextBox)(object)new TextBox();
textBoxData2 = (TextBox)(object)new TextBox();
textBoxData1 = (TextBox)(object)new TextBox();
groupBoxCommand = (GroupBox)(object)new GroupBox();
textBoxValue = (TextBox)(object)new TextBox();
label1 = (Label)(object)new Label();
textBoxGoalAddr = (TextBox)(object)new TextBox();
textBoxSourceAddr = (TextBox)(object)new TextBox();
label3 = (Label)(object)new Label();
label2 = (Label)(object)new Label();
buttonHalt = (Button)(object)new Button();
buttonBackup = (Button)(object)new Button();
buttonIncrease = (Button)(object)new Button();
buttonDecrease = (Button)(object)new Button();
button1ValueWrite = (Button)(object)new Button();
button1ValueRead = (Button)(object)new Button();
buttonPcdWrite = (Button)(object)new Button();
buttonPcdRead = (Button)(object)new Button();
buttonAuth = (Button)(object)new Button();
buttonSele = (Button)(object)new Button();
buttonAntiCol = (Button)(object)new Button();
buttonRequest = (Button)(object)new Button();
groupBoxComCommand = (GroupBox)(object)new GroupBox();
buttonDataWrite = (Button)(object)new Button();
textBoxBlockAddr = (TextBox)(object)new TextBox();
buttonDataRead = (Button)(object)new Button();
buttonIDRead = (Button)(object)new Button();
label4 = (Label)(object)new Label();
serialPort1 = (SerialPort)(object)new SerialPort(components);
((Control)tableLayoutPanel1).SuspendLayout();
((Control)tableLayoutPanel2).SuspendLayout();
((Control)groupBoxSerialPort).SuspendLayout();
((Control)groupBoxPassword).SuspendLayout();
((ISupportInitialize)pictureBox1).BeginInit();
((Control)groupBoxStateSele).SuspendLayout();
((Control)tableLayoutPanel3).SuspendLayout();
((Control)groupBoxDataReceive).SuspendLayout();
((Control)groupBoxDataTrans).SuspendLayout();
((Control)groupBoxCommand).SuspendLayout();
((Control)groupBoxComCommand).SuspendLayout();
((Control)this).SuspendLayout();
tableLayoutPanel1.set_ColumnCount(2);
tableLayoutPanel1.get_ColumnStyles().Add((ColumnStyle)(object)new ColumnStyle((SizeType)2, 26.53595f));
tableLayoutPanel1.get_ColumnStyles().Add((ColumnStyle)(object)new ColumnStyle((SizeType)2, 73.46405f));
tableLayoutPanel1.get_Controls().Add((Control)(object)tableLayoutPanel2, 0, 0);
tableLayoutPanel1.get_Controls().Add((Control)(object)tableLayoutPanel3, 1, 0);
((Control)tableLayoutPanel1).set_Dock((DockStyle)5);
((Control)tableLayoutPanel1).set_Location(new Point(0, 0));
((Control)tableLayoutPanel1).set_Name("tableLayoutPanel1");
tableLayoutPanel1.set_RowCount(1);
tableLayoutPanel1.get_RowStyles().Add((RowStyle)(object)new RowStyle((SizeType)2, 100f));
tableLayoutPanel1.get_RowStyles().Add((RowStyle)(object)new RowStyle((SizeType)1, 529f));
((Control)tableLayoutPanel1).set_Size(new Size(765, 508));
((Control)tableLayoutPanel1).set_TabIndex(0);
tableLayoutPanel2.set_ColumnCount(1);
tableLayoutPanel2.get_ColumnStyles().Add((ColumnStyle)(object)new ColumnStyle((SizeType)2, 100f));
tableLayoutPanel2.get_Controls().Add((Control)(object)groupBoxSerialPort, 0, 0);
tableLayoutPanel2.get_Controls().Add((Control)(object)groupBoxPassword, 0, 2);
tableLayoutPanel2.get_Controls().Add((Control)(object)pictureBox1, 0, 3);
tableLayoutPanel2.get_Controls().Add((Control)(object)groupBoxStateSele, 0, 1);
((Control)tableLayoutPanel2).set_Dock((DockStyle)5);
((Control)tableLayoutPanel2).set_Location(new Point(3, 3));
((Control)tableLayoutPanel2).set_Name("tableLayoutPanel2");
tableLayoutPanel2.set_RowCount(4);
tableLayoutPanel2.get_RowStyles().Add((RowStyle)(object)new RowStyle((SizeType)2, 22.70916f));
tableLayoutPanel2.get_RowStyles().Add((RowStyle)(object)new RowStyle((SizeType)2, 16.13546f));
tableLayoutPanel2.get_RowStyles().Add((RowStyle)(object)new RowStyle((SizeType)2, 31.67331f));
tableLayoutPanel2.get_RowStyles().Add((RowStyle)(object)new RowStyle((SizeType)2, 29.28287f));
((Control)tableLayoutPanel2).set_Size(new Size(197, 502));
((Control)tableLayoutPanel2).set_TabIndex(0);
((Control)groupBoxSerialPort).get_Controls().Add((Control)(object)buttonOpenClose);
((Control)groupBoxSerialPort).get_Controls().Add((Control)(object)buttonRefresh);
((Control)groupBoxSerialPort).get_Controls().Add((Control)(object)comboBoxSerialPort);
((Control)groupBoxSerialPort).set_Dock((DockStyle)5);
((Control)groupBoxSerialPort).set_Location(new Point(3, 3));
((Control)groupBoxSerialPort).set_Name("groupBoxSerialPort");
((Control)groupBoxSerialPort).set_Size(new Size(191, 108));
((Control)groupBoxSerialPort).set_TabIndex(0);
groupBoxSerialPort.set_TabStop(false);
((Control)groupBoxSerialPort).set_Text("Serial Port");
((Control)buttonOpenClose).set_Enabled(false);
((Control)buttonOpenClose).set_Location(new Point(100, 66));
((Control)buttonOpenClose).set_Name("buttonOpenClose");
((Control)buttonOpenClose).set_Size(new Size(75, 23));
((Control)buttonOpenClose).set_TabIndex(2);
((Control)buttonOpenClose).set_Text("&Open");
((ButtonBase)buttonOpenClose).set_UseVisualStyleBackColor(true);
((Control)buttonOpenClose).add_Click((EventHandler)buttonOpenClose_Click);
((Control)buttonRefresh).set_Location(new Point(19, 66));
((Control)buttonRefresh).set_Name("buttonRefresh");
((Control)buttonRefresh).set_Size(new Size(75, 23));
((Control)buttonRefresh).set_TabIndex(1);
((Control)buttonRefresh).set_Text("&Refresh");
((ButtonBase)buttonRefresh).set_UseVisualStyleBackColor(true);
((Control)buttonRefresh).add_Click((EventHandler)buttonRefresh_Click);
((ListControl)comboBoxSerialPort).set_FormattingEnabled(true);
((Control)comboBoxSerialPort).set_Location(new Point(35, 29));
((Control)comboBoxSerialPort).set_Name("comboBoxSerialPort");
((Control)comboBoxSerialPort).set_Size(new Size(121, 20));
((Control)comboBoxSerialPort).set_TabIndex(0);
comboBoxSerialPort.add_SelectedIndexChanged((EventHandler)comboBoxSerialPort_SelectedIndexChanged);
((Control)comboBoxSerialPort).add_TextChanged((EventHandler)comboBoxSerialPort_TextChanged);
((Control)groupBoxPassword).get_Controls().Add((Control)(object)radioButtonPassB);
((Control)groupBoxPassword).get_Controls().Add((Control)(object)radioButtonPassA);
((Control)groupBoxPassword).get_Controls().Add((Control)(object)textBoxPassword6);
((Control)groupBoxPassword).get_Controls().Add((Control)(object)textBoxPassword5);
((Control)groupBoxPassword).get_Controls().Add((Control)(object)textBoxPassword4);
((Control)groupBoxPassword).get_Controls().Add((Control)(object)textBoxPassword3);
((Control)groupBoxPassword).get_Controls().Add((Control)(object)textBoxPassword2);
((Control)groupBoxPassword).get_Controls().Add((Control)(object)textBoxPassword1);
((Control)groupBoxPassword).set_Dock((DockStyle)5);
((Control)groupBoxPassword).set_Enabled(false);
((Control)groupBoxPassword).set_Location(new Point(3, 198));
((Control)groupBoxPassword).set_Name("groupBoxPassword");
((Control)groupBoxPassword).set_Size(new Size(191, 153));
((Control)groupBoxPassword).set_TabIndex(1);
groupBoxPassword.set_TabStop(false);
((Control)groupBoxPassword).set_Text("Password");
((Control)radioButtonPassB).set_AutoSize(true);
((Control)radioButtonPassB).set_Location(new Point(44, 99));
((Control)radioButtonPassB).set_Name("radioButtonPassB");
((Control)radioButtonPassB).set_Size(new Size(83, 16));
((Control)radioButtonPassB).set_TabIndex(7);
((Control)radioButtonPassB).set_Text("Password B");
((ButtonBase)radioButtonPassB).set_UseVisualStyleBackColor(true);
((Control)radioButtonPassA).set_AutoSize(true);
radioButtonPassA.set_Checked(true);
((Control)radioButtonPassA).set_Location(new Point(44, 77));
((Control)radioButtonPassA).set_Name("radioButtonPassA");
((Control)radioButtonPassA).set_Size(new Size(83, 16));
((Control)radioButtonPassA).set_TabIndex(6);
radioButtonPassA.set_TabStop(true);
((Control)radioButtonPassA).set_Text("Password A");
((ButtonBase)radioButtonPassA).set_UseVisualStyleBackColor(true);
((Control)textBoxPassword6).set_Location(new Point(144, 39));
((TextBoxBase)textBoxPassword6).set_MaxLength(2);
((Control)textBoxPassword6).set_Name("textBoxPassword6");
((Control)textBoxPassword6).set_Size(new Size(19, 21));
((Control)textBoxPassword6).set_TabIndex(5);
((Control)textBoxPassword6).set_Text("FF");
((Control)textBoxPassword5).set_Location(new Point(119, 39));
((TextBoxBase)textBoxPassword5).set_MaxLength(2);
((Control)textBoxPassword5).set_Name("textBoxPassword5");
((Control)textBoxPassword5).set_Size(new Size(19, 21));
((Control)textBoxPassword5).set_TabIndex(4);
((Control)textBoxPassword5).set_Text("FF");
((Control)textBoxPassword4).set_Location(new Point(94, 39));
((TextBoxBase)textBoxPassword4).set_MaxLength(2);
((Control)textBoxPassword4).set_Name("textBoxPassword4");
((Control)textBoxPassword4).set_Size(new Size(19, 21));
((Control)textBoxPassword4).set_TabIndex(3);
((Control)textBoxPassword4).set_Text("FF");
((Control)textBoxPassword3).set_Location(new Point(69, 39));
((TextBoxBase)textBoxPassword3).set_MaxLength(2);
((Control)textBoxPassword3).set_Name("textBoxPassword3");
((Control)textBoxPassword3).set_Size(new Size(19, 21));
((Control)textBoxPassword3).set_TabIndex(2);
((Control)textBoxPassword3).set_Text("FF");
((Control)textBoxPassword2).set_Location(new Point(44, 39));
((TextBoxBase)textBoxPassword2).set_MaxLength(2);
((Control)textBoxPassword2).set_Name("textBoxPassword2");
((Control)textBoxPassword2).set_Size(new Size(19, 21));
((Control)textBoxPassword2).set_TabIndex(1);
((Control)textBoxPassword2).set_Text("FF");
((Control)textBoxPassword1).set_Location(new Point(19, 39));
((TextBoxBase)textBoxPassword1).set_MaxLength(2);
((Control)textBoxPassword1).set_Name("textBoxPassword1");
((Control)textBoxPassword1).set_Size(new Size(19, 21));
((Control)textBoxPassword1).set_TabIndex(0);
((Control)textBoxPassword1).set_Text("FF");
((Control)pictureBox1).set_Dock((DockStyle)5);
pictureBox1.set_Image((Image)(object)(Image)((ResourceManager)(object)val).GetObject("pictureBox1.Image"));
((Control)pictureBox1).set_Location(new Point(3, 357));
((Control)pictureBox1).set_Name("pictureBox1");
((Control)pictureBox1).set_Size(new Size(191, 142));
pictureBox1.set_SizeMode((PictureBoxSizeMode)4);
pictureBox1.set_TabIndex(2);
pictureBox1.set_TabStop(false);
((Control)pictureBox1).add_Click((EventHandler)pictureBox1_Click);
((Control)pictureBox1).add_MouseEnter((EventHandler)pictureBox1_MouseEnter);
((Control)pictureBox1).add_MouseLeave((EventHandler)pictureBox1_MouseLeave);
((Control)groupBoxStateSele).get_Controls().Add((Control)(object)buttonTest);
((Control)groupBoxStateSele).get_Controls().Add((Control)(object)buttonPCState);
((Control)groupBoxStateSele).set_Dock((DockStyle)5);
((Control)groupBoxStateSele).set_Enabled(false);
((Control)groupBoxStateSele).set_Location(new Point(3, 117));
((Control)groupBoxStateSele).set_Name("groupBoxStateSele");
((Control)groupBoxStateSele).set_Size(new Size(191, 75));
((Control)groupBoxStateSele).set_TabIndex(3);
groupBoxStateSele.set_TabStop(false);
((Control)groupBoxStateSele).set_Text("State Select");
((Control)buttonTest).set_Location(new Point(100, 30));
((Control)buttonTest).set_Name("buttonTest");
((Control)buttonTest).set_Size(new Size(75, 23));
((Control)buttonTest).set_TabIndex(1);
((Control)buttonTest).set_Text("&Test");
((ButtonBase)buttonTest).set_UseVisualStyleBackColor(true);
((Control)buttonTest).add_Click((EventHandler)buttonTest_Click);
((Control)buttonPCState).set_Location(new Point(19, 30));
((Control)buttonPCState).set_Name("buttonPCState");
((Control)buttonPCState).set_Size(new Size(75, 23));
((Control)buttonPCState).set_TabIndex(0);
((Control)buttonPCState).set_Text("&Normal");
((ButtonBase)buttonPCState).set_UseVisualStyleBackColor(true);
((Control)buttonPCState).add_Click((EventHandler)buttonPCState_Click);
tableLayoutPanel3.set_ColumnCount(1);
tableLayoutPanel3.get_ColumnStyles().Add((ColumnStyle)(object)new ColumnStyle((SizeType)2, 100f));
tableLayoutPanel3.get_ColumnStyles().Add((ColumnStyle)(object)new ColumnStyle((SizeType)1, 20f));
tableLayoutPanel3.get_Controls().Add((Control)(object)groupBoxDataReceive, 0, 0);
tableLayoutPanel3.get_Controls().Add((Control)(object)groupBoxDataTrans, 0, 1);
tableLayoutPanel3.get_Controls().Add((Control)(object)groupBoxCommand, 0, 2);
tableLayoutPanel3.get_Controls().Add((Control)(object)groupBoxComCommand, 0, 3);
((Control)tableLayoutPanel3).set_Dock((DockStyle)5);
((Control)tableLayoutPanel3).set_Location(new Point(206, 3));
((Control)tableLayoutPanel3).set_Name("tableLayoutPanel3");
tableLayoutPanel3.set_RowCount(4);
tableLayoutPanel3.get_RowStyles().Add((RowStyle)(object)new RowStyle((SizeType)2, 46.92144f));
tableLayoutPanel3.get_RowStyles().Add((RowStyle)(object)new RowStyle((SizeType)2, 12.73885f));
tableLayoutPanel3.get_RowStyles().Add((RowStyle)(object)new RowStyle((SizeType)2, 24.30279f));
tableLayoutPanel3.get_RowStyles().Add((RowStyle)(object)new RowStyle((SizeType)2, 16.53386f));
((Control)tableLayoutPanel3).set_Size(new Size(556, 502));
((Control)tableLayoutPanel3).set_TabIndex(1);
((Control)groupBoxDataReceive).get_Controls().Add((Control)(object)richTextBoxDataReceived);
((Control)groupBoxDataReceive).get_Controls().Add((Control)(object)buttonTextClear);
((Control)groupBoxDataReceive).set_Dock((DockStyle)5);
((Control)groupBoxDataReceive).set_Enabled(false);
((Control)groupBoxDataReceive).set_Location(new Point(3, 3));
((Control)groupBoxDataReceive).set_Name("groupBoxDataReceive");
((Control)groupBoxDataReceive).set_Size(new Size(550, 228));
((Control)groupBoxDataReceive).set_TabIndex(0);
groupBoxDataReceive.set_TabStop(false);
((Control)groupBoxDataReceive).set_Text("Data Received");
((Control)richTextBoxDataReceived).set_BackColor(SystemColors.get_Window());
((Control)richTextBoxDataReceived).set_Location(new Point(16, 20));
((Control)richTextBoxDataReceived).set_Name("richTextBoxDataReceived");
((TextBoxBase)richTextBoxDataReceived).set_ReadOnly(true);
((Control)richTextBoxDataReceived).set_Size(new Size(517, 169));
((Control)richTextBoxDataReceived).set_TabIndex(2);
((Control)richTextBoxDataReceived).set_Text("");
((Control)richTextBoxDataReceived).add_TextChanged((EventHandler)richTextBoxDataReceived_TextChanged);
((Control)buttonTextClear).set_Location(new Point(27, 195));
((Control)buttonTextClear).set_Name("buttonTextClear");
((Control)buttonTextClear).set_Size(new Size(75, 23));
((Control)buttonTextClear).set_TabIndex(1);
((Control)buttonTextClear).set_Text("Clear");
((ButtonBase)buttonTextClear).set_UseVisualStyleBackColor(true);
((Control)buttonTextClear).add_Click((EventHandler)buttonTextClear_Click);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)label5);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData16);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData15);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData14);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData13);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData12);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData11);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData10);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData9);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData8);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData7);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData6);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData5);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData4);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData3);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData2);
((Control)groupBoxDataTrans).get_Controls().Add((Control)(object)textBoxData1);
((Control)groupBoxDataTrans).set_Dock((DockStyle)5);
((Control)groupBoxDataTrans).set_Enabled(false);
((Control)groupBoxDataTrans).set_Location(new Point(3, 237));
((Control)groupBoxDataTrans).set_Name("groupBoxDataTrans");
((Control)groupBoxDataTrans).set_Size(new Size(550, 57));
((Control)groupBoxDataTrans).set_TabIndex(1);
groupBoxDataTrans.set_TabStop(false);
((Control)groupBoxDataTrans).set_Text("Data Transmit(Hex)");
((Control)label5).set_AutoSize(true);
((Control)label5).set_Location(new Point(460, 23));
((Control)label5).set_Name("label5");
((Control)label5).set_Size(new Size(35, 12));
((Control)label5).set_TabIndex(22);
((Control)label5).set_Text("(Hex)");
((Control)textBoxData16).set_Location(new Point(433, 20));
((TextBoxBase)textBoxData16).set_MaxLength(2);
((Control)textBoxData16).set_Name("textBoxData16");
((Control)textBoxData16).set_Size(new Size(19, 21));
((Control)textBoxData16).set_TabIndex(21);
((Control)textBoxData16).set_Text("FF");
((Control)textBoxData15).set_Location(new Point(408, 20));
((TextBoxBase)textBoxData15).set_MaxLength(2);
((Control)textBoxData15).set_Name("textBoxData15");
((Control)textBoxData15).set_Size(new Size(19, 21));
((Control)textBoxData15).set_TabIndex(20);
((Control)textBoxData15).set_Text("EE");
((Control)textBoxData14).set_Location(new Point(383, 20));
((TextBoxBase)textBoxData14).set_MaxLength(2);
((Control)textBoxData14).set_Name("textBoxData14");
((Control)textBoxData14).set_Size(new Size(19, 21));
((Control)textBoxData14).set_TabIndex(19);
((Control)textBoxData14).set_Text("DD");
((Control)textBoxData13).set_Location(new Point(358, 20));
((TextBoxBase)textBoxData13).set_MaxLength(2);
((Control)textBoxData13).set_Name("textBoxData13");
((Control)textBoxData13).set_Size(new Size(19, 21));
((Control)textBoxData13).set_TabIndex(18);
((Control)textBoxData13).set_Text("CC");
((Control)textBoxData12).set_Location(new Point(333, 20));
((TextBoxBase)textBoxData12).set_MaxLength(2);
((Control)textBoxData12).set_Name("textBoxData12");
((Control)textBoxData12).set_Size(new Size(19, 21));
((Control)textBoxData12).set_TabIndex(17);
((Control)textBoxData12).set_Text("BB");
((Control)textBoxData11).set_Location(new Point(308, 20));
((TextBoxBase)textBoxData11).set_MaxLength(2);
((Control)textBoxData11).set_Name("textBoxData11");
((Control)textBoxData11).set_Size(new Size(19, 21));
((Control)textBoxData11).set_TabIndex(16);
((Control)textBoxData11).set_Text("AA");
((Control)textBoxData10).set_Location(new Point(283, 20));
((TextBoxBase)textBoxData10).set_MaxLength(2);
((Control)textBoxData10).set_Name("textBoxData10");
((Control)textBoxData10).set_Size(new Size(19, 21));
((Control)textBoxData10).set_TabIndex(15);
((Control)textBoxData10).set_Text("99");
((Control)textBoxData9).set_Location(new Point(258, 20));
((TextBoxBase)textBoxData9).set_MaxLength(2);
((Control)textBoxData9).set_Name("textBoxData9");
((Control)textBoxData9).set_Size(new Size(19, 21));
((Control)textBoxData9).set_TabIndex(14);
((Control)textBoxData9).set_Text("88");
((Control)textBoxData8).set_Location(new Point(233, 20));
((TextBoxBase)textBoxData8).set_MaxLength(2);
((Control)textBoxData8).set_Name("textBoxData8");
((Control)textBoxData8).set_Size(new Size(19, 21));
((Control)textBoxData8).set_TabIndex(13);
((Control)textBoxData8).set_Text("77");
((Control)textBoxData7).set_Location(new Point(208, 20));
((TextBoxBase)textBoxData7).set_MaxLength(2);
((Control)textBoxData7).set_Name("textBoxData7");
((Control)textBoxData7).set_Size(new Size(19, 21));
((Control)textBoxData7).set_TabIndex(12);
((Control)textBoxData7).set_Text("66");
((Control)textBoxData6).set_Location(new Point(183, 20));
((TextBoxBase)textBoxData6).set_MaxLength(2);
((Control)textBoxData6).set_Name("textBoxData6");
((Control)textBoxData6).set_Size(new Size(19, 21));
((Control)textBoxData6).set_TabIndex(11);
((Control)textBoxData6).set_Text("55");
((Control)textBoxData5).set_Location(new Point(158, 20));
((TextBoxBase)textBoxData5).set_MaxLength(2);
((Control)textBoxData5).set_Name("textBoxData5");
((Control)textBoxData5).set_Size(new Size(19, 21));
((Control)textBoxData5).set_TabIndex(10);
((Control)textBoxData5).set_Text("44");
((Control)textBoxData4).set_Location(new Point(133, 20));
((TextBoxBase)textBoxData4).set_MaxLength(2);
((Control)textBoxData4).set_Name("textBoxData4");
((Control)textBoxData4).set_Size(new Size(19, 21));
((Control)textBoxData4).set_TabIndex(9);
((Control)textBoxData4).set_Text("33");
((Control)textBoxData3).set_Location(new Point(108, 20));
((TextBoxBase)textBoxData3).set_MaxLength(2);
((Control)textBoxData3).set_Name("textBoxData3");
((Control)textBoxData3).set_Size(new Size(19, 21));
((Control)textBoxData3).set_TabIndex(8);
((Control)textBoxData3).set_Text("22");
((Control)textBoxData2).set_Location(new Point(83, 20));
((TextBoxBase)textBoxData2).set_MaxLength(2);
((Control)textBoxData2).set_Name("textBoxData2");
((Control)textBoxData2).set_Size(new Size(19, 21));
((Control)textBoxData2).set_TabIndex(7);
((Control)textBoxData2).set_Text("11");
((Control)textBoxData1).set_Location(new Point(58, 20));
((TextBoxBase)textBoxData1).set_MaxLength(2);
((Control)textBoxData1).set_Name("textBoxData1");
((Control)textBoxData1).set_Size(new Size(19, 21));
((Control)textBoxData1).set_TabIndex(6);
((Control)textBoxData1).set_Text("00");
((Control)groupBoxCommand).get_Controls().Add((Control)(object)textBoxValue);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)label1);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)textBoxGoalAddr);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)textBoxSourceAddr);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)label3);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)label2);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)buttonHalt);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)buttonBackup);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)buttonIncrease);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)buttonDecrease);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)button1ValueWrite);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)button1ValueRead);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)buttonPcdWrite);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)buttonPcdRead);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)buttonAuth);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)buttonSele);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)buttonAntiCol);
((Control)groupBoxCommand).get_Controls().Add((Control)(object)buttonRequest);
((Control)groupBoxCommand).set_Dock((DockStyle)5);
((Control)groupBoxCommand).set_Enabled(false);
((Control)groupBoxCommand).set_Location(new Point(3, 300));
((Control)groupBoxCommand).set_Name("groupBoxCommand");
((Control)groupBoxCommand).set_Size(new Size(550, 115));
((Control)groupBoxCommand).set_TabIndex(2);
groupBoxCommand.set_TabStop(false);
((Control)groupBoxCommand).set_Text("Command");
((Control)textBoxValue).set_Location(new Point(355, 84));
((TextBoxBase)textBoxValue).set_MaxLength(10);
((Control)textBoxValue).set_Name("textBoxValue");
((Control)textBoxValue).set_Size(new Size(72, 21));
((Control)textBoxValue).set_TabIndex(4);
((Control)textBoxValue).set_Text("1");
((Control)label1).set_AutoSize(true);
((Control)label1).set_Location(new Point(303, 87));
((Control)label1).set_Name("label1");
((Control)label1).set_Size(new Size(41, 12));
((Control)label1).set_TabIndex(3);
((Control)label1).set_Text("Value:");
((Control)textBoxGoalAddr).set_Location(new Point(217, 84));
((TextBoxBase)textBoxGoalAddr).set_MaxLength(2);
((Control)textBoxGoalAddr).set_Name("textBoxGoalAddr");
((Control)textBoxGoalAddr).set_Size(new Size(35, 21));
((Control)textBoxGoalAddr).set_TabIndex(16);
((Control)textBoxGoalAddr).set_Text("2");
((Control)textBoxSourceAddr).set_Location(new Point(92, 84));
((TextBoxBase)textBoxSourceAddr).set_MaxLength(2);
((Control)textBoxSourceAddr).set_Name("textBoxSourceAddr");
((Control)textBoxSourceAddr).set_Size(new Size(35, 21));
((Control)textBoxSourceAddr).set_TabIndex(15);
((Control)textBoxSourceAddr).set_Text("1");
((Control)label3).set_AutoSize(true);
((Control)label3).set_Location(new Point(147, 87));
((Control)label3).set_Name("label3");
((Control)label3).set_Size(new Size(65, 12));
((Control)label3).set_TabIndex(13);
((Control)label3).set_Text("Goal Addr:");
((Control)label2).set_AutoSize(true);
((Control)label2).set_Location(new Point(15, 87));
((Control)label2).set_Name("label2");
((Control)label2).set_Size(new Size(77, 12));
((Control)label2).set_TabIndex(12);
((Control)label2).set_Text("Source Addr:");
((Control)buttonHalt).set_Location(new Point(444, 49));
((Control)buttonHalt).set_Name("buttonHalt");
((Control)buttonHalt).set_Size(new Size(75, 23));
((Control)buttonHalt).set_TabIndex(11);
((Control)buttonHalt).set_Text("Halt");
((ButtonBase)buttonHalt).set_UseVisualStyleBackColor(true);
((Control)buttonHalt).add_Click((EventHandler)buttonHalt_Click);
((Control)buttonBackup).set_Location(new Point(358, 49));
((Control)buttonBackup).set_Name("buttonBackup");
((Control)buttonBackup).set_Size(new Size(75, 23));
((Control)buttonBackup).set_TabIndex(10);
((Control)buttonBackup).set_Text("Backup");
((ButtonBase)buttonBackup).set_UseVisualStyleBackColor(true);
((Control)buttonBackup).add_Click((EventHandler)buttonBackup_Click);
((Control)buttonIncrease).set_Location(new Point(272, 49));
((Control)buttonIncrease).set_Name("buttonIncrease");
((Control)buttonIncrease).set_Size(new Size(75, 23));
((Control)buttonIncrease).set_TabIndex(9);
((Control)buttonIncrease).set_Text("Increase");
((ButtonBase)buttonIncrease).set_UseVisualStyleBackColor(true);
((Control)buttonIncrease).add_Click((EventHandler)buttonIncrease_Click);
((Control)buttonDecrease).set_Location(new Point(188, 49));
((Control)buttonDecrease).set_Name("buttonDecrease");
((Control)buttonDecrease).set_Size(new Size(75, 23));
((Control)buttonDecrease).set_TabIndex(8);
((Control)buttonDecrease).set_Text("Decrease");
((ButtonBase)buttonDecrease).set_UseVisualStyleBackColor(true);
((Control)buttonDecrease).add_Click((EventHandler)buttonDecrease_Click);
((Control)button1ValueWrite).set_Font((Font)(object)new Font("宋体", 9f, (FontStyle)0, (GraphicsUnit)3, (byte)134));
((Control)button1ValueWrite).set_Location(new Point(102, 49));
((Control)button1ValueWrite).set_Name("button1ValueWrite");
((Control)button1ValueWrite).set_Size(new Size(75, 23));
((Control)button1ValueWrite).set_TabIndex(7);
((Control)button1ValueWrite).set_Text("Val write");
((ButtonBase)button1ValueWrite).set_UseVisualStyleBackColor(true);
((Control)button1ValueWrite).add_Click((EventHandler)button1ValueWrite_Click);
((Control)button1ValueRead).set_Location(new Point(17, 49));
((Control)button1ValueRead).set_Name("button1ValueRead");
((Control)button1ValueRead).set_Size(new Size(75, 23));
((Control)button1ValueRead).set_TabIndex(6);
((Control)button1ValueRead).set_Text("Value Read");
((ButtonBase)button1ValueRead).set_UseVisualStyleBackColor(true);
((Control)button1ValueRead).add_Click((EventHandler)button1ValueRead_Click);
((Control)buttonPcdWrite).set_Location(new Point(444, 20));
((Control)buttonPcdWrite).set_Name("buttonPcdWrite");
((Control)buttonPcdWrite).set_Size(new Size(75, 23));
((Control)buttonPcdWrite).set_TabIndex(5);
((Control)buttonPcdWrite).set_Text("Pcd Write");
((ButtonBase)buttonPcdWrite).set_UseVisualStyleBackColor(true);