diff --git a/MifareOneTool/Form1.Designer.cs b/MifareOneTool/Form1.Designer.cs index 28e5be3..40b2fba 100644 --- a/MifareOneTool/Form1.Designer.cs +++ b/MifareOneTool/Form1.Designer.cs @@ -29,23 +29,28 @@ private void InitializeComponent() { this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.button12 = new System.Windows.Forms.Button(); 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.button11 = new System.Windows.Forms.Button(); + this.button10 = new System.Windows.Forms.Button(); + this.button9 = new System.Windows.Forms.Button(); 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.groupBox3 = new System.Windows.Forms.GroupBox(); + this.button13 = new System.Windows.Forms.Button(); + this.button14 = new System.Windows.Forms.Button(); + this.button15 = new System.Windows.Forms.Button(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); + this.groupBox3.SuspendLayout(); this.SuspendLayout(); // // groupBox1 @@ -61,6 +66,16 @@ this.groupBox1.TabStop = false; this.groupBox1.Text = "设备控制"; // + // 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); + // // checkBox1 // this.checkBox1.AutoSize = true; @@ -99,9 +114,10 @@ this.richTextBox1.ForeColor = System.Drawing.Color.Lime; this.richTextBox1.Location = new System.Drawing.Point(12, 101); this.richTextBox1.Name = "richTextBox1"; + this.richTextBox1.ReadOnly = true; this.richTextBox1.Size = new System.Drawing.Size(623, 293); this.richTextBox1.TabIndex = 1; - this.richTextBox1.Text = "Hello,cardman!\n"; + this.richTextBox1.Text = "Hello,cardman!\n"; // // button3 // @@ -131,6 +147,36 @@ this.groupBox2.TabStop = false; this.groupBox2.Text = "功能"; // + // 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); + // + // 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); + // + // 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); + // // button8 // this.button8.Enabled = false; @@ -181,51 +227,54 @@ this.button4.UseVisualStyleBackColor = true; this.button4.Click += new System.EventHandler(this.button4_Click); // - // button9 + // groupBox3 // - 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); + this.groupBox3.Controls.Add(this.button15); + this.groupBox3.Controls.Add(this.button14); + this.groupBox3.Controls.Add(this.button13); + this.groupBox3.Location = new System.Drawing.Point(641, 12); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(169, 83); + this.groupBox3.TabIndex = 5; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "运行/终端"; // - // button10 + // button13 // - 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); + this.button13.Location = new System.Drawing.Point(6, 24); + this.button13.Name = "button13"; + this.button13.Size = new System.Drawing.Size(75, 23); + this.button13.TabIndex = 0; + this.button13.Text = "清空终端"; + this.button13.UseVisualStyleBackColor = true; + this.button13.Click += new System.EventHandler(this.button13_Click); // - // button11 + // button14 // - 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); + this.button14.Location = new System.Drawing.Point(87, 24); + this.button14.Name = "button14"; + this.button14.Size = new System.Drawing.Size(75, 23); + this.button14.TabIndex = 1; + this.button14.Text = "保存日志"; + this.button14.UseVisualStyleBackColor = true; + this.button14.Click += new System.EventHandler(this.button14_Click); // - // button12 + // button15 // - 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); + this.button15.Location = new System.Drawing.Point(6, 53); + this.button15.Name = "button15"; + this.button15.Size = new System.Drawing.Size(75, 23); + this.button15.TabIndex = 2; + this.button15.Text = "停止运行"; + this.button15.UseVisualStyleBackColor = true; + this.button15.Click += new System.EventHandler(this.button15_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.ClientSize = new System.Drawing.Size(835, 406); + this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); this.Controls.Add(this.richTextBox1); this.Controls.Add(this.groupBox1); @@ -237,6 +286,7 @@ this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.groupBox2.ResumeLayout(false); + this.groupBox3.ResumeLayout(false); this.ResumeLayout(false); } @@ -259,6 +309,10 @@ private System.Windows.Forms.Button button11; private System.Windows.Forms.Button button10; private System.Windows.Forms.Button button9; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.Button button14; + private System.Windows.Forms.Button button13; + private System.Windows.Forms.Button button15; } } diff --git a/MifareOneTool/Form1.cs b/MifareOneTool/Form1.cs index 7a5ae2f..c8cb865 100644 --- a/MifareOneTool/Form1.cs +++ b/MifareOneTool/Form1.cs @@ -483,5 +483,22 @@ namespace MifareOneTool lprocess = false; b.ReportProgress(100, "##运行完毕##"); } + + private void button13_Click(object sender, EventArgs e) + { + richTextBox1.Clear(); + } + + private void button14_Click(object sender, EventArgs e) + { + string logtext = richTextBox1.Text; + File.WriteAllText("m1t.log", logtext, Encoding.UTF8); + MessageBox.Show("终端内容已保存至m1t.log文件", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + + private void button15_Click(object sender, EventArgs e) + { + process.Kill(); + } } }