This commit is contained in:
XAS-712 2018-12-26 01:07:09 +08:00
parent d30540c8ce
commit 74cc9b9bb7
9 changed files with 158 additions and 384 deletions

View File

@ -28,6 +28,7 @@
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.buttonCLI = new System.Windows.Forms.Button();
@ -49,9 +50,10 @@
this.buttonConSave = new System.Windows.Forms.Button();
this.buttonConClr = new System.Windows.Forms.Button();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.buttonGuide = new System.Windows.Forms.Button();
this.buttonHexTool = new System.Windows.Forms.Button();
this.buttonMfcuk = new System.Windows.Forms.Button();
this.buttonHexTool = new System.Windows.Forms.Button();
this.buttonTool1 = new System.Windows.Forms.Button();
this.toolTipHelp = new System.Windows.Forms.ToolTip(this.components);
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
@ -129,7 +131,7 @@
this.buttonMfRead.Name = "buttonMfRead";
this.buttonMfRead.Size = new System.Drawing.Size(75, 23);
this.buttonMfRead.TabIndex = 3;
this.buttonMfRead.Text = "读卡";
this.buttonMfRead.Text = "读M1卡";
this.buttonMfRead.UseVisualStyleBackColor = true;
this.buttonMfRead.Click += new System.EventHandler(this.buttonMfRead_Click);
//
@ -177,7 +179,8 @@
this.buttonMfoc.Name = "buttonMfoc";
this.buttonMfoc.Size = new System.Drawing.Size(75, 23);
this.buttonMfoc.TabIndex = 8;
this.buttonMfoc.Text = "MFOC";
this.buttonMfoc.Text = "MFOC读";
this.toolTipHelp.SetToolTip(this.buttonMfoc, "按住Ctrl点击该按钮可添加已知密钥。");
this.buttonMfoc.UseVisualStyleBackColor = true;
this.buttonMfoc.Click += new System.EventHandler(this.buttonMfoc_Click);
//
@ -217,7 +220,7 @@
this.buttonMfWrite.Name = "buttonMfWrite";
this.buttonMfWrite.Size = new System.Drawing.Size(75, 23);
this.buttonMfWrite.TabIndex = 5;
this.buttonMfWrite.Text = "写卡";
this.buttonMfWrite.Text = "写M1卡";
this.buttonMfWrite.UseVisualStyleBackColor = true;
this.buttonMfWrite.Click += new System.EventHandler(this.buttonMfWrite_Click);
//
@ -249,7 +252,7 @@
this.buttonKill.Name = "buttonKill";
this.buttonKill.Size = new System.Drawing.Size(75, 23);
this.buttonKill.TabIndex = 2;
this.buttonKill.Text = "停运行";
this.buttonKill.Text = "停运行";
this.buttonKill.UseVisualStyleBackColor = true;
this.buttonKill.Click += new System.EventHandler(this.buttonKill_Click);
//
@ -259,7 +262,7 @@
this.buttonConSave.Name = "buttonConSave";
this.buttonConSave.Size = new System.Drawing.Size(75, 23);
this.buttonConSave.TabIndex = 1;
this.buttonConSave.Text = "存日志";
this.buttonConSave.Text = "存日志";
this.buttonConSave.UseVisualStyleBackColor = true;
this.buttonConSave.Click += new System.EventHandler(this.buttonConSave_Click);
//
@ -269,7 +272,7 @@
this.buttonConClr.Name = "buttonConClr";
this.buttonConClr.Size = new System.Drawing.Size(75, 23);
this.buttonConClr.TabIndex = 0;
this.buttonConClr.Text = "清终端";
this.buttonConClr.Text = "清终端";
this.buttonConClr.UseVisualStyleBackColor = true;
this.buttonConClr.Click += new System.EventHandler(this.buttonConClr_Click);
//
@ -277,7 +280,7 @@
//
this.groupBox4.Controls.Add(this.buttonMfcuk);
this.groupBox4.Controls.Add(this.buttonHexTool);
this.groupBox4.Controls.Add(this.buttonGuide);
this.groupBox4.Controls.Add(this.buttonTool1);
this.groupBox4.Location = new System.Drawing.Point(641, 101);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(169, 293);
@ -285,26 +288,6 @@
this.groupBox4.TabStop = false;
this.groupBox4.Text = "工具";
//
// buttonGuide
//
this.buttonGuide.Enabled = false;
this.buttonGuide.Location = new System.Drawing.Point(6, 24);
this.buttonGuide.Name = "buttonGuide";
this.buttonGuide.Size = new System.Drawing.Size(156, 45);
this.buttonGuide.TabIndex = 0;
this.buttonGuide.Text = "向导模式";
this.buttonGuide.UseVisualStyleBackColor = true;
this.buttonGuide.Click += new System.EventHandler(this.buttonGuide_Click);
//
// buttonHexTool
//
this.buttonHexTool.Location = new System.Drawing.Point(6, 75);
this.buttonHexTool.Name = "buttonHexTool";
this.buttonHexTool.Size = new System.Drawing.Size(156, 45);
this.buttonHexTool.TabIndex = 1;
this.buttonHexTool.Text = "Hex工具";
this.buttonHexTool.UseVisualStyleBackColor = true;
//
// buttonMfcuk
//
this.buttonMfcuk.Font = new System.Drawing.Font("宋体", 8.5F);
@ -314,6 +297,35 @@
this.buttonMfcuk.TabIndex = 3;
this.buttonMfcuk.Text = "全加密密钥恢复\r\nMFCUK";
this.buttonMfcuk.UseVisualStyleBackColor = true;
this.buttonMfcuk.Click += new System.EventHandler(this.buttonMfcuk_Click);
//
// buttonHexTool
//
this.buttonHexTool.Enabled = false;
this.buttonHexTool.Location = new System.Drawing.Point(6, 75);
this.buttonHexTool.Name = "buttonHexTool";
this.buttonHexTool.Size = new System.Drawing.Size(156, 45);
this.buttonHexTool.TabIndex = 1;
this.buttonHexTool.Text = "Hex工具";
this.buttonHexTool.UseVisualStyleBackColor = true;
//
// buttonTool1
//
this.buttonTool1.Enabled = false;
this.buttonTool1.Location = new System.Drawing.Point(6, 24);
this.buttonTool1.Name = "buttonTool1";
this.buttonTool1.Size = new System.Drawing.Size(156, 45);
this.buttonTool1.TabIndex = 0;
this.buttonTool1.Text = "key.mfd工具";
this.buttonTool1.UseVisualStyleBackColor = true;
//
// toolTipHelp
//
this.toolTipHelp.AutoPopDelay = 2000;
this.toolTipHelp.InitialDelay = 500;
this.toolTipHelp.ReshowDelay = 100;
this.toolTipHelp.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;
this.toolTipHelp.ToolTipTitle = "提示";
//
// Form1
//
@ -362,9 +374,10 @@
private System.Windows.Forms.Button buttonKill;
private System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.Button buttonGuide;
private System.Windows.Forms.Button buttonTool1;
private System.Windows.Forms.Button buttonHexTool;
private System.Windows.Forms.Button buttonMfcuk;
private System.Windows.Forms.ToolTip toolTipHelp;
}
}

