Commit 99606bf4 authored by YONG-LIN SU's avatar YONG-LIN SU

final V1.0

parent dcc3084b
......@@ -83,8 +83,8 @@
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer3);
this.splitContainer1.Size = new System.Drawing.Size(800, 574);
this.splitContainer1.SplitterDistance = 597;
this.splitContainer1.Size = new System.Drawing.Size(1014, 574);
this.splitContainer1.SplitterDistance = 756;
this.splitContainer1.TabIndex = 0;
//
// splitContainer2
......@@ -104,7 +104,7 @@
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.groupBox3);
this.splitContainer2.Size = new System.Drawing.Size(597, 574);
this.splitContainer2.Size = new System.Drawing.Size(756, 574);
this.splitContainer2.SplitterDistance = 427;
this.splitContainer2.TabIndex = 1;
//
......@@ -117,7 +117,7 @@
this.groupBox1.Margin = new System.Windows.Forms.Padding(0);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(8, 0, 8, 8);
this.groupBox1.Size = new System.Drawing.Size(593, 427);
this.groupBox1.Size = new System.Drawing.Size(752, 427);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "瀏覽影像";
......@@ -130,7 +130,7 @@
this.etcPictureBox1.Location = new System.Drawing.Point(8, 24);
this.etcPictureBox1.Margin = new System.Windows.Forms.Padding(0);
this.etcPictureBox1.Name = "etcPictureBox1";
this.etcPictureBox1.Size = new System.Drawing.Size(577, 395);
this.etcPictureBox1.Size = new System.Drawing.Size(736, 395);
this.etcPictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.etcPictureBox1.TabIndex = 0;
this.etcPictureBox1.TabStop = false;
......@@ -144,7 +144,7 @@
this.groupBox3.Margin = new System.Windows.Forms.Padding(0);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Padding = new System.Windows.Forms.Padding(8, 0, 8, 8);
this.groupBox3.Size = new System.Drawing.Size(597, 143);
this.groupBox3.Size = new System.Drawing.Size(756, 143);
this.groupBox3.TabIndex = 2;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "處理紀錄";
......@@ -162,7 +162,7 @@
this.listBox2.Location = new System.Drawing.Point(8, 24);
this.listBox2.Margin = new System.Windows.Forms.Padding(0);
this.listBox2.Name = "listBox2";
this.listBox2.Size = new System.Drawing.Size(581, 111);
this.listBox2.Size = new System.Drawing.Size(740, 111);
this.listBox2.TabIndex = 0;
this.listBox2.SelectedIndexChanged += new System.EventHandler(this.ListBox2_SelectedIndexChanged);
//
......@@ -182,7 +182,7 @@
// splitContainer3.Panel2
//
this.splitContainer3.Panel2.Controls.Add(this.groupBox4);
this.splitContainer3.Size = new System.Drawing.Size(199, 574);
this.splitContainer3.Size = new System.Drawing.Size(254, 574);
this.splitContainer3.SplitterDistance = 427;
this.splitContainer3.TabIndex = 2;
//
......@@ -197,7 +197,7 @@
this.groupBox2.Margin = new System.Windows.Forms.Padding(0);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Padding = new System.Windows.Forms.Padding(8, 0, 8, 8);
this.groupBox2.Size = new System.Drawing.Size(199, 427);
this.groupBox2.Size = new System.Drawing.Size(254, 427);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "影像清單";
......@@ -216,7 +216,7 @@
this.listBox1.Location = new System.Drawing.Point(8, 24);
this.listBox1.Margin = new System.Windows.Forms.Padding(0);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(183, 315);
this.listBox1.Size = new System.Drawing.Size(238, 315);
this.listBox1.TabIndex = 0;
this.listBox1.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.ListBox1_DrawItem);
this.listBox1.SelectedIndexChanged += new System.EventHandler(this.ListBox1_SelectedIndexChanged);
......@@ -229,7 +229,7 @@
this.button1.Location = new System.Drawing.Point(8, 339);
this.button1.Margin = new System.Windows.Forms.Padding(0);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(183, 40);
this.button1.Size = new System.Drawing.Size(238, 40);
this.button1.TabIndex = 1;
this.button1.Text = "車牌";
this.button1.UseVisualStyleBackColor = true;
......@@ -243,7 +243,7 @@
this.button2.Location = new System.Drawing.Point(8, 379);
this.button2.Margin = new System.Windows.Forms.Padding(0);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(183, 40);
this.button2.Size = new System.Drawing.Size(238, 40);
this.button2.TabIndex = 2;
this.button2.Text = "下一筆";
this.button2.UseVisualStyleBackColor = true;
......@@ -258,7 +258,7 @@
this.groupBox4.Margin = new System.Windows.Forms.Padding(0);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Padding = new System.Windows.Forms.Padding(8, 0, 8, 8);
this.groupBox4.Size = new System.Drawing.Size(199, 143);
this.groupBox4.Size = new System.Drawing.Size(254, 143);
this.groupBox4.TabIndex = 1;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "影像特照";
......@@ -271,7 +271,7 @@
this.etcPictureBox2.Location = new System.Drawing.Point(8, 24);
this.etcPictureBox2.Margin = new System.Windows.Forms.Padding(0);
this.etcPictureBox2.Name = "etcPictureBox2";
this.etcPictureBox2.Size = new System.Drawing.Size(183, 111);
this.etcPictureBox2.Size = new System.Drawing.Size(238, 111);
this.etcPictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.etcPictureBox2.TabIndex = 0;
this.etcPictureBox2.TabStop = false;
......@@ -291,7 +291,7 @@
this.toolStripStatusLabel4});
this.etcStatusStrip1.Location = new System.Drawing.Point(0, 574);
this.etcStatusStrip1.Name = "etcStatusStrip1";
this.etcStatusStrip1.Size = new System.Drawing.Size(800, 26);
this.etcStatusStrip1.Size = new System.Drawing.Size(1014, 26);
this.etcStatusStrip1.TabIndex = 2;
this.etcStatusStrip1.Text = "etcStatusStrip1";
this.etcStatusStrip1.Resize += new System.EventHandler(this.EtcStatusStrip1_Resize);
......@@ -349,7 +349,7 @@
this.Font = new System.Drawing.Font("Consolas", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Margin = new System.Windows.Forms.Padding(0);
this.Name = "ETCPictureCheckBox";
this.Size = new System.Drawing.Size(800, 600);
this.Size = new System.Drawing.Size(1014, 600);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
......
......@@ -36,9 +36,11 @@ namespace ETC_App1
public long Success { get; set; } = 0;
public long Failed { get; set; } = 0;
public long Noplate { get; set; } = 0;
public long Lost { get; set; } = 0;
public long Noimg { get; set; } = 0;
public long Nodata { get; set; } = 0;
public long Tickoff { get; set; } = 0;
public ETCPictureCheckBox()
......@@ -115,11 +117,25 @@ namespace ETC_App1
{
Data.Add(json);
Success = Success + (json.success ? 1 : 0);
Failed = Failed + (!json.success ? 1 : 0);
Lost = Lost + (json.lost1 ? 1 : 0);
if (!json.tickoff)
{
Success++;
}
else if (json.content)
{
if (json.lost2)
{
Nodata++;
}
else
{
Noplate++;
}
}
else
{
Noimg++;
}
listBox1.Items.Add((json.lost2 ? "" : json.index + ". ") + (json.tickoff ? (json.content&&json.failed?json.message2:"資料異常"):json.message1 ));
......@@ -300,6 +316,19 @@ namespace ETC_App1
}
}
public void Listbox1_Focus()
{
for (int i = 0; i < listBox1.Items.Count; i++)
{
if (Data[i].tickoff && Data[i].content && Data[i].failed)
{
listBox1.SelectedIndex = i;
break;
}
};
}
public void SaveLogs(string save_path)
{
string file_path = save_path + "/log.txt";
......@@ -340,12 +369,13 @@ namespace ETC_App1
}
sw.WriteLine(msg);
}
sw.WriteLine("完全正確:"+success+" 車牌定位無結果"+noplate+" 找不到圖片:"+noimg+" 缺少比對資料:"+nodata);
sw.WriteLine("完全正確:"+success+" 車牌定位無結果:"+noplate+" 找不到圖片:"+noimg+" 缺少比對資料:"+nodata);
sw.Close();
fs.Close();
}
public void SaveExcel(string save_path)
{
......
......@@ -236,22 +236,28 @@ namespace ETC_App1
}
else
{
etcPictureCheckBox1.ToolStripStatusLabel4 = e.UserState as string;
//etcPictureCheckBox1.ToolStripStatusLabel4 = e.UserState as string;
}
etcPictureCheckBox1.ToolStripProgressBar = e.ProgressPercentage;
etcPictureCheckBox1.ToolStripStatusLabel1 = "完成正確:" + etcPictureCheckBox1.Success;
etcPictureCheckBox1.ToolStripStatusLabel2 = "資料異常:" + etcPictureCheckBox1.Failed;
etcPictureCheckBox1.ToolStripStatusLabel2 = "車牌定位無結果:" + etcPictureCheckBox1.Noplate;
etcPictureCheckBox1.ToolStripStatusLabel3 = "影像遺失:" + etcPictureCheckBox1.Lost;
etcPictureCheckBox1.ToolStripStatusLabel3 = "影像遺失:" + etcPictureCheckBox1.Noimg;
etcPictureCheckBox1.ToolStripStatusLabel4 = "缺少比對結果:" + etcPictureCheckBox1.Nodata;
//etcPictureCheckBox1.ToolStripStatusLabel1 = string.Format("完全正確:{0}, 車牌定位無結果")
toolStripButton1.Enabled = toolStripButton3.Enabled = false;
toolStripButton4.Enabled = toolStripButton6.Enabled = false;
toolStripButton5.Enabled = true;
}
private void EtcBackgroundWorker31_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
......@@ -263,6 +269,8 @@ namespace ETC_App1
toolStripButton5.Enabled = false;
index = Convert.ToInt32(e.Result);
etcPictureCheckBox1.Listbox1_Focus();
}
private void ToolStripButton5_Click(object sender, EventArgs e)
......@@ -284,6 +292,8 @@ namespace ETC_App1
worker.DoWork += Worker_DoWork_fail;
etcPictureCheckBox1.SaveLogs(toolStripTextBox4.Text);
MessageBox.Show("輸出成功");
}
private void Worker_DoWork(object sender, DoWorkEventArgs e)
......
8b1b907e8c3800c92d408435201aae3d729c7e1f
de48493c4e47c17f1d3fb9ea7de587584520d94e
8b1b907e8c3800c92d408435201aae3d729c7e1f
de48493c4e47c17f1d3fb9ea7de587584520d94e
2798c0e920920a35790b9f4e3bdad69ee3c81135
26237647b74ccd9c962a1be50bd84e9a9d74becf
File added
File added
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment