This commit is contained in:
XAS-712 2019-03-23 23:16:43 +08:00
parent b5053e25ec
commit dd1047886c
11 changed files with 602 additions and 392 deletions

File diff suppressed because it is too large Load Diff

View File

@ -47,6 +47,7 @@ namespace MifareOneTool
cfg += "device.name = \"NFC-Device\"\n"; cfg += "device.name = \"NFC-Device\"\n";
cfg += "device.connstring = \"" + devstr + "\""; cfg += "device.connstring = \"" + devstr + "\"";
File.WriteAllText("libnfc.conf", cfg); File.WriteAllText("libnfc.conf", cfg);
curDevice.Text = "设备串口:" + devstr.Replace("pn532_uart:", "").Replace(":115200", "");
} }
void default_rpt(object sender, ProgressChangedEventArgs e) void default_rpt(object sender, ProgressChangedEventArgs e)
@ -117,7 +118,7 @@ namespace MifareOneTool
{ {
logAppend((string)e.UserState); logAppend((string)e.UserState);
logAppend("##Nonce收集完毕##"); logAppend("##Nonce收集完毕##");
logAppend("您可以在本地计算,或是上传到云计算服务节点进行计算。"); logAppend("您可以上传到云计算服务节点进行计算。");
Text = "MifareOne Tool - 运行完毕"; Text = "MifareOne Tool - 运行完毕";
} }
@ -133,6 +134,9 @@ namespace MifareOneTool
{ {
logAppend("将自动选择首个设备:" + myReaders.First()); logAppend("将自动选择首个设备:" + myReaders.First());
writeConfig(myReaders.First()); writeConfig(myReaders.First());
SetDeviceCombo.Items.Clear();
SetDeviceCombo.Items.AddRange(myReaders.ToArray());
SetDeviceCombo.SelectedIndex = 0;
} }
} }
else else
@ -207,7 +211,21 @@ namespace MifareOneTool
{ {
tabControl1.SelectedIndex = 1; tabControl1.SelectedIndex = 1;
} }
File.Delete("libnfc.conf"); //File.Delete("libnfc.conf");//用户COM口一般不常变化
if (Properties.Settings.Default.MultiMode)
{
if (File.Exists("libnfc.conf"))
{
string[] conf = File.ReadAllLines("libnfc.conf");
foreach (string line in conf)
{
if (line.StartsWith("device.connstring = \"pn532_uart:"))
{
curDevice.Text = "设备串口:" + line.Replace("device.connstring = \"pn532_uart:", "").Replace(":115200\"", "");
}
}
}
}
} }
private void buttonScanCard_Click(object sender, EventArgs e) private void buttonScanCard_Click(object sender, EventArgs e)
@ -275,6 +293,7 @@ namespace MifareOneTool
if (uid.Length < 8) { return; } if (uid.Length < 8) { return; }
logAppend("正在检索是否存在key.mfd…"); logAppend("正在检索是否存在key.mfd…");
List<string> files = Directory.EnumerateFiles("auto_keys", "*.mfd").ToList<string>(); List<string> files = Directory.EnumerateFiles("auto_keys", "*.mfd").ToList<string>();
files.Reverse();//保证拿到最新的
for (int i = 0; i < files.Count; i++) for (int i = 0; i < files.Count; i++)
{ {
if (files[i].StartsWith("auto_keys\\" + uid)) if (files[i].StartsWith("auto_keys\\" + uid))
@ -749,18 +768,7 @@ namespace MifareOneTool
MessageBox.Show("终端内容已保存至m1t.log文件", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show("终端内容已保存至m1t.log文件", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
} }
private void buttonKill_Click(object sender, EventArgs e)
{
if (lprocess)
{
if (process.HasExited == false)
{
process.Kill();
Form1.ActiveForm.Text = "MifareOne Tool - 已终止";
logAppend("##程序已被强制停止##");
}
}
}
private void buttonUidWrite_Click(object sender, EventArgs e) private void buttonUidWrite_Click(object sender, EventArgs e)
{ {
@ -901,6 +909,19 @@ namespace MifareOneTool
b.ReportProgress(100, "##运行完毕##"); b.ReportProgress(100, "##运行完毕##");
} }
private void buttonKill_Click(object sender, EventArgs e)
{
if (lprocess)
{
if (process.HasExited == false)
{
process.Kill();
Form1.ActiveForm.Text = "MifareOne Tool - 已终止";
logAppend("##程序已被强制停止##");
}
}
}
private void buttonLockUfuid_Click(object sender, EventArgs e) private void buttonLockUfuid_Click(object sender, EventArgs e)
{ {
if (lprocess) { MessageBox.Show("有任务运行中,不可执行。", "设备忙", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } Form1.ActiveForm.Text = "MifareOne Tool - 运行中"; if (lprocess) { MessageBox.Show("有任务运行中,不可执行。", "设备忙", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } Form1.ActiveForm.Text = "MifareOne Tool - 运行中";
@ -1436,5 +1457,19 @@ namespace MifareOneTool
{ {
buttonKill_Click(sender, e); buttonKill_Click(sender, e);
} }
private void SetDeviceCombo_SelectedIndexChanged(object sender, EventArgs e)
{
if (SetDeviceCombo.SelectedIndex >= 0)
{
writeConfig(SetDeviceCombo.SelectedItem.ToString());
logAppend("已指定使用该NFC设备" + SetDeviceCombo.SelectedItem.ToString());
}
}
private void checkBoxMultiDev_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.MultiMode = checkBoxMultiDev.Checked;
}
} }
} }

View File

@ -120,9 +120,6 @@
<metadata name="toolTipHelp.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="toolTipHelp.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="toolTipHelp.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>157, 17</value> <value>157, 17</value>
</metadata> </metadata>
@ -130,7 +127,7 @@
<data name="toolStripCheckUpdate.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="toolStripCheckUpdate.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc

View File

@ -90,7 +90,8 @@
this.ToolStripMenuItem}); this.ToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(838, 28); this.menuStrip1.Padding = new System.Windows.Forms.Padding(4, 2, 0, 2);
this.menuStrip1.Size = new System.Drawing.Size(628, 25);
this.menuStrip1.TabIndex = 0; this.menuStrip1.TabIndex = 0;
this.menuStrip1.Text = "menuStrip1"; this.menuStrip1.Text = "menuStrip1";
// //
@ -104,14 +105,14 @@
this.toolStripSeparator1, this.toolStripSeparator1,
this.退ToolStripMenuItem}); this.退ToolStripMenuItem});
this.ToolStripMenuItem.Name = "文件ToolStripMenuItem"; this.ToolStripMenuItem.Name = "文件ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(51, 24); this.ToolStripMenuItem.Size = new System.Drawing.Size(44, 21);
this.ToolStripMenuItem.Text = "文件"; this.ToolStripMenuItem.Text = "文件";
// //
// 新建ToolStripMenuItem // 新建ToolStripMenuItem
// //
this.ToolStripMenuItem.Name = "新建ToolStripMenuItem"; this.ToolStripMenuItem.Name = "新建ToolStripMenuItem";
this.ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N))); this.ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
this.ToolStripMenuItem.Size = new System.Drawing.Size(222, 24); this.ToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
this.ToolStripMenuItem.Text = "新建"; this.ToolStripMenuItem.Text = "新建";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click); this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
// //
@ -119,7 +120,7 @@
// //
this.ToolStripMenuItem.Name = "打开ToolStripMenuItem"; this.ToolStripMenuItem.Name = "打开ToolStripMenuItem";
this.ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); this.ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
this.ToolStripMenuItem.Size = new System.Drawing.Size(222, 24); this.ToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
this.ToolStripMenuItem.Text = "打开"; this.ToolStripMenuItem.Text = "打开";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click); this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
// //
@ -127,7 +128,7 @@
// //
this.ToolStripMenuItem.Name = "保存ToolStripMenuItem"; this.ToolStripMenuItem.Name = "保存ToolStripMenuItem";
this.ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S))); this.ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
this.ToolStripMenuItem.Size = new System.Drawing.Size(222, 24); this.ToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
this.ToolStripMenuItem.Text = "保存"; this.ToolStripMenuItem.Text = "保存";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click); this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
// //
@ -136,20 +137,20 @@
this.ToolStripMenuItem.Name = "另存为ToolStripMenuItem"; this.ToolStripMenuItem.Name = "另存为ToolStripMenuItem";
this.ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) this.ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.S))); | System.Windows.Forms.Keys.S)));
this.ToolStripMenuItem.Size = new System.Drawing.Size(222, 24); this.ToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
this.ToolStripMenuItem.Text = "另存为"; this.ToolStripMenuItem.Text = "另存为";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click); this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
// //
// toolStripSeparator1 // toolStripSeparator1
// //
this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(219, 6); this.toolStripSeparator1.Size = new System.Drawing.Size(187, 6);
// //
// 退出ToolStripMenuItem // 退出ToolStripMenuItem
// //
this.退ToolStripMenuItem.Name = "退出ToolStripMenuItem"; this.退ToolStripMenuItem.Name = "退出ToolStripMenuItem";
this.退ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.X))); this.退ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.X)));
this.退ToolStripMenuItem.Size = new System.Drawing.Size(222, 24); this.退ToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
this.退ToolStripMenuItem.Text = "退出"; this.退ToolStripMenuItem.Text = "退出";
this.退ToolStripMenuItem.Click += new System.EventHandler(this.退ToolStripMenuItem_Click); this.退ToolStripMenuItem.Click += new System.EventHandler(this.退ToolStripMenuItem_Click);
// //
@ -167,27 +168,27 @@
this.toolStripSeparator4, this.toolStripSeparator4,
this.ToolStripMenuItem}); this.ToolStripMenuItem});
this.ToolStripMenuItem.Name = "工具ToolStripMenuItem"; this.ToolStripMenuItem.Name = "工具ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(51, 24); this.ToolStripMenuItem.Size = new System.Drawing.Size(44, 21);
this.ToolStripMenuItem.Text = "工具"; this.ToolStripMenuItem.Text = "工具";
// //
// 修改UIDToolStripMenuItem // 修改UIDToolStripMenuItem
// //
this.UIDToolStripMenuItem.Name = "修改UIDToolStripMenuItem"; this.UIDToolStripMenuItem.Name = "修改UIDToolStripMenuItem";
this.UIDToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.U))); this.UIDToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.U)));
this.UIDToolStripMenuItem.Size = new System.Drawing.Size(248, 24); this.UIDToolStripMenuItem.Size = new System.Drawing.Size(212, 22);
this.UIDToolStripMenuItem.Text = "修改UID"; this.UIDToolStripMenuItem.Text = "修改UID";
this.UIDToolStripMenuItem.Click += new System.EventHandler(this.UIDToolStripMenuItem_Click); this.UIDToolStripMenuItem.Click += new System.EventHandler(this.UIDToolStripMenuItem_Click);
// //
// toolStripSeparator2 // toolStripSeparator2
// //
this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(245, 6); this.toolStripSeparator2.Size = new System.Drawing.Size(209, 6);
// //
// 检查全卡ToolStripMenuItem // 检查全卡ToolStripMenuItem
// //
this.ToolStripMenuItem.Name = "检查全卡ToolStripMenuItem"; this.ToolStripMenuItem.Name = "检查全卡ToolStripMenuItem";
this.ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.J))); this.ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.J)));
this.ToolStripMenuItem.Size = new System.Drawing.Size(248, 24); this.ToolStripMenuItem.Size = new System.Drawing.Size(212, 22);
this.ToolStripMenuItem.Text = "检查全卡"; this.ToolStripMenuItem.Text = "检查全卡";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click); this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
// //
@ -195,20 +196,20 @@
// //
this.ToolStripMenuItem.Name = "检查并纠正全卡ToolStripMenuItem"; this.ToolStripMenuItem.Name = "检查并纠正全卡ToolStripMenuItem";
this.ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.K))); this.ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.K)));
this.ToolStripMenuItem.Size = new System.Drawing.Size(248, 24); this.ToolStripMenuItem.Size = new System.Drawing.Size(212, 22);
this.ToolStripMenuItem.Text = "检查并纠正全卡"; this.ToolStripMenuItem.Text = "检查并纠正全卡";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click); this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
// //
// toolStripSeparator3 // toolStripSeparator3
// //
this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(245, 6); this.toolStripSeparator3.Size = new System.Drawing.Size(209, 6);
// //
// 导入MCT格式ToolStripMenuItem // 导入MCT格式ToolStripMenuItem
// //
this.MCT格式ToolStripMenuItem.Name = "导入MCT格式ToolStripMenuItem"; this.MCT格式ToolStripMenuItem.Name = "导入MCT格式ToolStripMenuItem";
this.MCT格式ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.L))); this.MCT格式ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.L)));
this.MCT格式ToolStripMenuItem.Size = new System.Drawing.Size(248, 24); this.MCT格式ToolStripMenuItem.Size = new System.Drawing.Size(212, 22);
this.MCT格式ToolStripMenuItem.Text = "导入MCT格式"; this.MCT格式ToolStripMenuItem.Text = "导入MCT格式";
this.MCT格式ToolStripMenuItem.Click += new System.EventHandler(this.MCT格式ToolStripMenuItem_Click); this.MCT格式ToolStripMenuItem.Click += new System.EventHandler(this.MCT格式ToolStripMenuItem_Click);
// //
@ -216,7 +217,7 @@
// //
this.MCT格式ToolStripMenuItem.Name = "导出为MCT格式ToolStripMenuItem"; this.MCT格式ToolStripMenuItem.Name = "导出为MCT格式ToolStripMenuItem";
this.MCT格式ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.M))); this.MCT格式ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.M)));
this.MCT格式ToolStripMenuItem.Size = new System.Drawing.Size(248, 24); this.MCT格式ToolStripMenuItem.Size = new System.Drawing.Size(212, 22);
this.MCT格式ToolStripMenuItem.Text = "导出为MCT格式"; this.MCT格式ToolStripMenuItem.Text = "导出为MCT格式";
this.MCT格式ToolStripMenuItem.Click += new System.EventHandler(this.MCT格式ToolStripMenuItem_Click); this.MCT格式ToolStripMenuItem.Click += new System.EventHandler(this.MCT格式ToolStripMenuItem_Click);
// //
@ -224,29 +225,31 @@
// //
this.ToolStripMenuItem.Name = "导出密钥字典ToolStripMenuItem"; this.ToolStripMenuItem.Name = "导出密钥字典ToolStripMenuItem";
this.ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N))); this.ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
this.ToolStripMenuItem.Size = new System.Drawing.Size(248, 24); this.ToolStripMenuItem.Size = new System.Drawing.Size(212, 22);
this.ToolStripMenuItem.Text = "导出密钥字典"; this.ToolStripMenuItem.Text = "导出密钥字典";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click); this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
// //
// toolStripSeparator4 // toolStripSeparator4
// //
this.toolStripSeparator4.Name = "toolStripSeparator4"; this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(245, 6); this.toolStripSeparator4.Size = new System.Drawing.Size(209, 6);
// //
// 列出全卡密钥ToolStripMenuItem // 列出全卡密钥ToolStripMenuItem
// //
this.ToolStripMenuItem.Name = "列出全卡密钥ToolStripMenuItem"; this.ToolStripMenuItem.Name = "列出全卡密钥ToolStripMenuItem";
this.ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I))); this.ToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I)));
this.ToolStripMenuItem.Size = new System.Drawing.Size(248, 24); this.ToolStripMenuItem.Size = new System.Drawing.Size(212, 22);
this.ToolStripMenuItem.Text = "列出全卡密钥"; this.ToolStripMenuItem.Text = "列出全卡密钥";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click); this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.dataGridView1); this.groupBox1.Controls.Add(this.dataGridView1);
this.groupBox1.Location = new System.Drawing.Point(12, 31); this.groupBox1.Location = new System.Drawing.Point(9, 25);
this.groupBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(250, 409); this.groupBox1.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupBox1.Size = new System.Drawing.Size(188, 327);
this.groupBox1.TabIndex = 1; this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "扇区列表"; this.groupBox1.Text = "扇区列表";
@ -263,7 +266,8 @@
this.Column1}); this.Column1});
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill; this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
this.dataGridView1.Location = new System.Drawing.Point(3, 21); this.dataGridView1.Location = new System.Drawing.Point(2, 16);
this.dataGridView1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.dataGridView1.MultiSelect = false; this.dataGridView1.MultiSelect = false;
this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.ReadOnly = true; this.dataGridView1.ReadOnly = true;
@ -271,7 +275,7 @@
this.dataGridView1.RowTemplate.Height = 27; this.dataGridView1.RowTemplate.Height = 27;
this.dataGridView1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; this.dataGridView1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView1.Size = new System.Drawing.Size(244, 385); this.dataGridView1.Size = new System.Drawing.Size(184, 309);
this.dataGridView1.TabIndex = 0; this.dataGridView1.TabIndex = 0;
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick); this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick);
// //
@ -305,18 +309,21 @@
this.groupBox2.Controls.Add(this.block0Edit); this.groupBox2.Controls.Add(this.block0Edit);
this.groupBox2.Controls.Add(this.label1); this.groupBox2.Controls.Add(this.label1);
this.groupBox2.Controls.Add(this.labelCurSec); this.groupBox2.Controls.Add(this.labelCurSec);
this.groupBox2.Location = new System.Drawing.Point(268, 31); this.groupBox2.Location = new System.Drawing.Point(201, 25);
this.groupBox2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(292, 409); this.groupBox2.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupBox2.Size = new System.Drawing.Size(219, 327);
this.groupBox2.TabIndex = 2; this.groupBox2.TabIndex = 2;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "扇区信息"; this.groupBox2.Text = "扇区信息";
// //
// buttonSaveSectorEdit // buttonSaveSectorEdit
// //
this.buttonSaveSectorEdit.Location = new System.Drawing.Point(147, 16); this.buttonSaveSectorEdit.Location = new System.Drawing.Point(110, 13);
this.buttonSaveSectorEdit.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.buttonSaveSectorEdit.Name = "buttonSaveSectorEdit"; this.buttonSaveSectorEdit.Name = "buttonSaveSectorEdit";
this.buttonSaveSectorEdit.Size = new System.Drawing.Size(139, 25); this.buttonSaveSectorEdit.Size = new System.Drawing.Size(104, 20);
this.buttonSaveSectorEdit.TabIndex = 20; this.buttonSaveSectorEdit.TabIndex = 20;
this.buttonSaveSectorEdit.Text = "修改扇区(Enter)"; this.buttonSaveSectorEdit.Text = "修改扇区(Enter)";
this.buttonSaveSectorEdit.UseVisualStyleBackColor = true; this.buttonSaveSectorEdit.UseVisualStyleBackColor = true;
@ -336,9 +343,10 @@
"KeyA:不能读写/AC:A只读B读写/KeyB:不能读写", "KeyA:不能读写/AC:A只读B读写/KeyB:不能读写",
"[不可逆]KeyA:不能读写/AC:AB只读/KeyB:不能读写", "[不可逆]KeyA:不能读写/AC:AB只读/KeyB:不能读写",
"[不可逆]KeyA:不能读写/AC:AB只读/KeyB:不能读写(重复了?)"}); "[不可逆]KeyA:不能读写/AC:AB只读/KeyB:不能读写(重复了?)"});
this.comboBox4.Location = new System.Drawing.Point(6, 379); this.comboBox4.Location = new System.Drawing.Point(4, 303);
this.comboBox4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.comboBox4.Name = "comboBox4"; this.comboBox4.Name = "comboBox4";
this.comboBox4.Size = new System.Drawing.Size(280, 23); this.comboBox4.Size = new System.Drawing.Size(211, 20);
this.comboBox4.TabIndex = 19; this.comboBox4.TabIndex = 19;
this.comboBox4.Validating += new System.ComponentModel.CancelEventHandler(this.comboBox1_Validating); this.comboBox4.Validating += new System.ComponentModel.CancelEventHandler(this.comboBox1_Validating);
// //
@ -355,9 +363,10 @@
"[只读]KeyB读/不可写及增减值", "[只读]KeyB读/不可写及增减值",
"KeyAB读及减值/KeyB写及增值", "KeyAB读及减值/KeyB写及增值",
"[只读]锁死该扇区"}); "[只读]锁死该扇区"});
this.comboBox3.Location = new System.Drawing.Point(6, 335); this.comboBox3.Location = new System.Drawing.Point(4, 268);
this.comboBox3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.comboBox3.Name = "comboBox3"; this.comboBox3.Name = "comboBox3";
this.comboBox3.Size = new System.Drawing.Size(280, 23); this.comboBox3.Size = new System.Drawing.Size(211, 20);
this.comboBox3.TabIndex = 18; this.comboBox3.TabIndex = 18;
this.comboBox3.Validating += new System.ComponentModel.CancelEventHandler(this.comboBox1_Validating); this.comboBox3.Validating += new System.ComponentModel.CancelEventHandler(this.comboBox1_Validating);
// //
@ -374,9 +383,10 @@
"[只读]KeyB读/不可写及增减值", "[只读]KeyB读/不可写及增减值",
"KeyAB读及减值/KeyB写及增值", "KeyAB读及减值/KeyB写及增值",
"[只读]锁死该扇区"}); "[只读]锁死该扇区"});
this.comboBox2.Location = new System.Drawing.Point(6, 291); this.comboBox2.Location = new System.Drawing.Point(4, 233);
this.comboBox2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.comboBox2.Name = "comboBox2"; this.comboBox2.Name = "comboBox2";
this.comboBox2.Size = new System.Drawing.Size(280, 23); this.comboBox2.Size = new System.Drawing.Size(211, 20);
this.comboBox2.TabIndex = 17; this.comboBox2.TabIndex = 17;
this.comboBox2.Validating += new System.ComponentModel.CancelEventHandler(this.comboBox1_Validating); this.comboBox2.Validating += new System.ComponentModel.CancelEventHandler(this.comboBox1_Validating);
// //
@ -393,148 +403,167 @@
"[只读]KeyB读/不可写及增减值", "[只读]KeyB读/不可写及增减值",
"KeyAB读及减值/KeyB写及增值", "KeyAB读及减值/KeyB写及增值",
"[只读]锁死该扇区"}); "[只读]锁死该扇区"});
this.comboBox1.Location = new System.Drawing.Point(6, 247); this.comboBox1.Location = new System.Drawing.Point(4, 198);
this.comboBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.comboBox1.Name = "comboBox1"; this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(280, 23); this.comboBox1.Size = new System.Drawing.Size(211, 20);
this.comboBox1.TabIndex = 16; this.comboBox1.TabIndex = 16;
this.comboBox1.Validating += new System.ComponentModel.CancelEventHandler(this.comboBox1_Validating); this.comboBox1.Validating += new System.ComponentModel.CancelEventHandler(this.comboBox1_Validating);
// //
// label9 // label9
// //
this.label9.AutoSize = true; this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(3, 361); this.label9.Location = new System.Drawing.Point(2, 289);
this.label9.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label9.Name = "label9"; this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(117, 15); this.label9.Size = new System.Drawing.Size(89, 12);
this.label9.TabIndex = 15; this.label9.TabIndex = 15;
this.label9.Text = "Key/ACbits权限"; this.label9.Text = "Key/ACbits权限";
// //
// label8 // label8
// //
this.label8.AutoSize = true; this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(6, 317); this.label8.Location = new System.Drawing.Point(4, 254);
this.label8.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label8.Name = "label8"; this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(60, 15); this.label8.Size = new System.Drawing.Size(47, 12);
this.label8.TabIndex = 14; this.label8.TabIndex = 14;
this.label8.Text = "2块权限"; this.label8.Text = "2块权限";
// //
// label7 // label7
// //
this.label7.AutoSize = true; this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(3, 273); this.label7.Location = new System.Drawing.Point(2, 218);
this.label7.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label7.Name = "label7"; this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(60, 15); this.label7.Size = new System.Drawing.Size(47, 12);
this.label7.TabIndex = 13; this.label7.TabIndex = 13;
this.label7.Text = "1块权限"; this.label7.Text = "1块权限";
// //
// label6 // label6
// //
this.label6.AutoSize = true; this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(6, 229); this.label6.Location = new System.Drawing.Point(4, 183);
this.label6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label6.Name = "label6"; this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(60, 15); this.label6.Size = new System.Drawing.Size(47, 12);
this.label6.TabIndex = 12; this.label6.TabIndex = 12;
this.label6.Text = "0块权限"; this.label6.Text = "0块权限";
// //
// label5 // label5
// //
this.label5.AutoSize = true; this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(166, 183); this.label5.Location = new System.Drawing.Point(124, 146);
this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(39, 15); this.label5.Size = new System.Drawing.Size(29, 12);
this.label5.TabIndex = 11; this.label5.TabIndex = 11;
this.label5.Text = "KeyB"; this.label5.Text = "KeyB";
// //
// keyBEdit // keyBEdit
// //
this.keyBEdit.Location = new System.Drawing.Point(166, 201); this.keyBEdit.Location = new System.Drawing.Point(124, 161);
this.keyBEdit.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.keyBEdit.Name = "keyBEdit"; this.keyBEdit.Name = "keyBEdit";
this.keyBEdit.Size = new System.Drawing.Size(120, 25); this.keyBEdit.Size = new System.Drawing.Size(91, 21);
this.keyBEdit.TabIndex = 10; this.keyBEdit.TabIndex = 10;
this.keyBEdit.Validating += new System.ComponentModel.CancelEventHandler(this.keyAEdit_Validating); this.keyBEdit.Validating += new System.ComponentModel.CancelEventHandler(this.keyAEdit_Validating);
// //
// keyAEdit // keyAEdit
// //
this.keyAEdit.Location = new System.Drawing.Point(6, 201); this.keyAEdit.Location = new System.Drawing.Point(4, 161);
this.keyAEdit.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.keyAEdit.Name = "keyAEdit"; this.keyAEdit.Name = "keyAEdit";
this.keyAEdit.Size = new System.Drawing.Size(120, 25); this.keyAEdit.Size = new System.Drawing.Size(91, 21);
this.keyAEdit.TabIndex = 9; this.keyAEdit.TabIndex = 9;
this.keyAEdit.TextChanged += new System.EventHandler(this.keyAEdit_TextChanged);
this.keyAEdit.Validating += new System.ComponentModel.CancelEventHandler(this.keyAEdit_Validating); this.keyAEdit.Validating += new System.ComponentModel.CancelEventHandler(this.keyAEdit_Validating);
// //
// block2Edit // block2Edit
// //
this.block2Edit.Location = new System.Drawing.Point(6, 155); this.block2Edit.Location = new System.Drawing.Point(4, 124);
this.block2Edit.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.block2Edit.Name = "block2Edit"; this.block2Edit.Name = "block2Edit";
this.block2Edit.Size = new System.Drawing.Size(280, 25); this.block2Edit.Size = new System.Drawing.Size(211, 21);
this.block2Edit.TabIndex = 8; this.block2Edit.TabIndex = 8;
this.block2Edit.Validating += new System.ComponentModel.CancelEventHandler(this.block0Edit_Validating); this.block2Edit.Validating += new System.ComponentModel.CancelEventHandler(this.block0Edit_Validating);
// //
// label4 // label4
// //
this.label4.AutoSize = true; this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(6, 183); this.label4.Location = new System.Drawing.Point(4, 146);
this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(39, 15); this.label4.Size = new System.Drawing.Size(29, 12);
this.label4.TabIndex = 7; this.label4.TabIndex = 7;
this.label4.Text = "KeyA"; this.label4.Text = "KeyA";
// //
// label3 // label3
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(6, 137); this.label3.Location = new System.Drawing.Point(4, 110);
this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(45, 15); this.label3.Size = new System.Drawing.Size(35, 12);
this.label3.TabIndex = 5; this.label3.TabIndex = 5;
this.label3.Text = "第2块"; this.label3.Text = "第2块";
// //
// block1Edit // block1Edit
// //
this.block1Edit.Location = new System.Drawing.Point(6, 109); this.block1Edit.Location = new System.Drawing.Point(4, 87);
this.block1Edit.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.block1Edit.Name = "block1Edit"; this.block1Edit.Name = "block1Edit";
this.block1Edit.Size = new System.Drawing.Size(280, 25); this.block1Edit.Size = new System.Drawing.Size(211, 21);
this.block1Edit.TabIndex = 4; this.block1Edit.TabIndex = 4;
this.block1Edit.Validating += new System.ComponentModel.CancelEventHandler(this.block0Edit_Validating); this.block1Edit.Validating += new System.ComponentModel.CancelEventHandler(this.block0Edit_Validating);
// //
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(6, 91); this.label2.Location = new System.Drawing.Point(4, 73);
this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(45, 15); this.label2.Size = new System.Drawing.Size(35, 12);
this.label2.TabIndex = 3; this.label2.TabIndex = 3;
this.label2.Text = "第1块"; this.label2.Text = "第1块";
// //
// block0Edit // block0Edit
// //
this.block0Edit.Location = new System.Drawing.Point(6, 63); this.block0Edit.Location = new System.Drawing.Point(4, 50);
this.block0Edit.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.block0Edit.Name = "block0Edit"; this.block0Edit.Name = "block0Edit";
this.block0Edit.Size = new System.Drawing.Size(280, 25); this.block0Edit.Size = new System.Drawing.Size(211, 21);
this.block0Edit.TabIndex = 2; this.block0Edit.TabIndex = 2;
this.block0Edit.Validating += new System.ComponentModel.CancelEventHandler(this.block0Edit_Validating); this.block0Edit.Validating += new System.ComponentModel.CancelEventHandler(this.block0Edit_Validating);
// //
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(6, 45); this.label1.Location = new System.Drawing.Point(4, 36);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(45, 15); this.label1.Size = new System.Drawing.Size(35, 12);
this.label1.TabIndex = 1; this.label1.TabIndex = 1;
this.label1.Text = "第0块"; this.label1.Text = "第0块";
// //
// labelCurSec // labelCurSec
// //
this.labelCurSec.AutoSize = true; this.labelCurSec.AutoSize = true;
this.labelCurSec.Location = new System.Drawing.Point(6, 21); this.labelCurSec.Location = new System.Drawing.Point(4, 17);
this.labelCurSec.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.labelCurSec.Name = "labelCurSec"; this.labelCurSec.Name = "labelCurSec";
this.labelCurSec.Size = new System.Drawing.Size(142, 15); this.labelCurSec.Size = new System.Drawing.Size(113, 12);
this.labelCurSec.TabIndex = 0; this.labelCurSec.TabIndex = 0;
this.labelCurSec.Text = "当前选定扇区:??"; this.labelCurSec.Text = "当前选定扇区:??";
// //
// groupBox3 // groupBox3
// //
this.groupBox3.Controls.Add(this.richTextBox1); this.groupBox3.Controls.Add(this.richTextBox1);
this.groupBox3.Location = new System.Drawing.Point(566, 31); this.groupBox3.Location = new System.Drawing.Point(424, 25);
this.groupBox3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupBox3.Name = "groupBox3"; this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(260, 409); this.groupBox3.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupBox3.Size = new System.Drawing.Size(195, 327);
this.groupBox3.TabIndex = 3; this.groupBox3.TabIndex = 3;
this.groupBox3.TabStop = false; this.groupBox3.TabStop = false;
this.groupBox3.Text = "输出"; this.groupBox3.Text = "输出";
@ -543,11 +572,12 @@
// //
this.richTextBox1.BackColor = System.Drawing.Color.Black; this.richTextBox1.BackColor = System.Drawing.Color.Black;
this.richTextBox1.ForeColor = System.Drawing.Color.Cyan; this.richTextBox1.ForeColor = System.Drawing.Color.Cyan;
this.richTextBox1.Location = new System.Drawing.Point(6, 24); this.richTextBox1.Location = new System.Drawing.Point(4, 19);
this.richTextBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.richTextBox1.Name = "richTextBox1"; this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.ReadOnly = true; this.richTextBox1.ReadOnly = true;
this.richTextBox1.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical; this.richTextBox1.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
this.richTextBox1.Size = new System.Drawing.Size(248, 379); this.richTextBox1.Size = new System.Drawing.Size(187, 304);
this.richTextBox1.TabIndex = 0; this.richTextBox1.TabIndex = 0;
this.richTextBox1.Text = "欢迎使用M1T的集成编辑器S50HTool\n打开文件请点左上角文件-打开或Ctrl+O\n"; this.richTextBox1.Text = "欢迎使用M1T的集成编辑器S50HTool\n打开文件请点左上角文件-打开或Ctrl+O\n";
// //
@ -558,15 +588,16 @@
// FormHTool // FormHTool
// //
this.AcceptButton = this.buttonSaveSectorEdit; this.AcceptButton = this.buttonSaveSectorEdit;
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(838, 452); this.ClientSize = new System.Drawing.Size(628, 362);
this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox1);
this.Controls.Add(this.menuStrip1); this.Controls.Add(this.menuStrip1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MainMenuStrip = this.menuStrip1; this.MainMenuStrip = this.menuStrip1;
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.MaximizeBox = false; this.MaximizeBox = false;
this.Name = "FormHTool"; this.Name = "FormHTool";
this.Text = "S50HTool-beta"; this.Text = "S50HTool-beta";
@ -629,7 +660,6 @@
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
private System.Windows.Forms.ToolStripMenuItem MCT格式ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem MCT格式ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem MCT格式ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem MCT格式ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;

View File

@ -489,5 +489,10 @@ namespace MifareOneTool
{ {
ToolStripMenuItem_Click(sender, e); ToolStripMenuItem_Click(sender, e);
} }
private void keyAEdit_TextChanged(object sender, EventArgs e)
{
}
} }
} }