View File

@ -11,6 +11,7 @@ using System.IO;
using System.Security.Cryptography;
using System.Text.RegularExpressions;
using Microsoft.VisualBasic;
using System.Reflection;
namespace MifareOneTool
{
@ -41,6 +42,27 @@ namespace MifareOneTool
{
Text = "MifareOne Tool - 运行完毕";
}
else if (e.ProgressPercentage == 101)
{
SaveFileDialog ofd = new SaveFileDialog();
ofd.AddExtension = true;
ofd.DefaultExt = ".mfd";
ofd.Title = "请选择MFD文件保存位置及文件名";
ofd.OverwritePrompt = true;
ofd.Filter = "MFD文件|*.mfd";
if (ofd.ShowDialog() == DialogResult.OK)
{
File.Move(omfd, ofd.FileName);
logAppend("##已保存-" + ofd.FileName + "##");
}
else
{
File.Delete(omfd);
logAppend("##未保存##");
}
omfd = "";
Text = "MifareOne Tool - 运行完毕";
}
}
private void logAppend(string msg)
@ -73,6 +95,7 @@ namespace MifareOneTool
private void Form1_Load(object sender, EventArgs e)
{
linkLabel1.Links.Add(0, linkLabel1.Text.Length, "https://github.com/xcicode/MifareOneTool/releases/latest");
logAppend("#软件版本 " + Assembly.GetExecutingAssembly().GetName().Version.ToString());
}
private void buttonScanCard_Click(object sender, EventArgs e)
@ -106,6 +129,8 @@ namespace MifareOneTool
b.ReportProgress(100, "##运行完毕##");
}
string omfd = "";
private void buttonMfRead_Click(object sender, EventArgs e)
{
if (lprocess) { MessageBox.Show("有任务运行中,不可执行。", "设备忙", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } Form1.ActiveForm.Text = "MifareOne Tool - 运行中";
@ -127,23 +152,8 @@ namespace MifareOneTool
bgw.WorkerReportsProgress = true;
bgw.ProgressChanged += new ProgressChangedEventHandler(default_rpt);
bgw.RunWorkerAsync(new string[] { rmfd, kt,nn });
omfd = rmfd;
SaveFileDialog ofd = new SaveFileDialog();
ofd.AddExtension = true;
ofd.DefaultExt = ".mfd";
ofd.Title = "请选择MFD文件保存位置及文件名";
ofd.OverwritePrompt = true;
ofd.Filter = "MFD文件|*.mfd";
if (ofd.ShowDialog() == DialogResult.OK)
{
File.Move(rmfd, ofd.FileName);
logAppend("##已保存-" + ofd.FileName + "##");
}
else
{
File.Delete(rmfd);
logAppend("##未保存##");
}
}
void mf_read(object sender, DoWorkEventArgs e)
@ -152,7 +162,7 @@ namespace MifareOneTool
ProcessStartInfo psi = new ProcessStartInfo("nfc-bin/nfc-mfclassic.exe");
string[] args = (string[])e.Argument;
psi.Arguments = "r " + args[1] + " u \"" + args[0] + "\"";
if (keymfd != "" && args[2]=="")
if (keymfd != "" && args[2] == "")
{
psi.Arguments += " \"" + keymfd + "\" f";
}
@ -170,7 +180,15 @@ namespace MifareOneTool
process.BeginErrorReadLine();
process.WaitForExit();
lprocess = false;
b.ReportProgress(100, "##运行完毕##");
if (process.ExitCode == 0)
{
b.ReportProgress(101, "##运行完毕##");
}
else
{
b.ReportProgress(100, "##运行出错##");
File.Delete(args[0]);
}
}
private void buttonCLI_Click(object sender, EventArgs e)
@ -267,37 +285,36 @@ namespace MifareOneTool
private void buttonMfoc_Click(object sender, EventArgs e)
{
if (lprocess) { MessageBox.Show("有任务运行中,不可执行。", "设备忙", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } Form1.ActiveForm.Text = "MifareOne Tool - 运行中";
string rmfd = "Mfoc.tmp";
BackgroundWorker bgw = new BackgroundWorker();
bgw.DoWork += new DoWorkEventHandler(mfoc);
bgw.WorkerReportsProgress = true;
bgw.ProgressChanged += new ProgressChangedEventHandler(default_rpt);
bgw.RunWorkerAsync(rmfd);
SaveFileDialog ofd = new SaveFileDialog();
ofd.AddExtension = true;
ofd.DefaultExt = ".mfd";
ofd.OverwritePrompt = true;
ofd.Filter = "MFD文件|*.mfd";
ofd.Title = "请选择破解MFD的保存位置及文件名";
if (ofd.ShowDialog() == DialogResult.OK)
{
File.Move(rmfd,ofd.FileName);
logAppend("##已保存-" + ofd.FileName + "##");
}
else
{
File.Delete(rmfd);
logAppend("##未保存##");
}
string rmfd = "Mfoc.tmp";
string key = "";
if (Control.ModifierKeys == Keys.Control)
{
string[] ks = Interaction.InputBox("请输入已知的Key以英文半角逗号分隔。", "请输入已知Key", "FFFFFFFFFFFF", -1, -1).Trim().Split(',');
if (ks.Length > 0)
{
foreach(string k in ks){
string pat = "[0-9A-Fa-f]{12}";
if (Regex.IsMatch(k, pat))
{
key += "-k " + k.Substring(0, 12) + " ";
}
}
}
}
BackgroundWorker bgw = new BackgroundWorker();
bgw.DoWork += new DoWorkEventHandler(mfoc);
bgw.WorkerReportsProgress = true;
bgw.ProgressChanged += new ProgressChangedEventHandler(default_rpt);
bgw.RunWorkerAsync(new string[] { rmfd, key });
omfd = 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 + "\"";
string[] args = (string[])e.Argument;
psi.Arguments = args[1] + " -O \"" + args[0] + "\"";
psi.CreateNoWindow = true;
psi.UseShellExecute = false;
psi.RedirectStandardOutput = true;
@ -312,7 +329,15 @@ namespace MifareOneTool
process.BeginErrorReadLine();
process.WaitForExit();
lprocess = false;
b.ReportProgress(100, "##运行完毕##");
if (process.ExitCode == 0)
{
b.ReportProgress(101, "##运行完毕##");
}
else
{
b.ReportProgress(100, "##运行出错##");
File.Delete(args[0]);
}
}
private void buttonUidReset_Click(object sender, EventArgs e)
@ -408,22 +433,7 @@ namespace MifareOneTool
bgw.WorkerReportsProgress = true;
bgw.ProgressChanged += new ProgressChangedEventHandler(default_rpt);
bgw.RunWorkerAsync(new string[] { rmfd });
SaveFileDialog ofd = new SaveFileDialog();
ofd.AddExtension = true;
ofd.DefaultExt = ".mfd";
ofd.OverwritePrompt = true;
ofd.Filter = "MFD文件|*.mfd";
ofd.Title = "请选择MFD文件的保存位置及文件名";
if (ofd.ShowDialog() == DialogResult.OK)
{
File.Move(rmfd, ofd.FileName);
logAppend("##已保存-" + ofd.FileName + "##");
}
else
{
File.Delete(rmfd);
logAppend("##未保存##");
}
omfd = rmfd;
}
void bmf_read(object sender, DoWorkEventArgs e)
@ -446,7 +456,15 @@ namespace MifareOneTool
process.BeginErrorReadLine();
process.WaitForExit();
lprocess = false;
b.ReportProgress(100, "##运行完毕##");
if (process.ExitCode == 0)
{
b.ReportProgress(101, "##运行完毕##");
}
else
{
b.ReportProgress(100, "##运行出错##");
File.Delete(args[0]);
}
}
private void buttonBmfWrite_Click(object sender, EventArgs e)
@ -526,12 +544,12 @@ namespace MifareOneTool
private void buttonUidWrite_Click(object sender, EventArgs e)
{
string pat = "[0-9A-Fa-f]{8}";
if (lprocess) { MessageBox.Show("有任务运行中,不可执行。", "设备忙", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } Form1.ActiveForm.Text = "MifareOne Tool - 运行中";
byte[] buid = new byte[4];
RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
rng.GetNonZeroBytes(buid);
string uid = Interaction.InputBox("请输入需要写入的UID卡号共8位十六进制数如E44A3BF1。", "请输入UID号", hex(buid), -1, -1).Trim();
string pat = "[0-9A-Fa-f]{8}";
if (!Regex.IsMatch(uid, pat))
{
MessageBox.Show("输入的UID号不合法", "InputError", MessageBoxButtons.OK, MessageBoxIcon.Error);
@ -571,14 +589,37 @@ namespace MifareOneTool
Process.Start("https://github.com/xcicode/MifareOneTool/releases/latest");
}
private void buttonGuide_Click(object sender, EventArgs e)
private void buttonMfcuk_Click(object sender, EventArgs e)
{
if (lprocess) { MessageBox.Show("有任务运行中,不可执行。", "设备忙", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }
Text = "MifareOne Tool - 向导模式运行中";
FormGuide fg = new FormGuide();
fg.ShowDialog();
if (lprocess) { MessageBox.Show("有任务运行中,不可执行。", "设备忙", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }
Text = "MifareOne Tool - 运行中";
BackgroundWorker bgw = new BackgroundWorker();
bgw.DoWork += new DoWorkEventHandler(Mfcuk);
bgw.WorkerReportsProgress = true;
bgw.ProgressChanged += new ProgressChangedEventHandler(default_rpt);
bgw.RunWorkerAsync();
}
void Mfcuk(object sender, DoWorkEventArgs e)
{
if (lprocess) { return; }
ProcessStartInfo psi = new ProcessStartInfo("nfc-bin/mfcuk.exe");
psi.Arguments = "-v 4 -C -R -1";
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;
Text = "MifareOne Tool - 向导模式运行完毕";
b.ReportProgress(100, "##运行完毕##");
}
}
}

View File

@ -117,4 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolTipHelp.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -1,130 +0,0 @@
namespace MifareOneTool
{
partial class FormGuide
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.tabPage4 = new System.Windows.Forms.TabPage();
this.tabPage5 = new System.Windows.Forms.TabPage();
this.tabControl1.SuspendLayout();
this.SuspendLayout();
//
// tabControl1
//
this.tabControl1.Appearance = System.Windows.Forms.TabAppearance.Buttons;
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage3);
this.tabControl1.Controls.Add(this.tabPage4);
this.tabControl1.Controls.Add(this.tabPage5);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Multiline = true;
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(482, 353);
this.tabControl1.TabIndex = 0;
//
// tabPage1
//
this.tabPage1.Location = new System.Drawing.Point(4, 28);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(474, 321);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "开始";
this.tabPage1.UseVisualStyleBackColor = true;
//
// tabPage2
//
this.tabPage2.Location = new System.Drawing.Point(4, 28);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(474, 321);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "操作";
this.tabPage2.UseVisualStyleBackColor = true;
//
// tabPage3
//
this.tabPage3.Location = new System.Drawing.Point(4, 28);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(474, 321);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "需要提供的信息";
this.tabPage3.UseVisualStyleBackColor = true;
//
// tabPage4
//
this.tabPage4.Location = new System.Drawing.Point(4, 28);
this.tabPage4.Name = "tabPage4";
this.tabPage4.Size = new System.Drawing.Size(474, 321);
this.tabPage4.TabIndex = 3;
this.tabPage4.Text = "认证(密码)";
this.tabPage4.UseVisualStyleBackColor = true;
//
// tabPage5
//
this.tabPage5.Location = new System.Drawing.Point(4, 28);
this.tabPage5.Name = "tabPage5";
this.tabPage5.Size = new System.Drawing.Size(474, 321);
this.tabPage5.TabIndex = 4;
this.tabPage5.Text = "开始工作";
this.tabPage5.UseVisualStyleBackColor = true;
//
// FormGuide
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Control;
this.ClientSize = new System.Drawing.Size(482, 353);
this.ControlBox = false;
this.Controls.Add(this.tabControl1);
this.ForeColor = System.Drawing.SystemColors.ControlLightLight;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "FormGuide";
this.Text = "MifareOne 向导模式";
this.Load += new System.EventHandler(this.FormGuide_Load);
this.tabControl1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.TabPage tabPage4;
private System.Windows.Forms.TabPage tabPage5;
}
}

View File

@ -1,24 +0,0 @@
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;
namespace MifareOneTool
{
public partial class FormGuide : Form
{
public FormGuide()
{
InitializeComponent();
}
private void FormGuide_Load(object sender, EventArgs e)
{
}
}
}

View File

@ -1,120 +0,0 @@
<?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>

View File

@ -25,7 +25,7 @@ namespace MifareOneTool
// return default(T);
// }
//}
void _GitHubUpdate(string GitHubR)
public GitHubUpdate(string GitHubR)
{
this.localVersion = Assembly.GetExecutingAssembly().GetName().Version;
try

View File

@ -72,21 +72,12 @@
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="FormGuide.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FormGuide.Designer.cs">
<DependentUpon>FormGuide.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="FormGuide.resx">
<DependentUpon>FormGuide.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
[assembly: AssemblyVersion("1.3.0.0")]
[assembly: AssemblyFileVersion("1.3.0.0")]