Upload v1.0.0
This commit is contained in:
parent
b38719b6ca
commit
9d011aac04
2
.gitignore
vendored
2
.gitignore
vendored
@ -328,3 +328,5 @@ ASALocalRun/
|
|||||||
|
|
||||||
# MFractors (Xamarin productivity tool) working folder
|
# MFractors (Xamarin productivity tool) working folder
|
||||||
.mfractor/
|
.mfractor/
|
||||||
|
|
||||||
|
nfc-bin.zip
|
||||||
|
|||||||
44
MifareOneTool.sln
Normal file
44
MifareOneTool.sln
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
|
# Visual Studio 2010
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MifareOneTool", "MifareOneTool\MifareOneTool.csproj", "{CDB26016-FC77-403F-B22A-A011F8622FCF}"
|
||||||
|
EndProject
|
||||||
|
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Setup1", "Setup1\Setup1.vdproj", "{268A15B1-42D8-492E-9073-37068C805BD9}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||||
|
Debug|Win32 = Debug|Win32
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
Release|Mixed Platforms = Release|Mixed Platforms
|
||||||
|
Release|Win32 = Release|Win32
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{CDB26016-FC77-403F-B22A-A011F8622FCF}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||||
|
{CDB26016-FC77-403F-B22A-A011F8622FCF}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||||
|
{CDB26016-FC77-403F-B22A-A011F8622FCF}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||||
|
{CDB26016-FC77-403F-B22A-A011F8622FCF}.Debug|Win32.ActiveCfg = Debug|x86
|
||||||
|
{CDB26016-FC77-403F-B22A-A011F8622FCF}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{CDB26016-FC77-403F-B22A-A011F8622FCF}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{CDB26016-FC77-403F-B22A-A011F8622FCF}.Release|Any CPU.ActiveCfg = Release|x86
|
||||||
|
{CDB26016-FC77-403F-B22A-A011F8622FCF}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||||
|
{CDB26016-FC77-403F-B22A-A011F8622FCF}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||||
|
{CDB26016-FC77-403F-B22A-A011F8622FCF}.Release|Win32.ActiveCfg = Release|x86
|
||||||
|
{CDB26016-FC77-403F-B22A-A011F8622FCF}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{CDB26016-FC77-403F-B22A-A011F8622FCF}.Release|x86.Build.0 = Release|x86
|
||||||
|
{268A15B1-42D8-492E-9073-37068C805BD9}.Debug|Any CPU.ActiveCfg = Debug
|
||||||
|
{268A15B1-42D8-492E-9073-37068C805BD9}.Debug|Mixed Platforms.ActiveCfg = Debug
|
||||||
|
{268A15B1-42D8-492E-9073-37068C805BD9}.Debug|Win32.ActiveCfg = Debug
|
||||||
|
{268A15B1-42D8-492E-9073-37068C805BD9}.Debug|x86.ActiveCfg = Debug
|
||||||
|
{268A15B1-42D8-492E-9073-37068C805BD9}.Release|Any CPU.ActiveCfg = Release
|
||||||
|
{268A15B1-42D8-492E-9073-37068C805BD9}.Release|Mixed Platforms.ActiveCfg = Release
|
||||||
|
{268A15B1-42D8-492E-9073-37068C805BD9}.Release|Win32.ActiveCfg = Release
|
||||||
|
{268A15B1-42D8-492E-9073-37068C805BD9}.Release|x86.ActiveCfg = Release
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
264
MifareOneTool/Form1.Designer.cs
generated
Normal file
264
MifareOneTool/Form1.Designer.cs
generated
Normal file
@ -0,0 +1,264 @@
|
|||||||
|
namespace MifareOneTool
|
||||||
|
{
|
||||||
|
partial class Form1
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows 窗体设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.checkBox1 = new System.Windows.Forms.CheckBox();
|
||||||
|
this.button2 = new System.Windows.Forms.Button();
|
||||||
|
this.button1 = new System.Windows.Forms.Button();
|
||||||
|
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
|
||||||
|
this.button3 = new System.Windows.Forms.Button();
|
||||||
|
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.button8 = new System.Windows.Forms.Button();
|
||||||
|
this.button7 = new System.Windows.Forms.Button();
|
||||||
|
this.button6 = new System.Windows.Forms.Button();
|
||||||
|
this.button5 = new System.Windows.Forms.Button();
|
||||||
|
this.button4 = new System.Windows.Forms.Button();
|
||||||
|
this.button9 = new System.Windows.Forms.Button();
|
||||||
|
this.button10 = new System.Windows.Forms.Button();
|
||||||
|
this.button11 = new System.Windows.Forms.Button();
|
||||||
|
this.button12 = new System.Windows.Forms.Button();
|
||||||
|
this.groupBox1.SuspendLayout();
|
||||||
|
this.groupBox2.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// groupBox1
|
||||||
|
//
|
||||||
|
this.groupBox1.Controls.Add(this.button12);
|
||||||
|
this.groupBox1.Controls.Add(this.checkBox1);
|
||||||
|
this.groupBox1.Controls.Add(this.button2);
|
||||||
|
this.groupBox1.Controls.Add(this.button1);
|
||||||
|
this.groupBox1.Location = new System.Drawing.Point(12, 12);
|
||||||
|
this.groupBox1.Name = "groupBox1";
|
||||||
|
this.groupBox1.Size = new System.Drawing.Size(200, 83);
|
||||||
|
this.groupBox1.TabIndex = 0;
|
||||||
|
this.groupBox1.TabStop = false;
|
||||||
|
this.groupBox1.Text = "设备控制";
|
||||||
|
//
|
||||||
|
// checkBox1
|
||||||
|
//
|
||||||
|
this.checkBox1.AutoSize = true;
|
||||||
|
this.checkBox1.Enabled = false;
|
||||||
|
this.checkBox1.Location = new System.Drawing.Point(87, 56);
|
||||||
|
this.checkBox1.Name = "checkBox1";
|
||||||
|
this.checkBox1.Size = new System.Drawing.Size(89, 19);
|
||||||
|
this.checkBox1.TabIndex = 2;
|
||||||
|
this.checkBox1.Text = "自动扫描";
|
||||||
|
this.checkBox1.UseVisualStyleBackColor = true;
|
||||||
|
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
|
||||||
|
//
|
||||||
|
// button2
|
||||||
|
//
|
||||||
|
this.button2.Location = new System.Drawing.Point(6, 53);
|
||||||
|
this.button2.Name = "button2";
|
||||||
|
this.button2.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.button2.TabIndex = 1;
|
||||||
|
this.button2.Text = "手动扫描";
|
||||||
|
this.button2.UseVisualStyleBackColor = true;
|
||||||
|
this.button2.Click += new System.EventHandler(this.button2_Click);
|
||||||
|
//
|
||||||
|
// button1
|
||||||
|
//
|
||||||
|
this.button1.Location = new System.Drawing.Point(6, 24);
|
||||||
|
this.button1.Name = "button1";
|
||||||
|
this.button1.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.button1.TabIndex = 0;
|
||||||
|
this.button1.Text = "检测";
|
||||||
|
this.button1.UseVisualStyleBackColor = true;
|
||||||
|
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||||
|
//
|
||||||
|
// richTextBox1
|
||||||
|
//
|
||||||
|
this.richTextBox1.BackColor = System.Drawing.Color.Black;
|
||||||
|
this.richTextBox1.ForeColor = System.Drawing.Color.Lime;
|
||||||
|
this.richTextBox1.Location = new System.Drawing.Point(12, 101);
|
||||||
|
this.richTextBox1.Name = "richTextBox1";
|
||||||
|
this.richTextBox1.Size = new System.Drawing.Size(623, 293);
|
||||||
|
this.richTextBox1.TabIndex = 1;
|
||||||
|
this.richTextBox1.Text = "Hello,cardman!\n";
|
||||||
|
//
|
||||||
|
// button3
|
||||||
|
//
|
||||||
|
this.button3.Location = new System.Drawing.Point(6, 24);
|
||||||
|
this.button3.Name = "button3";
|
||||||
|
this.button3.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.button3.TabIndex = 3;
|
||||||
|
this.button3.Text = "读卡";
|
||||||
|
this.button3.UseVisualStyleBackColor = true;
|
||||||
|
this.button3.Click += new System.EventHandler(this.button3_Click);
|
||||||
|
//
|
||||||
|
// groupBox2
|
||||||
|
//
|
||||||
|
this.groupBox2.Controls.Add(this.button11);
|
||||||
|
this.groupBox2.Controls.Add(this.button10);
|
||||||
|
this.groupBox2.Controls.Add(this.button9);
|
||||||
|
this.groupBox2.Controls.Add(this.button8);
|
||||||
|
this.groupBox2.Controls.Add(this.button7);
|
||||||
|
this.groupBox2.Controls.Add(this.button6);
|
||||||
|
this.groupBox2.Controls.Add(this.button5);
|
||||||
|
this.groupBox2.Controls.Add(this.button4);
|
||||||
|
this.groupBox2.Controls.Add(this.button3);
|
||||||
|
this.groupBox2.Location = new System.Drawing.Point(218, 12);
|
||||||
|
this.groupBox2.Name = "groupBox2";
|
||||||
|
this.groupBox2.Size = new System.Drawing.Size(417, 83);
|
||||||
|
this.groupBox2.TabIndex = 4;
|
||||||
|
this.groupBox2.TabStop = false;
|
||||||
|
this.groupBox2.Text = "功能";
|
||||||
|
//
|
||||||
|
// button8
|
||||||
|
//
|
||||||
|
this.button8.Enabled = false;
|
||||||
|
this.button8.Location = new System.Drawing.Point(168, 53);
|
||||||
|
this.button8.Name = "button8";
|
||||||
|
this.button8.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.button8.TabIndex = 5;
|
||||||
|
this.button8.Text = "UID写号";
|
||||||
|
this.button8.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// button7
|
||||||
|
//
|
||||||
|
this.button7.Location = new System.Drawing.Point(249, 24);
|
||||||
|
this.button7.Name = "button7";
|
||||||
|
this.button7.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.button7.TabIndex = 7;
|
||||||
|
this.button7.Text = "UID全格";
|
||||||
|
this.button7.UseVisualStyleBackColor = true;
|
||||||
|
this.button7.Click += new System.EventHandler(this.button7_Click);
|
||||||
|
//
|
||||||
|
// button6
|
||||||
|
//
|
||||||
|
this.button6.Location = new System.Drawing.Point(168, 24);
|
||||||
|
this.button6.Name = "button6";
|
||||||
|
this.button6.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.button6.TabIndex = 6;
|
||||||
|
this.button6.Text = "UID重置";
|
||||||
|
this.button6.UseVisualStyleBackColor = true;
|
||||||
|
this.button6.Click += new System.EventHandler(this.button6_Click);
|
||||||
|
//
|
||||||
|
// button5
|
||||||
|
//
|
||||||
|
this.button5.Location = new System.Drawing.Point(87, 24);
|
||||||
|
this.button5.Name = "button5";
|
||||||
|
this.button5.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.button5.TabIndex = 5;
|
||||||
|
this.button5.Text = "写卡";
|
||||||
|
this.button5.UseVisualStyleBackColor = true;
|
||||||
|
this.button5.Click += new System.EventHandler(this.button5_Click);
|
||||||
|
//
|
||||||
|
// button4
|
||||||
|
//
|
||||||
|
this.button4.Location = new System.Drawing.Point(6, 53);
|
||||||
|
this.button4.Name = "button4";
|
||||||
|
this.button4.Size = new System.Drawing.Size(156, 23);
|
||||||
|
this.button4.TabIndex = 4;
|
||||||
|
this.button4.Text = "选择key.mfd";
|
||||||
|
this.button4.UseVisualStyleBackColor = true;
|
||||||
|
this.button4.Click += new System.EventHandler(this.button4_Click);
|
||||||
|
//
|
||||||
|
// button9
|
||||||
|
//
|
||||||
|
this.button9.Location = new System.Drawing.Point(249, 53);
|
||||||
|
this.button9.Name = "button9";
|
||||||
|
this.button9.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.button9.TabIndex = 8;
|
||||||
|
this.button9.Text = "MFOC";
|
||||||
|
this.button9.UseVisualStyleBackColor = true;
|
||||||
|
this.button9.Click += new System.EventHandler(this.button9_Click);
|
||||||
|
//
|
||||||
|
// button10
|
||||||
|
//
|
||||||
|
this.button10.Location = new System.Drawing.Point(330, 24);
|
||||||
|
this.button10.Name = "button10";
|
||||||
|
this.button10.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.button10.TabIndex = 9;
|
||||||
|
this.button10.Text = "后门读";
|
||||||
|
this.button10.UseVisualStyleBackColor = true;
|
||||||
|
this.button10.Click += new System.EventHandler(this.button10_Click);
|
||||||
|
//
|
||||||
|
// button11
|
||||||
|
//
|
||||||
|
this.button11.Location = new System.Drawing.Point(330, 53);
|
||||||
|
this.button11.Name = "button11";
|
||||||
|
this.button11.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.button11.TabIndex = 10;
|
||||||
|
this.button11.Text = "后门写";
|
||||||
|
this.button11.UseVisualStyleBackColor = true;
|
||||||
|
this.button11.Click += new System.EventHandler(this.button11_Click);
|
||||||
|
//
|
||||||
|
// button12
|
||||||
|
//
|
||||||
|
this.button12.Location = new System.Drawing.Point(87, 24);
|
||||||
|
this.button12.Name = "button12";
|
||||||
|
this.button12.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.button12.TabIndex = 11;
|
||||||
|
this.button12.Text = "手动CLI";
|
||||||
|
this.button12.UseVisualStyleBackColor = true;
|
||||||
|
this.button12.Click += new System.EventHandler(this.button12_Click);
|
||||||
|
//
|
||||||
|
// Form1
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(645, 406);
|
||||||
|
this.Controls.Add(this.groupBox2);
|
||||||
|
this.Controls.Add(this.richTextBox1);
|
||||||
|
this.Controls.Add(this.groupBox1);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.Name = "Form1";
|
||||||
|
this.Text = "MifareOne Tool";
|
||||||
|
this.Load += new System.EventHandler(this.Form1_Load);
|
||||||
|
this.groupBox1.ResumeLayout(false);
|
||||||
|
this.groupBox1.PerformLayout();
|
||||||
|
this.groupBox2.ResumeLayout(false);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.GroupBox groupBox1;
|
||||||
|
private System.Windows.Forms.CheckBox checkBox1;
|
||||||
|
private System.Windows.Forms.Button button2;
|
||||||
|
private System.Windows.Forms.Button button1;
|
||||||
|
private System.Windows.Forms.RichTextBox richTextBox1;
|
||||||
|
private System.Windows.Forms.Button button3;
|
||||||
|
private System.Windows.Forms.GroupBox groupBox2;
|
||||||
|
private System.Windows.Forms.Button button8;
|
||||||
|
private System.Windows.Forms.Button button7;
|
||||||
|
private System.Windows.Forms.Button button6;
|
||||||
|
private System.Windows.Forms.Button button5;
|
||||||
|
private System.Windows.Forms.Button button4;
|
||||||
|
private System.Windows.Forms.Button button12;
|
||||||
|
private System.Windows.Forms.Button button11;
|
||||||
|
private System.Windows.Forms.Button button10;
|
||||||
|
private System.Windows.Forms.Button button9;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
487
MifareOneTool/Form1.cs
Normal file
487
MifareOneTool/Form1.cs
Normal file
@ -0,0 +1,487 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Security.Cryptography;
|
||||||
|
|
||||||
|
namespace MifareOneTool
|
||||||
|
{
|
||||||
|
public partial class Form1 : Form
|
||||||
|
{
|
||||||
|
public Form1()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Process process = new Process();
|
||||||
|
private bool lprocess = false;
|
||||||
|
|
||||||
|
private void checkBox1_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (checkBox1.Checked == true)
|
||||||
|
{
|
||||||
|
button2.Enabled = false;
|
||||||
|
}else{
|
||||||
|
button2.Enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void lockBtn(bool locks)
|
||||||
|
{
|
||||||
|
//if (locks)
|
||||||
|
//{
|
||||||
|
// button1.Enabled = false;
|
||||||
|
// button2.Enabled = false;
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// button1.Enabled = true;
|
||||||
|
// button2.Enabled = true;
|
||||||
|
//}
|
||||||
|
;//do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (lprocess) { MessageBox.Show("有任务运行中,不可执行。", "设备忙", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }
|
||||||
|
BackgroundWorker bgw = new BackgroundWorker();
|
||||||
|
bgw.DoWork += new DoWorkEventHandler(list_dev);
|
||||||
|
bgw.WorkerReportsProgress = true;
|
||||||
|
bgw.ProgressChanged += new ProgressChangedEventHandler(default_rpt);
|
||||||
|
bgw.RunWorkerAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
void default_rpt(object sender, ProgressChangedEventArgs e)
|
||||||
|
{
|
||||||
|
logAppend((string)e.UserState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void logAppend(string msg){
|
||||||
|
richTextBox1.AppendText(msg + "\n");
|
||||||
|
richTextBox1.ScrollToCaret();
|
||||||
|
}
|
||||||
|
|
||||||
|
void list_dev(object sender, DoWorkEventArgs e)
|
||||||
|
{
|
||||||
|
if (lprocess) { return; }
|
||||||
|
ProcessStartInfo psi=new ProcessStartInfo("nfc-bin/nfc-scan-device.exe");
|
||||||
|
psi.CreateNoWindow=true;
|
||||||
|
psi.UseShellExecute=false;
|
||||||
|
psi.RedirectStandardOutput=true;
|
||||||
|
psi.RedirectStandardError = true;
|
||||||
|
lprocess = true;
|
||||||
|
BackgroundWorker b=(BackgroundWorker)sender;
|
||||||
|
process=Process.Start(psi);
|
||||||
|
process.OutputDataReceived += (s, _e)=> b.ReportProgress(0,_e.Data);
|
||||||
|
process.ErrorDataReceived += (s, _e) => b.ReportProgress(0,_e.Data);
|
||||||
|
//StreamReader stderr = process.StandardError;
|
||||||
|
process.BeginOutputReadLine();
|
||||||
|
process.BeginErrorReadLine();
|
||||||
|
process.WaitForExit();
|
||||||
|
lprocess = false;
|
||||||
|
b.ReportProgress(100,"##运行完毕##");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Form1_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (lprocess) { MessageBox.Show("有任务运行中,不可执行。", "设备忙", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }
|
||||||
|
BackgroundWorker bgw = new BackgroundWorker();
|
||||||
|
bgw.DoWork += new DoWorkEventHandler(list_tag);
|
||||||
|
bgw.WorkerReportsProgress = true;
|
||||||
|
bgw.ProgressChanged += new ProgressChangedEventHandler(default_rpt);
|
||||||
|
bgw.RunWorkerAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
void list_tag(object sender, DoWorkEventArgs e)
|
||||||
|
{
|
||||||
|
if (lprocess) { return; }
|
||||||
|
ProcessStartInfo psi = new ProcessStartInfo("nfc-bin/nfc-list.exe");
|
||||||
|
psi.CreateNoWindow = true;
|
||||||
|
psi.UseShellExecute = false;
|
||||||
|
psi.RedirectStandardOutput = true;
|
||||||
|
psi.RedirectStandardError = true;
|
||||||
|
lprocess = true;
|
||||||
|
BackgroundWorker b = (BackgroundWorker)sender;
|
||||||
|
process = Process.Start(psi);
|
||||||
|
process.OutputDataReceived += (s, _e) => b.ReportProgress(0, _e.Data);
|
||||||
|
process.ErrorDataReceived += (s, _e) => b.ReportProgress(0, _e.Data);
|
||||||
|
//StreamReader stderr = process.StandardError;
|
||||||
|
process.BeginOutputReadLine();
|
||||||
|
process.BeginErrorReadLine();
|
||||||
|
process.WaitForExit();
|
||||||
|
lprocess = false;
|
||||||
|
b.ReportProgress(100, "##运行完毕##");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button3_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (lprocess) { MessageBox.Show("有任务运行中,不可执行。", "设备忙", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }
|
||||||
|
string rmfd = "";
|
||||||
|
SaveFileDialog ofd = new SaveFileDialog();
|
||||||
|
ofd.AddExtension = true;
|
||||||
|
ofd.DefaultExt = ".mfd";
|
||||||
|
ofd.OverwritePrompt = true;
|
||||||
|
ofd.Filter = "MFD文件|*.mfd";
|
||||||
|
if (ofd.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
rmfd = ofd.FileName;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
string kt = "a";
|
||||||
|
if (MessageBox.Show("使用KeyA(是)或KeyB(否)?", "KeyA/B", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.No)
|
||||||
|
{
|
||||||
|
kt = "b";
|
||||||
|
}
|
||||||
|
BackgroundWorker bgw = new BackgroundWorker();
|
||||||
|
bgw.DoWork += new DoWorkEventHandler(mf_read);
|
||||||
|
bgw.WorkerReportsProgress = true;
|
||||||
|
bgw.ProgressChanged += new ProgressChangedEventHandler(default_rpt);
|
||||||
|
bgw.RunWorkerAsync(new string[] {rmfd,kt});
|
||||||
|
}
|
||||||
|
|
||||||
|
void mf_read(object sender, DoWorkEventArgs e)
|
||||||
|
{
|
||||||
|
if (lprocess) { return; }
|
||||||
|
ProcessStartInfo psi = new ProcessStartInfo("nfc-bin/nfc-mfclassic.exe");
|
||||||
|
string[] args = (string[])e.Argument;
|
||||||
|
psi.Arguments = "r " + args[1] + " u \"" + args[0] + "\"";
|
||||||
|
if (keymfd != "")
|
||||||
|
{
|
||||||
|
psi.Arguments += " \"" + keymfd + "\" f";
|
||||||
|
}
|
||||||
|
psi.CreateNoWindow = true;
|
||||||
|
psi.UseShellExecute = false;
|
||||||
|
psi.RedirectStandardOutput = true;
|
||||||
|
psi.RedirectStandardError = true;
|
||||||
|
lprocess = true;
|
||||||
|
BackgroundWorker b = (BackgroundWorker)sender;
|
||||||
|
process = Process.Start(psi);
|
||||||
|
process.OutputDataReceived += (s, _e) => b.ReportProgress(0, _e.Data);
|
||||||
|
process.ErrorDataReceived += (s, _e) => b.ReportProgress(0, _e.Data);
|
||||||
|
//StreamReader stderr = process.StandardError;
|
||||||
|
process.BeginOutputReadLine();
|
||||||
|
process.BeginErrorReadLine();
|
||||||
|
process.WaitForExit();
|
||||||
|
lprocess = false;
|
||||||
|
b.ReportProgress(100, "##运行完毕##");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button12_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ProcessStartInfo psi = new ProcessStartInfo("cmd.exe");
|
||||||
|
psi.WorkingDirectory = "nfc-bin";
|
||||||
|
Process.Start(psi);
|
||||||
|
}
|
||||||
|
|
||||||
|
private string keymfd = "";
|
||||||
|
|
||||||
|
private void button4_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
OpenFileDialog ofd = new OpenFileDialog();
|
||||||
|
ofd.CheckFileExists = true;
|
||||||
|
ofd.Filter = "MFD文件|*.mfd";
|
||||||
|
ofd.Multiselect = false;
|
||||||
|
if (ofd.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
keymfd = ofd.FileName;
|
||||||
|
button4.Text = "K=" + ofd.SafeFileName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button5_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (lprocess) { MessageBox.Show("有任务运行中,不可执行。", "设备忙", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }
|
||||||
|
string rmfd = "";
|
||||||
|
OpenFileDialog ofd = new OpenFileDialog();
|
||||||
|
ofd.CheckFileExists = true;
|
||||||
|
ofd.Filter = "MFD文件|*.mfd";
|
||||||
|
ofd.Multiselect = false;
|
||||||
|
if (ofd.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
rmfd = ofd.FileName;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
string kt = "a";
|
||||||
|
if (MessageBox.Show("使用KeyA(是)或KeyB(否)?", "KeyA/B", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.No)
|
||||||
|
{
|
||||||
|
kt = "b";
|
||||||
|
}
|
||||||
|
BackgroundWorker bgw = new BackgroundWorker();
|
||||||
|
bgw.DoWork += new DoWorkEventHandler(mf_write);
|
||||||
|
bgw.WorkerReportsProgress = true;
|
||||||
|
bgw.ProgressChanged += new ProgressChangedEventHandler(default_rpt);
|
||||||
|
bgw.RunWorkerAsync(new string[] { rmfd, kt });
|
||||||
|
}
|
||||||
|
|
||||||
|
void mf_write(object sender, DoWorkEventArgs e)
|
||||||
|
{
|
||||||
|
if (lprocess) { return; }
|
||||||
|
ProcessStartInfo psi = new ProcessStartInfo("nfc-bin/nfc-mfclassic.exe");
|
||||||
|
string[] args = (string[])e.Argument;
|
||||||
|
psi.Arguments = "w " + args[1] + " u \"" + args[0] + "\"";
|
||||||
|
if (keymfd != "")
|
||||||
|
{
|
||||||
|
psi.Arguments += " \"" + keymfd + "\" f";
|
||||||
|
}
|
||||||
|
psi.CreateNoWindow = true;
|
||||||
|
psi.UseShellExecute = false;
|
||||||
|
psi.RedirectStandardOutput = true;
|
||||||
|
psi.RedirectStandardError = true;
|
||||||
|
lprocess = true;
|
||||||
|
BackgroundWorker b = (BackgroundWorker)sender;
|
||||||
|
process = Process.Start(psi);
|
||||||
|
process.OutputDataReceived += (s, _e) => b.ReportProgress(0, _e.Data);
|
||||||
|
process.ErrorDataReceived += (s, _e) => b.ReportProgress(0, _e.Data);
|
||||||
|
//StreamReader stderr = process.StandardError;
|
||||||
|
process.BeginOutputReadLine();
|
||||||
|
process.BeginErrorReadLine();
|
||||||
|
process.WaitForExit();
|
||||||
|
lprocess = false;
|
||||||
|
b.ReportProgress(100, "##运行完毕##");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button9_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (lprocess) { MessageBox.Show("有任务运行中,不可执行。", "设备忙", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }
|
||||||
|
string rmfd = "";
|
||||||
|
SaveFileDialog ofd = new SaveFileDialog();
|
||||||
|
ofd.AddExtension = true;
|
||||||
|
ofd.DefaultExt = ".mfd";
|
||||||
|
ofd.OverwritePrompt = true;
|
||||||
|
ofd.Filter = "MFD文件|*.mfd";
|
||||||
|
if (ofd.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
rmfd = ofd.FileName;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
BackgroundWorker bgw = new BackgroundWorker();
|
||||||
|
bgw.DoWork += new DoWorkEventHandler(mfoc);
|
||||||
|
bgw.WorkerReportsProgress = true;
|
||||||
|
bgw.ProgressChanged += new ProgressChangedEventHandler(default_rpt);
|
||||||
|
bgw.RunWorkerAsync(rmfd);
|
||||||
|
}
|
||||||
|
|
||||||
|
void mfoc(object sender, DoWorkEventArgs e)
|
||||||
|
{
|
||||||
|
if (lprocess) { return; }
|
||||||
|
ProcessStartInfo psi = new ProcessStartInfo("nfc-bin/mfoc.exe");
|
||||||
|
string arg = (string)e.Argument;
|
||||||
|
psi.Arguments = "-O \"" + arg + "\"";
|
||||||
|
psi.CreateNoWindow = true;
|
||||||
|
psi.UseShellExecute = false;
|
||||||
|
psi.RedirectStandardOutput = true;
|
||||||
|
psi.RedirectStandardError = true;
|
||||||
|
lprocess = true;
|
||||||
|
BackgroundWorker b = (BackgroundWorker)sender;
|
||||||
|
process = Process.Start(psi);
|
||||||
|
process.OutputDataReceived += (s, _e) => b.ReportProgress(0, _e.Data);
|
||||||
|
process.ErrorDataReceived += (s, _e) => b.ReportProgress(0, _e.Data);
|
||||||
|
//StreamReader stderr = process.StandardError;
|
||||||
|
process.BeginOutputReadLine();
|
||||||
|
process.BeginErrorReadLine();
|
||||||
|
process.WaitForExit();
|
||||||
|
lprocess = false;
|
||||||
|
b.ReportProgress(100, "##运行完毕##");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button6_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (lprocess) { MessageBox.Show("有任务运行中,不可执行。", "设备忙", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }
|
||||||
|
BackgroundWorker bgw = new BackgroundWorker();
|
||||||
|
bgw.DoWork += new DoWorkEventHandler(reset_uid);
|
||||||
|
bgw.WorkerReportsProgress = true;
|
||||||
|
bgw.ProgressChanged += new ProgressChangedEventHandler(default_rpt);
|
||||||
|
bgw.RunWorkerAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
string hex(byte[] bytes)
|
||||||
|
{
|
||||||
|
StringBuilder ret = new StringBuilder();
|
||||||
|
foreach (byte b in bytes)
|
||||||
|
{
|
||||||
|
//{0:X2} 大写
|
||||||
|
ret.AppendFormat("{0:x2}", b);
|
||||||
|
}
|
||||||
|
return ret.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
void reset_uid(object sender, DoWorkEventArgs e)
|
||||||
|
{
|
||||||
|
if (lprocess) { return; }
|
||||||
|
ProcessStartInfo psi = new ProcessStartInfo("nfc-bin/nfc-mfsetuid.exe");
|
||||||
|
RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
|
||||||
|
byte[] uid=new byte[4];
|
||||||
|
rng.GetNonZeroBytes(uid);
|
||||||
|
psi.Arguments = hex(uid) + "2B0804006263646566676869";
|
||||||
|
psi.CreateNoWindow = true;
|
||||||
|
psi.UseShellExecute = false;
|
||||||
|
psi.RedirectStandardOutput = true;
|
||||||
|
psi.RedirectStandardError = true;
|
||||||
|
lprocess = true;
|
||||||
|
BackgroundWorker b = (BackgroundWorker)sender;
|
||||||
|
process = Process.Start(psi);
|
||||||
|
process.OutputDataReceived += (s, _e) => b.ReportProgress(0, _e.Data);
|
||||||
|
process.ErrorDataReceived += (s, _e) => b.ReportProgress(0, _e.Data);
|
||||||
|
//StreamReader stderr = process.StandardError;
|
||||||
|
process.BeginOutputReadLine();
|
||||||
|
process.BeginErrorReadLine();
|
||||||
|
process.WaitForExit();
|
||||||
|
lprocess = false;
|
||||||
|
b.ReportProgress(100, "##运行完毕##");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button7_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (lprocess) { MessageBox.Show("有任务运行中,不可执行。", "设备忙", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }
|
||||||
|
if (MessageBox.Show("该操作将会清空UID卡内全部数据!!!\n清空后不可恢复!请确认是否要继续操作?", "危险操作警告", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.Cancel)
|
||||||
|
{ return; }
|
||||||
|
BackgroundWorker bgw = new BackgroundWorker();
|
||||||
|
bgw.DoWork += new DoWorkEventHandler(format_uid);
|
||||||
|
bgw.WorkerReportsProgress = true;
|
||||||
|
bgw.ProgressChanged += new ProgressChangedEventHandler(default_rpt);
|
||||||
|
bgw.RunWorkerAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
void format_uid(object sender, DoWorkEventArgs e)
|
||||||
|
{
|
||||||
|
if (lprocess) { return; }
|
||||||
|
ProcessStartInfo psi = new ProcessStartInfo("nfc-bin/nfc-mfsetuid.exe");
|
||||||
|
RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
|
||||||
|
byte[] uid = new byte[4];
|
||||||
|
rng.GetNonZeroBytes(uid);
|
||||||
|
psi.Arguments = "-f " + hex(uid) + "2B0804006263646566676869";
|
||||||
|
psi.CreateNoWindow = true;
|
||||||
|
psi.UseShellExecute = false;
|
||||||
|
psi.RedirectStandardOutput = true;
|
||||||
|
psi.RedirectStandardError = true;
|
||||||
|
lprocess = true;
|
||||||
|
BackgroundWorker b = (BackgroundWorker)sender;
|
||||||
|
process = Process.Start(psi);
|
||||||
|
process.OutputDataReceived += (s, _e) => b.ReportProgress(0, _e.Data);
|
||||||
|
process.ErrorDataReceived += (s, _e) => b.ReportProgress(0, _e.Data);
|
||||||
|
//StreamReader stderr = process.StandardError;
|
||||||
|
process.BeginOutputReadLine();
|
||||||
|
process.BeginErrorReadLine();
|
||||||
|
process.WaitForExit();
|
||||||
|
lprocess = false;
|
||||||
|
b.ReportProgress(100, "##运行完毕##");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button10_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (lprocess) { MessageBox.Show("有任务运行中,不可执行。", "设备忙", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }
|
||||||
|
string rmfd = "";
|
||||||
|
SaveFileDialog ofd = new SaveFileDialog();
|
||||||
|
ofd.AddExtension = true;
|
||||||
|
ofd.DefaultExt = ".mfd";
|
||||||
|
ofd.OverwritePrompt = true;
|
||||||
|
ofd.Filter = "MFD文件|*.mfd";
|
||||||
|
if (ofd.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
rmfd = ofd.FileName;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
BackgroundWorker bgw = new BackgroundWorker();
|
||||||
|
bgw.DoWork += new DoWorkEventHandler(bmf_read);
|
||||||
|
bgw.WorkerReportsProgress = true;
|
||||||
|
bgw.ProgressChanged += new ProgressChangedEventHandler(default_rpt);
|
||||||
|
bgw.RunWorkerAsync(new string[] { rmfd});
|
||||||
|
}
|
||||||
|
|
||||||
|
void bmf_read(object sender, DoWorkEventArgs e)
|
||||||
|
{
|
||||||
|
if (lprocess) { return; }
|
||||||
|
ProcessStartInfo psi = new ProcessStartInfo("nfc-bin/nfc-mfclassic.exe");
|
||||||
|
string[] args = (string[])e.Argument;
|
||||||
|
psi.Arguments = "R A u \"" + args[0] + "\"";
|
||||||
|
psi.CreateNoWindow = true;
|
||||||
|
psi.UseShellExecute = false;
|
||||||
|
psi.RedirectStandardOutput = true;
|
||||||
|
psi.RedirectStandardError = true;
|
||||||
|
lprocess = true;
|
||||||
|
BackgroundWorker b = (BackgroundWorker)sender;
|
||||||
|
process = Process.Start(psi);
|
||||||
|
process.OutputDataReceived += (s, _e) => b.ReportProgress(0, _e.Data);
|
||||||
|
process.ErrorDataReceived += (s, _e) => b.ReportProgress(0, _e.Data);
|
||||||
|
//StreamReader stderr = process.StandardError;
|
||||||
|
process.BeginOutputReadLine();
|
||||||
|
process.BeginErrorReadLine();
|
||||||
|
process.WaitForExit();
|
||||||
|
lprocess = false;
|
||||||
|
b.ReportProgress(100, "##运行完毕##");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button11_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (lprocess) { MessageBox.Show("有任务运行中,不可执行。", "设备忙", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }
|
||||||
|
string rmfd = "";
|
||||||
|
OpenFileDialog ofd = new OpenFileDialog();
|
||||||
|
ofd.CheckFileExists = true;
|
||||||
|
ofd.Filter = "MFD文件|*.mfd";
|
||||||
|
ofd.Multiselect = false;
|
||||||
|
if (ofd.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
rmfd = ofd.FileName;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
BackgroundWorker bgw = new BackgroundWorker();
|
||||||
|
bgw.DoWork += new DoWorkEventHandler(bmf_write);
|
||||||
|
bgw.WorkerReportsProgress = true;
|
||||||
|
bgw.ProgressChanged += new ProgressChangedEventHandler(default_rpt);
|
||||||
|
bgw.RunWorkerAsync(new string[] { rmfd });
|
||||||
|
}
|
||||||
|
|
||||||
|
void bmf_write(object sender, DoWorkEventArgs e)
|
||||||
|
{
|
||||||
|
if (lprocess) { return; }
|
||||||
|
ProcessStartInfo psi = new ProcessStartInfo("nfc-bin/nfc-mfclassic.exe");
|
||||||
|
string[] args = (string[])e.Argument;
|
||||||
|
psi.Arguments = "W A u \"" + args[0] + "\"";
|
||||||
|
if (keymfd != "")
|
||||||
|
{
|
||||||
|
psi.Arguments += " \"" + keymfd + "\" f";
|
||||||
|
}
|
||||||
|
psi.CreateNoWindow = true;
|
||||||
|
psi.UseShellExecute = false;
|
||||||
|
psi.RedirectStandardOutput = true;
|
||||||
|
psi.RedirectStandardError = true;
|
||||||
|
lprocess = true;
|
||||||
|
BackgroundWorker b = (BackgroundWorker)sender;
|
||||||
|
process = Process.Start(psi);
|
||||||
|
process.OutputDataReceived += (s, _e) => b.ReportProgress(0, _e.Data);
|
||||||
|
process.ErrorDataReceived += (s, _e) => b.ReportProgress(0, _e.Data);
|
||||||
|
//StreamReader stderr = process.StandardError;
|
||||||
|
process.BeginOutputReadLine();
|
||||||
|
process.BeginErrorReadLine();
|
||||||
|
process.WaitForExit();
|
||||||
|
lprocess = false;
|
||||||
|
b.ReportProgress(100, "##运行完毕##");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
MifareOneTool/Form1.resx
Normal file
120
MifareOneTool/Form1.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
55
MifareOneTool/GitHubUpdate.cs
Normal file
55
MifareOneTool/GitHubUpdate.cs
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Reflection;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using System.Net;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace MifareOneTool
|
||||||
|
{
|
||||||
|
class GitHubUpdate
|
||||||
|
{
|
||||||
|
Version localVersion;
|
||||||
|
Version remoteVersion;
|
||||||
|
//public static T FromJSON<T>(this string input)
|
||||||
|
//{
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// return JsonConvert.DeserializeObject<T>(input);
|
||||||
|
// }
|
||||||
|
// catch (Exception ex)
|
||||||
|
// {
|
||||||
|
// return default(T);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
void _GitHubUpdate(string GitHubR)
|
||||||
|
{
|
||||||
|
this.localVersion = Assembly.GetExecutingAssembly().GetName().Version;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var request = (HttpWebRequest)WebRequest.Create("https://api.github.com/repos/" + GitHubR + "/releases/latest");
|
||||||
|
var response = (HttpWebResponse)request.GetResponse();
|
||||||
|
var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();
|
||||||
|
JObject jo = JObject.Parse(responseString);
|
||||||
|
if (jo.GetValue("message") == null)
|
||||||
|
{
|
||||||
|
dynamic json = Newtonsoft.Json.Linq.JToken.Parse(responseString) as dynamic;
|
||||||
|
if(json.prerelease==false){
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.Error.WriteLine("GitHub更新失效");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
System.Console.Error.WriteLine(ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
130
MifareOneTool/MifareOneTool.csproj
Normal file
130
MifareOneTool/MifareOneTool.csproj
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||||
|
<ProductVersion>8.0.30703</ProductVersion>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ProjectGuid>{CDB26016-FC77-403F-B22A-A011F8622FCF}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>MifareOneTool</RootNamespace>
|
||||||
|
<AssemblyName>MifareOneTool</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||||
|
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<PublishUrl>publish\</PublishUrl>
|
||||||
|
<Install>true</Install>
|
||||||
|
<InstallFrom>Disk</InstallFrom>
|
||||||
|
<UpdateEnabled>false</UpdateEnabled>
|
||||||
|
<UpdateMode>Foreground</UpdateMode>
|
||||||
|
<UpdateInterval>7</UpdateInterval>
|
||||||
|
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||||
|
<UpdatePeriodically>false</UpdatePeriodically>
|
||||||
|
<UpdateRequired>false</UpdateRequired>
|
||||||
|
<MapFileExtensions>true</MapFileExtensions>
|
||||||
|
<ApplicationRevision>0</ApplicationRevision>
|
||||||
|
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||||
|
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||||
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
|
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||||
|
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Newtonsoft.Json">
|
||||||
|
<HintPath>.\Newtonsoft.Json.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Deployment" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Form1.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Form1.Designer.cs">
|
||||||
|
<DependentUpon>Form1.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="GitHubUpdate.cs" />
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<EmbeddedResource Include="Form1.resx">
|
||||||
|
<DependentUpon>Form1.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<None Include="app.config" />
|
||||||
|
<None Include="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<Compile Include="Properties\Settings.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>Microsoft .NET Framework 4 Client Profile %28x86 和 x64%29</ProductName>
|
||||||
|
<Install>true</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||||
|
<Install>false</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||||
|
<Install>false</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>Windows Installer 3.1</ProductName>
|
||||||
|
<Install>true</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
</Project>
|
||||||
BIN
MifareOneTool/Newtonsoft.Json.dll
Normal file
BIN
MifareOneTool/Newtonsoft.Json.dll
Normal file
Binary file not shown.
21
MifareOneTool/Program.cs
Normal file
21
MifareOneTool/Program.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace MifareOneTool
|
||||||
|
{
|
||||||
|
static class Program
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 应用程序的主入口点。
|
||||||
|
/// </summary>
|
||||||
|
[STAThread]
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
Application.EnableVisualStyles();
|
||||||
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
Application.Run(new Form1());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
36
MifareOneTool/Properties/AssemblyInfo.cs
Normal file
36
MifareOneTool/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// 有关程序集的常规信息通过以下
|
||||||
|
// 特性集控制。更改这些特性值可修改
|
||||||
|
// 与程序集关联的信息。
|
||||||
|
[assembly: AssemblyTitle("MifareOneTool")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("XciCode")]
|
||||||
|
[assembly: AssemblyProduct("MifareOneTool")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © XciCode 2018")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// 将 ComVisible 设置为 false 使此程序集中的类型
|
||||||
|
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
|
||||||
|
// 则将该类型上的 ComVisible 特性设置为 true。
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||||
|
[assembly: Guid("fba73834-5520-4ee8-9b7c-f881d2bd44c5")]
|
||||||
|
|
||||||
|
// 程序集的版本信息由下面四个值组成:
|
||||||
|
//
|
||||||
|
// 主版本
|
||||||
|
// 次版本
|
||||||
|
// 内部版本号
|
||||||
|
// 修订号
|
||||||
|
//
|
||||||
|
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
|
||||||
|
// 方法是按如下所示使用“*”:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
71
MifareOneTool/Properties/Resources.Designer.cs
generated
Normal file
71
MifareOneTool/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
// 运行时版本: 4.0.30319.42000
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将丢失。
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace MifareOneTool.Properties
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||||
|
/// </summary>
|
||||||
|
// 此类是由 StronglyTypedResourceBuilder
|
||||||
|
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||||
|
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||||
|
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class Resources
|
||||||
|
{
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Resources()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 返回此类使用的、缓存的 ResourceManager 实例。
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if ((resourceMan == null))
|
||||||
|
{
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MifareOneTool.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 为所有资源查找重写当前线程的 CurrentUICulture 属性,
|
||||||
|
/// 方法是使用此强类型资源类。
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
117
MifareOneTool/Properties/Resources.resx
Normal file
117
MifareOneTool/Properties/Resources.resx
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
35
MifareOneTool/Properties/Settings.Designer.cs
generated
Normal file
35
MifareOneTool/Properties/Settings.Designer.cs
generated
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
// 运行时版本:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace MifareOneTool.Properties {
|
||||||
|
|
||||||
|
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
|
||||||
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||||
|
|
||||||
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
|
||||||
|
public static Settings Default {
|
||||||
|
get {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("xcicode/MifareOneTool")]
|
||||||
|
public string GitHubR {
|
||||||
|
get {
|
||||||
|
return ((string)(this["GitHubR"]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9
MifareOneTool/Properties/Settings.settings
Normal file
9
MifareOneTool/Properties/Settings.settings
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="MifareOneTool.Properties" GeneratedClassName="Settings">
|
||||||
|
<Profiles />
|
||||||
|
<Settings>
|
||||||
|
<Setting Name="GitHubR" Type="System.String" Scope="Application">
|
||||||
|
<Value Profile="(Default)">xcicode/MifareOneTool</Value>
|
||||||
|
</Setting>
|
||||||
|
</Settings>
|
||||||
|
</SettingsFile>
|
||||||
15
MifareOneTool/app.config
Normal file
15
MifareOneTool/app.config
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||||
|
<section name="MifareOneTool.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||||
|
</sectionGroup>
|
||||||
|
</configSections>
|
||||||
|
<applicationSettings>
|
||||||
|
<MifareOneTool.Properties.Settings>
|
||||||
|
<setting name="GitHubR" serializeAs="String">
|
||||||
|
<value>xcicode/MifareOneTool</value>
|
||||||
|
</setting>
|
||||||
|
</MifareOneTool.Properties.Settings>
|
||||||
|
</applicationSettings>
|
||||||
|
</configuration>
|
||||||
1403
Setup1/Setup1.vdproj
Normal file
1403
Setup1/Setup1.vdproj
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user