View File

@ -46,16 +46,16 @@
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.checkBoxColOnly = new System.Windows.Forms.CheckBox(); this.checkBoxColOnly = new System.Windows.Forms.CheckBox();
this.sector2 = new System.Windows.Forms.TextBox(); this.sector2 = new System.Windows.Forms.TextBox();
this.checkBoxCollectAll = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// button1 // button1
// //
this.button1.Location = new System.Drawing.Point(308, 187); this.button1.Location = new System.Drawing.Point(231, 150);
this.button1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.button1.Name = "button1"; this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 25); this.button1.Size = new System.Drawing.Size(56, 20);
this.button1.TabIndex = 0; this.button1.TabIndex = 0;
this.button1.Text = "执行!"; this.button1.Text = "执行!";
this.button1.UseVisualStyleBackColor = true; this.button1.UseVisualStyleBackColor = true;
@ -64,9 +64,10 @@
// button2 // button2
// //
this.button2.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.button2.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button2.Location = new System.Drawing.Point(227, 187); this.button2.Location = new System.Drawing.Point(170, 150);
this.button2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.button2.Name = "button2"; this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 25); this.button2.Size = new System.Drawing.Size(56, 20);
this.button2.TabIndex = 1; this.button2.TabIndex = 1;
this.button2.Text = "取消"; this.button2.Text = "取消";
this.button2.UseVisualStyleBackColor = true; this.button2.UseVisualStyleBackColor = true;
@ -81,19 +82,22 @@
this.groupBox1.Controls.Add(this.sector1); this.groupBox1.Controls.Add(this.sector1);
this.groupBox1.Controls.Add(this.keyEdit); this.groupBox1.Controls.Add(this.keyEdit);
this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Location = new System.Drawing.Point(12, 12); this.groupBox1.Location = new System.Drawing.Point(9, 10);
this.groupBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(371, 81); this.groupBox1.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupBox1.Size = new System.Drawing.Size(278, 65);
this.groupBox1.TabIndex = 2; this.groupBox1.TabIndex = 2;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "目标卡信息"; this.groupBox1.Text = "目标卡-已知信息";
// //
// radioKey1B // radioKey1B
// //
this.radioKey1B.AutoSize = true; this.radioKey1B.AutoSize = true;
this.radioKey1B.Location = new System.Drawing.Point(259, 40); this.radioKey1B.Location = new System.Drawing.Point(194, 32);
this.radioKey1B.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.radioKey1B.Name = "radioKey1B"; this.radioKey1B.Name = "radioKey1B";
this.radioKey1B.Size = new System.Drawing.Size(60, 19); this.radioKey1B.Size = new System.Drawing.Size(47, 16);
this.radioKey1B.TabIndex = 15; this.radioKey1B.TabIndex = 15;
this.radioKey1B.Text = "KeyB"; this.radioKey1B.Text = "KeyB";
this.radioKey1B.UseVisualStyleBackColor = true; this.radioKey1B.UseVisualStyleBackColor = true;
@ -102,9 +106,10 @@
// //
this.radioKey1A.AutoSize = true; this.radioKey1A.AutoSize = true;
this.radioKey1A.Checked = true; this.radioKey1A.Checked = true;
this.radioKey1A.Location = new System.Drawing.Point(193, 40); this.radioKey1A.Location = new System.Drawing.Point(145, 32);
this.radioKey1A.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.radioKey1A.Name = "radioKey1A"; this.radioKey1A.Name = "radioKey1A";
this.radioKey1A.Size = new System.Drawing.Size(60, 19); this.radioKey1A.Size = new System.Drawing.Size(47, 16);
this.radioKey1A.TabIndex = 14; this.radioKey1A.TabIndex = 14;
this.radioKey1A.TabStop = true; this.radioKey1A.TabStop = true;
this.radioKey1A.Text = "KeyA"; this.radioKey1A.Text = "KeyA";
@ -113,43 +118,48 @@
// label4 // label4
// //
this.label4.AutoSize = true; this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(190, 21); this.label4.Location = new System.Drawing.Point(142, 17);
this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(37, 15); this.label4.Size = new System.Drawing.Size(29, 12);
this.label4.TabIndex = 13; this.label4.TabIndex = 13;
this.label4.Text = "类型"; this.label4.Text = "类型";
// //
// label3 // label3
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(132, 21); this.label3.Location = new System.Drawing.Point(99, 17);
this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(52, 15); this.label3.Size = new System.Drawing.Size(41, 12);
this.label3.TabIndex = 12; this.label3.TabIndex = 12;
this.label3.Text = "扇区号"; this.label3.Text = "扇区号";
// //
// sector1 // sector1
// //
this.sector1.Location = new System.Drawing.Point(135, 39); this.sector1.Location = new System.Drawing.Point(101, 31);
this.sector1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.sector1.Name = "sector1"; this.sector1.Name = "sector1";
this.sector1.Size = new System.Drawing.Size(46, 25); this.sector1.Size = new System.Drawing.Size(36, 21);
this.sector1.TabIndex = 11; this.sector1.TabIndex = 11;
this.sector1.Text = "0"; this.sector1.Text = "0";
// //
// keyEdit // keyEdit
// //
this.keyEdit.Location = new System.Drawing.Point(9, 39); this.keyEdit.Location = new System.Drawing.Point(7, 31);
this.keyEdit.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.keyEdit.Name = "keyEdit"; this.keyEdit.Name = "keyEdit";
this.keyEdit.Size = new System.Drawing.Size(120, 25); this.keyEdit.Size = new System.Drawing.Size(91, 21);
this.keyEdit.TabIndex = 10; this.keyEdit.TabIndex = 10;
this.keyEdit.Text = "ffffffffffff"; this.keyEdit.Text = "ffffffffffff";
// //
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(6, 21); this.label2.Location = new System.Drawing.Point(4, 17);
this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(76, 15); this.label2.Size = new System.Drawing.Size(59, 12);
this.label2.TabIndex = 0; this.label2.TabIndex = 0;
this.label2.Text = "已知的Key"; this.label2.Text = "已知的Key";
// //
@ -157,18 +167,20 @@
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.ForeColor = System.Drawing.Color.Blue; this.label1.ForeColor = System.Drawing.Color.Blue;
this.label1.Location = new System.Drawing.Point(12, 192); this.label1.Location = new System.Drawing.Point(9, 154);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(202, 15); this.label1.Size = new System.Drawing.Size(161, 12);
this.label1.TabIndex = 3; this.label1.TabIndex = 3;
this.label1.Text = "解密时请保证设备良好散热!"; this.label1.Text = "连续工作时请注意设备散热!";
// //
// radioKey2B // radioKey2B
// //
this.radioKey2B.AutoSize = true; this.radioKey2B.AutoSize = true;
this.radioKey2B.Location = new System.Drawing.Point(259, 40); this.radioKey2B.Location = new System.Drawing.Point(194, 32);
this.radioKey2B.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.radioKey2B.Name = "radioKey2B"; this.radioKey2B.Name = "radioKey2B";
this.radioKey2B.Size = new System.Drawing.Size(60, 19); this.radioKey2B.Size = new System.Drawing.Size(47, 16);
this.radioKey2B.TabIndex = 15; this.radioKey2B.TabIndex = 15;
this.radioKey2B.Text = "KeyB"; this.radioKey2B.Text = "KeyB";
this.radioKey2B.UseVisualStyleBackColor = true; this.radioKey2B.UseVisualStyleBackColor = true;
@ -177,9 +189,10 @@
// //
this.radioKey2A.AutoSize = true; this.radioKey2A.AutoSize = true;
this.radioKey2A.Checked = true; this.radioKey2A.Checked = true;
this.radioKey2A.Location = new System.Drawing.Point(193, 40); this.radioKey2A.Location = new System.Drawing.Point(145, 32);
this.radioKey2A.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.radioKey2A.Name = "radioKey2A"; this.radioKey2A.Name = "radioKey2A";
this.radioKey2A.Size = new System.Drawing.Size(60, 19); this.radioKey2A.Size = new System.Drawing.Size(47, 16);
this.radioKey2A.TabIndex = 14; this.radioKey2A.TabIndex = 14;
this.radioKey2A.TabStop = true; this.radioKey2A.TabStop = true;
this.radioKey2A.Text = "KeyA"; this.radioKey2A.Text = "KeyA";
@ -188,73 +201,66 @@
// label5 // label5
// //
this.label5.AutoSize = true; this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(190, 21); this.label5.Location = new System.Drawing.Point(142, 17);
this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(37, 15); this.label5.Size = new System.Drawing.Size(29, 12);
this.label5.TabIndex = 13; this.label5.TabIndex = 13;
this.label5.Text = "类型"; this.label5.Text = "类型";
// //
// label6 // label6
// //
this.label6.AutoSize = true; this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(132, 21); this.label6.Location = new System.Drawing.Point(99, 17);
this.label6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label6.Name = "label6"; this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(52, 15); this.label6.Size = new System.Drawing.Size(41, 12);
this.label6.TabIndex = 12; this.label6.TabIndex = 12;
this.label6.Text = "扇区号"; this.label6.Text = "扇区号";
// //
// groupBox2 // groupBox2
// //
this.groupBox2.Controls.Add(this.checkBoxCollectAll);
this.groupBox2.Controls.Add(this.checkBoxColOnly); this.groupBox2.Controls.Add(this.checkBoxColOnly);
this.groupBox2.Controls.Add(this.radioKey2B); this.groupBox2.Controls.Add(this.radioKey2B);
this.groupBox2.Controls.Add(this.radioKey2A); this.groupBox2.Controls.Add(this.radioKey2A);
this.groupBox2.Controls.Add(this.label5); this.groupBox2.Controls.Add(this.label5);
this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label6);
this.groupBox2.Controls.Add(this.sector2); this.groupBox2.Controls.Add(this.sector2);
this.groupBox2.Location = new System.Drawing.Point(12, 99); this.groupBox2.Location = new System.Drawing.Point(9, 79);
this.groupBox2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(371, 81); this.groupBox2.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupBox2.Size = new System.Drawing.Size(278, 65);
this.groupBox2.TabIndex = 16; this.groupBox2.TabIndex = 16;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "解密设置"; this.groupBox2.Text = "目标扇区解密设置";
// //
// checkBoxColOnly // checkBoxColOnly
// //
this.checkBoxColOnly.AutoSize = true; this.checkBoxColOnly.AutoSize = true;
this.checkBoxColOnly.Location = new System.Drawing.Point(7, 24); this.checkBoxColOnly.Location = new System.Drawing.Point(5, 19);
this.checkBoxColOnly.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.checkBoxColOnly.Name = "checkBoxColOnly"; this.checkBoxColOnly.Name = "checkBoxColOnly";
this.checkBoxColOnly.Size = new System.Drawing.Size(119, 19); this.checkBoxColOnly.Size = new System.Drawing.Size(96, 16);
this.checkBoxColOnly.TabIndex = 17; this.checkBoxColOnly.TabIndex = 17;
this.checkBoxColOnly.Text = "只采集不计算"; this.checkBoxColOnly.Text = "只采集不计算";
this.checkBoxColOnly.UseVisualStyleBackColor = true; this.checkBoxColOnly.UseVisualStyleBackColor = true;
// //
// sector2 // sector2
// //
this.sector2.Location = new System.Drawing.Point(135, 39); this.sector2.Location = new System.Drawing.Point(101, 31);
this.sector2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.sector2.Name = "sector2"; this.sector2.Name = "sector2";
this.sector2.Size = new System.Drawing.Size(46, 25); this.sector2.Size = new System.Drawing.Size(36, 21);
this.sector2.TabIndex = 11; this.sector2.TabIndex = 11;
// //
// checkBoxCollectAll
//
this.checkBoxCollectAll.AutoSize = true;
this.checkBoxCollectAll.Location = new System.Drawing.Point(7, 49);
this.checkBoxCollectAll.Name = "checkBoxCollectAll";
this.checkBoxCollectAll.Size = new System.Drawing.Size(89, 19);
this.checkBoxCollectAll.TabIndex = 18;
this.checkBoxCollectAll.Text = "全卡采集";
this.checkBoxCollectAll.UseVisualStyleBackColor = true;
this.checkBoxCollectAll.Visible = false;
this.checkBoxCollectAll.CheckedChanged += new System.EventHandler(this.checkBoxCollectAll_CheckedChanged);
//
// FormHardNes // FormHardNes
// //
this.AcceptButton = this.button1; this.AcceptButton = this.button1;
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.button2; this.CancelButton = this.button2;
this.ClientSize = new System.Drawing.Size(395, 224); this.ClientSize = new System.Drawing.Size(296, 179);
this.ControlBox = false; this.ControlBox = false;
this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox2);
this.Controls.Add(this.label1); this.Controls.Add(this.label1);
@ -262,6 +268,7 @@
this.Controls.Add(this.button2); this.Controls.Add(this.button2);
this.Controls.Add(this.button1); this.Controls.Add(this.button1);
this.KeyPreview = true; this.KeyPreview = true;
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "FormHardNes"; this.Name = "FormHardNes";
@ -295,6 +302,5 @@
private System.Windows.Forms.TextBox sector2; private System.Windows.Forms.TextBox sector2;
private System.Windows.Forms.TextBox sector1; private System.Windows.Forms.TextBox sector1;
private System.Windows.Forms.CheckBox checkBoxColOnly; private System.Windows.Forms.CheckBox checkBoxColOnly;
private System.Windows.Forms.CheckBox checkBoxCollectAll;
} }
} }

View File

@ -121,25 +121,5 @@ namespace MifareOneTool
this.DialogResult = DialogResult.Yes; this.DialogResult = DialogResult.Yes;
this.Close(); this.Close();
} }
private void checkBoxCollectAll_CheckedChanged(object sender, EventArgs e)
{
if (checkBoxCollectAll.Checked)
{
checkBoxColOnly.Checked = true;
checkBoxColOnly.Enabled = false;
sector2.Enabled = false;
radioKey2A.Enabled = false;
radioKey2B.Enabled = false;
}
else
{
checkBoxColOnly.Checked = false;
checkBoxColOnly.Enabled = true;
sector2.Enabled = true;
radioKey2A.Enabled = true;
radioKey2B.Enabled = true;
}
}
} }
} }

View File

@ -15,18 +15,17 @@ namespace MifareOneTool
[STAThread] [STAThread]
static void Main() static void Main()
{ {
bool ret; if (Properties.Settings.Default.MultiMode)
System.Threading.Mutex mutex = new System.Threading.Mutex(true, Application.ProductName, out ret);
if (ret)
{ {
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1()); Application.Run(new Form1());
mutex.ReleaseMutex();
} }
else else
{ {
if (MessageBox.Show("您已经运行了MifareOne Tool打开多个本程序可能会造成冲突及不可预料到的错误。\n确认要继续吗", "您正在试图重复运行", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK) bool ret;
System.Threading.Mutex mutex = new System.Threading.Mutex(true, Application.ProductName, out ret);
if (ret)
{ {
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
@ -35,7 +34,17 @@ namespace MifareOneTool
} }
else else
{ {
Application.Exit(); if (MessageBox.Show("您已经运行了MifareOne Tool打开多个本程序可能会造成冲突及不可预料到的错误。\n确认要继续吗", "您正在试图重复运行", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
mutex.ReleaseMutex();
}
else
{
Application.Exit();
}
} }
} }
} }

View File

@ -151,5 +151,17 @@ namespace MifareOneTool.Properties {
this["NewScan"] = value; this["NewScan"] = value;
} }
} }
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool MultiMode {
get {
return ((bool)(this["MultiMode"]));
}
set {
this["MultiMode"] = value;
}
}
} }
} }

View File

@ -35,5 +35,8 @@
<Setting Name="NewScan" Type="System.Boolean" Scope="User"> <Setting Name="NewScan" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value> <Value Profile="(Default)">True</Value>
</Setting> </Setting>
<Setting Name="MultiMode" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings> </Settings>
</SettingsFile> </SettingsFile>

View File

@ -47,6 +47,9 @@
<setting name="NewScan" serializeAs="String"> <setting name="NewScan" serializeAs="String">
<value>True</value> <value>True</value>
</setting> </setting>
<setting name="MultiMode" serializeAs="String">
<value>False</value>
</setting>
</MifareOneTool.Properties.Settings> </MifareOneTool.Properties.Settings>
</userSettings> </userSettings>
</configuration> </configuration>