V1.0 优化二次判定查看,修复容错bug

This commit is contained in:
CPL 2024-04-12 08:48:03 +08:00
parent 2dc7184746
commit 4caaba9a9c
16 changed files with 224 additions and 180 deletions

View File

@ -43,6 +43,7 @@
this.textBox1.Size = new System.Drawing.Size(1049, 527);
this.textBox1.TabIndex = 0;
this.textBox1.Text = resources.GetString("textBox1.Text");
this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
//
// FrmVerList
//

View File

@ -22,5 +22,10 @@ namespace LeatherApp
{
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
}
}

View File

@ -118,7 +118,9 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="textBox1.Text" xml:space="preserve">
<value>v1.0.2.4 (2024-03-1503-19)
<value>v1.0.2.5(2024-04-08)
1、更新显示单位cm=》mm
v1.0.2.4 (2024-03-1503-19)
1、更新车用革情况接头处过滤横档缺陷
2、更新无瑕疵时报错问题
v1.0.2.3 (2024-02-8)

View File

@ -86,8 +86,6 @@
this.uiLabel8 = new Sunny.UI.UILabel();
this.uiLabel7 = new Sunny.UI.UILabel();
this.uiLabel6 = new Sunny.UI.UILabel();
this.picDefectImage = new LeatherApp.UIExtend.UCImageView();
this.ucColorListDefect = new LeatherApp.UIExtend.UCColorList();
this.colUid = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colIndex = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -99,6 +97,8 @@
this.colArea = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colZXD = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colTarget = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.picDefectImage = new LeatherApp.UIExtend.UCImageView();
this.ucColorListDefect = new LeatherApp.UIExtend.UCColorList();
this.uiPanel1.SuspendLayout();
this.uiTitlePanel1.SuspendLayout();
this.uiPanel2.SuspendLayout();
@ -1209,38 +1209,6 @@
this.uiLabel6.Text = "光源";
this.uiLabel6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// picDefectImage
//
this.picDefectImage.Dock = System.Windows.Forms.DockStyle.Fill;
this.picDefectImage.Location = new System.Drawing.Point(0, 0);
this.picDefectImage.Margin = new System.Windows.Forms.Padding(0);
this.picDefectImage.Name = "picDefectImage";
this.picDefectImage.Size = new System.Drawing.Size(350, 226);
this.picDefectImage.TabIndex = 1;
//
// ucColorListDefect
//
this.ucColorListDefect.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ucColorListDefect.ColorChanged = null;
this.ucColorListDefect.FillColor = System.Drawing.Color.White;
this.ucColorListDefect.FillColor2 = System.Drawing.Color.White;
this.ucColorListDefect.FillDisableColor = System.Drawing.Color.White;
this.ucColorListDefect.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ucColorListDefect.Location = new System.Drawing.Point(1, 38);
this.ucColorListDefect.MinimumSize = new System.Drawing.Size(1, 1);
this.ucColorListDefect.Name = "ucColorListDefect";
this.ucColorListDefect.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.ucColorListDefect.RectColor = System.Drawing.Color.White;
this.ucColorListDefect.RectDisableColor = System.Drawing.Color.White;
this.ucColorListDefect.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom;
this.ucColorListDefect.Size = new System.Drawing.Size(121, 42);
this.ucColorListDefect.Style = Sunny.UI.UIStyle.Custom;
this.ucColorListDefect.StyleCustomMode = true;
this.ucColorListDefect.TabIndex = 1;
this.ucColorListDefect.Text = "ucColorList1";
this.ucColorListDefect.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
//
// colUid
//
this.colUid.HeaderText = "uid";
@ -1285,7 +1253,7 @@
this.colX.MinimumWidth = 8;
this.colX.Name = "colX";
this.colX.ReadOnly = true;
this.colX.Width = 80;
this.colX.Width = 75;
//
// colY
//
@ -1297,32 +1265,32 @@
this.colY.MinimumWidth = 8;
this.colY.Name = "colY";
this.colY.ReadOnly = true;
this.colY.Width = 80;
this.colY.Width = 75;
//
// colW
//
this.colW.HeaderText = "宽(cm)";
this.colW.HeaderText = "宽(mm)";
this.colW.MinimumWidth = 8;
this.colW.Name = "colW";
this.colW.Width = 70;
this.colW.Width = 75;
//
// colH
//
this.colH.HeaderText = "高(cm)";
this.colH.HeaderText = "高(mm)";
this.colH.MinimumWidth = 8;
this.colH.Name = "colH";
this.colH.Width = 70;
this.colH.Width = 75;
//
// colArea
//
dataGridViewCellStyle5.Format = "N2";
dataGridViewCellStyle5.NullValue = null;
this.colArea.DefaultCellStyle = dataGridViewCellStyle5;
this.colArea.HeaderText = "面积(cm)";
this.colArea.HeaderText = "面积(mm²)";
this.colArea.MinimumWidth = 8;
this.colArea.Name = "colArea";
this.colArea.ReadOnly = true;
this.colArea.Width = 80;
this.colArea.Width = 95;
//
// colZXD
//
@ -1342,6 +1310,38 @@
this.colTarget.ReadOnly = true;
this.colTarget.Width = 67;
//
// picDefectImage
//
this.picDefectImage.Dock = System.Windows.Forms.DockStyle.Fill;
this.picDefectImage.Location = new System.Drawing.Point(0, 0);
this.picDefectImage.Margin = new System.Windows.Forms.Padding(0);
this.picDefectImage.Name = "picDefectImage";
this.picDefectImage.Size = new System.Drawing.Size(350, 226);
this.picDefectImage.TabIndex = 1;
//
// ucColorListDefect
//
this.ucColorListDefect.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ucColorListDefect.ColorChanged = null;
this.ucColorListDefect.FillColor = System.Drawing.Color.White;
this.ucColorListDefect.FillColor2 = System.Drawing.Color.White;
this.ucColorListDefect.FillDisableColor = System.Drawing.Color.White;
this.ucColorListDefect.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ucColorListDefect.Location = new System.Drawing.Point(1, 38);
this.ucColorListDefect.MinimumSize = new System.Drawing.Size(1, 1);
this.ucColorListDefect.Name = "ucColorListDefect";
this.ucColorListDefect.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.ucColorListDefect.RectColor = System.Drawing.Color.White;
this.ucColorListDefect.RectDisableColor = System.Drawing.Color.White;
this.ucColorListDefect.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom;
this.ucColorListDefect.Size = new System.Drawing.Size(121, 42);
this.ucColorListDefect.Style = Sunny.UI.UIStyle.Custom;
this.ucColorListDefect.StyleCustomMode = true;
this.ucColorListDefect.TabIndex = 1;
this.ucColorListDefect.Text = "ucColorList1";
this.ucColorListDefect.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
//
// FHome
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;

View File

@ -1386,7 +1386,7 @@ namespace LeatherApp.Page
res.lstDefectBmp[i].Dispose();
dataRowlist.Add(new object[]{ defectInfo.uid,defectInfo.Code, defectInfo.PhotoIndex,defectInfo.Name,
defectInfo.CentreX, defectInfo.CentreY / 100,defectInfo.Width,defectInfo.Height, defectInfo.Area, defectInfo.ZXD, defectInfo.Contrast});
defectInfo.CentreX, defectInfo.CentreY / 100,defectInfo.Width * 10,defectInfo.Height * 10, defectInfo.Area * 100, defectInfo.ZXD, defectInfo.Contrast});
//更新UI
//this.Invoke(new System.Action(() =>
//{
@ -1849,6 +1849,15 @@ namespace LeatherApp.Page
private void button1_Click(object sender, EventArgs e)
{
List<DefectInfo> lstEditDefect = new List<DefectInfo>();
DefectInfo dt = new DefectInfo();
dt.Name = "123";
dt.Code = "jb";
dt.image = Image.FromFile("C:\\Users\\fang\\Desktop\\123.png");
lstEditDefect.Add(dt);
FHome_Defect frmDefect = new FHome_Defect(lstEditDefect);
frmDefect.ShowDialog();
return;
Config.LoadAllConfig();
DefectLib dl = new DefectLib();
dl.start();

View File

@ -33,16 +33,19 @@
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.uiTitlePanel2 = new Sunny.UI.UITitlePanel();
this.tcbarTensionValue = new Sunny.UI.UITrackBar();
this.tcbarGain = new Sunny.UI.UITrackBar();
this.tcbarExposureTime = new Sunny.UI.UITrackBar();
this.tcbarLightValue = new Sunny.UI.UITrackBar();
this.uiLabel9 = new Sunny.UI.UILabel();
this.lblTensionValue = new Sunny.UI.UILabel();
this.lblGain = new Sunny.UI.UILabel();
this.uiLabel4 = new Sunny.UI.UILabel();
this.lblExposureTime = new Sunny.UI.UILabel();
@ -62,12 +65,6 @@
this.uiLabel7 = new Sunny.UI.UILabel();
this.uiTitlePanel5 = new Sunny.UI.UITitlePanel();
this.uiDataGridView1 = new Sunny.UI.UIDataGridView();
this.col_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.col_zxd = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.col_area = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.col_contrast_lower = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.col_contrast_top = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.col_IsOR = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.uiTitlePanel6 = new Sunny.UI.UITitlePanel();
this.uiDataGridView2 = new Sunny.UI.UIDataGridView();
this.col2_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -87,9 +84,12 @@
this.cmbColor = new Sunny.UI.UIComboBox();
this.uiLabel3 = new Sunny.UI.UILabel();
this.uiLabel2 = new Sunny.UI.UILabel();
this.uiLabel9 = new Sunny.UI.UILabel();
this.tcbarTensionValue = new Sunny.UI.UITrackBar();
this.lblTensionValue = new Sunny.UI.UILabel();
this.col_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.col_zxd = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.col_area = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.col_contrast_lower = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.col_contrast_top = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.col_IsOR = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.uiTitlePanel2.SuspendLayout();
this.uiTitlePanel3.SuspendLayout();
this.uiTitlePanel4.SuspendLayout();
@ -134,6 +134,22 @@
this.uiTitlePanel2.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.uiTitlePanel2.TitleColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
//
// tcbarTensionValue
//
this.tcbarTensionValue.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tcbarTensionValue.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tcbarTensionValue.Location = new System.Drawing.Point(14, 292);
this.tcbarTensionValue.Maximum = 999;
this.tcbarTensionValue.MinimumSize = new System.Drawing.Size(1, 1);
this.tcbarTensionValue.Name = "tcbarTensionValue";
this.tcbarTensionValue.Size = new System.Drawing.Size(312, 29);
this.tcbarTensionValue.Style = Sunny.UI.UIStyle.Custom;
this.tcbarTensionValue.TabIndex = 6;
this.tcbarTensionValue.Text = "uiTrackBar1";
this.tcbarTensionValue.Value = 1;
this.tcbarTensionValue.ValueChanged += new System.EventHandler(this.tcbarTensionValue_ValueChanged);
//
// tcbarGain
//
this.tcbarGain.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
@ -183,6 +199,34 @@
this.tcbarLightValue.Value = 1;
this.tcbarLightValue.ValueChanged += new System.EventHandler(this.tcbarLightValue_ValueChanged);
//
// uiLabel9
//
this.uiLabel9.AutoSize = true;
this.uiLabel9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiLabel9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
this.uiLabel9.Location = new System.Drawing.Point(8, 256);
this.uiLabel9.Name = "uiLabel9";
this.uiLabel9.Size = new System.Drawing.Size(42, 21);
this.uiLabel9.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel9.TabIndex = 0;
this.uiLabel9.Text = "张力";
this.uiLabel9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// lblTensionValue
//
this.lblTensionValue.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.lblTensionValue.AutoSize = true;
this.lblTensionValue.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblTensionValue.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
this.lblTensionValue.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblTensionValue.Location = new System.Drawing.Point(133, 263);
this.lblTensionValue.Name = "lblTensionValue";
this.lblTensionValue.Size = new System.Drawing.Size(55, 17);
this.lblTensionValue.Style = Sunny.UI.UIStyle.Custom;
this.lblTensionValue.TabIndex = 0;
this.lblTensionValue.Text = "255/255";
this.lblTensionValue.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// lblGain
//
this.lblGain.Anchor = System.Windows.Forms.AnchorStyles.Top;
@ -192,7 +236,7 @@
this.lblGain.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblGain.Location = new System.Drawing.Point(133, 190);
this.lblGain.Name = "lblGain";
this.lblGain.Size = new System.Drawing.Size(84, 24);
this.lblGain.Size = new System.Drawing.Size(55, 17);
this.lblGain.Style = Sunny.UI.UIStyle.Custom;
this.lblGain.TabIndex = 0;
this.lblGain.Text = "255/255";
@ -205,7 +249,7 @@
this.uiLabel4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
this.uiLabel4.Location = new System.Drawing.Point(8, 185);
this.uiLabel4.Name = "uiLabel4";
this.uiLabel4.Size = new System.Drawing.Size(62, 31);
this.uiLabel4.Size = new System.Drawing.Size(42, 21);
this.uiLabel4.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel4.TabIndex = 0;
this.uiLabel4.Text = "增益";
@ -220,7 +264,7 @@
this.lblExposureTime.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblExposureTime.Location = new System.Drawing.Point(133, 120);
this.lblExposureTime.Name = "lblExposureTime";
this.lblExposureTime.Size = new System.Drawing.Size(84, 24);
this.lblExposureTime.Size = new System.Drawing.Size(55, 17);
this.lblExposureTime.Style = Sunny.UI.UIStyle.Custom;
this.lblExposureTime.TabIndex = 0;
this.lblExposureTime.Text = "255/255";
@ -233,7 +277,7 @@
this.uiLabel5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
this.uiLabel5.Location = new System.Drawing.Point(8, 114);
this.uiLabel5.Name = "uiLabel5";
this.uiLabel5.Size = new System.Drawing.Size(110, 31);
this.uiLabel5.Size = new System.Drawing.Size(74, 21);
this.uiLabel5.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel5.TabIndex = 0;
this.uiLabel5.Text = "曝光时长";
@ -248,7 +292,7 @@
this.lblLightValue.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblLightValue.Location = new System.Drawing.Point(133, 49);
this.lblLightValue.Name = "lblLightValue";
this.lblLightValue.Size = new System.Drawing.Size(84, 24);
this.lblLightValue.Size = new System.Drawing.Size(55, 17);
this.lblLightValue.Style = Sunny.UI.UIStyle.Custom;
this.lblLightValue.TabIndex = 0;
this.lblLightValue.Text = "255/255";
@ -261,7 +305,7 @@
this.uiLabel6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
this.uiLabel6.Location = new System.Drawing.Point(8, 44);
this.uiLabel6.Name = "uiLabel6";
this.uiLabel6.Size = new System.Drawing.Size(110, 31);
this.uiLabel6.Size = new System.Drawing.Size(74, 21);
this.uiLabel6.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel6.TabIndex = 0;
this.uiLabel6.Text = "光源亮度";
@ -314,7 +358,7 @@
this.uiLabel1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
this.uiLabel1.Location = new System.Drawing.Point(5, 44);
this.uiLabel1.Name = "uiLabel1";
this.uiLabel1.Size = new System.Drawing.Size(110, 31);
this.uiLabel1.Size = new System.Drawing.Size(74, 21);
this.uiLabel1.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel1.TabIndex = 0;
this.uiLabel1.Text = "算法模型";
@ -396,7 +440,7 @@
this.uiLabel10.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
this.uiLabel10.Location = new System.Drawing.Point(3, 184);
this.uiLabel10.Name = "uiLabel10";
this.uiLabel10.Size = new System.Drawing.Size(158, 31);
this.uiLabel10.Size = new System.Drawing.Size(106, 21);
this.uiLabel10.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel10.TabIndex = 0;
this.uiLabel10.Text = "瑕疵二次判断";
@ -409,7 +453,7 @@
this.uiLabel8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
this.uiLabel8.Location = new System.Drawing.Point(3, 114);
this.uiLabel8.Name = "uiLabel8";
this.uiLabel8.Size = new System.Drawing.Size(206, 31);
this.uiLabel8.Size = new System.Drawing.Size(138, 21);
this.uiLabel8.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel8.TabIndex = 0;
this.uiLabel8.Text = "每百米瑕疵数上限";
@ -438,7 +482,7 @@
this.uiLabel7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
this.uiLabel7.Location = new System.Drawing.Point(3, 44);
this.uiLabel7.Name = "uiLabel7";
this.uiLabel7.Size = new System.Drawing.Size(202, 31);
this.uiLabel7.Size = new System.Drawing.Size(135, 21);
this.uiLabel7.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel7.TabIndex = 0;
this.uiLabel7.Text = "瑕疵面积(mm^2)";
@ -527,56 +571,6 @@
this.uiDataGridView1.Style = Sunny.UI.UIStyle.Custom;
this.uiDataGridView1.TabIndex = 21;
//
// col_code
//
this.col_code.DataPropertyName = "Code";
this.col_code.HeaderText = "code";
this.col_code.MinimumWidth = 8;
this.col_code.Name = "col_code";
this.col_code.ReadOnly = true;
this.col_code.Visible = false;
this.col_code.Width = 150;
//
// col_zxd
//
this.col_zxd.DataPropertyName = "ZXD";
dataGridViewCellStyle3.NullValue = null;
this.col_zxd.DefaultCellStyle = dataGridViewCellStyle3;
this.col_zxd.HeaderText = "置信度";
this.col_zxd.MinimumWidth = 20;
this.col_zxd.Name = "col_zxd";
this.col_zxd.Width = 150;
//
// col_area
//
this.col_area.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.col_area.DataPropertyName = "Area";
this.col_area.HeaderText = "面积(cm^2)";
this.col_area.MinimumWidth = 20;
this.col_area.Name = "col_area";
//
// col_contrast_lower
//
this.col_contrast_lower.DataPropertyName = "Contrast";
this.col_contrast_lower.HeaderText = "对比度(下限)";
this.col_contrast_lower.MinimumWidth = 80;
this.col_contrast_lower.Name = "col_contrast_lower";
this.col_contrast_lower.Width = 120;
//
// col_contrast_top
//
this.col_contrast_top.HeaderText = "对比度(上限)";
this.col_contrast_top.MinimumWidth = 80;
this.col_contrast_top.Name = "col_contrast_top";
this.col_contrast_top.Width = 120;
//
// col_IsOR
//
this.col_IsOR.HeaderText = "或向选择";
this.col_IsOR.MinimumWidth = 8;
this.col_IsOR.Name = "col_IsOR";
this.col_IsOR.Width = 150;
//
// uiTitlePanel6
//
this.uiTitlePanel6.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@ -884,7 +878,7 @@
this.uiLabel3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
this.uiLabel3.Location = new System.Drawing.Point(3, 49);
this.uiLabel3.Name = "uiLabel3";
this.uiLabel3.Size = new System.Drawing.Size(110, 31);
this.uiLabel3.Size = new System.Drawing.Size(74, 21);
this.uiLabel3.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel3.TabIndex = 0;
this.uiLabel3.Text = "产品材质";
@ -897,55 +891,61 @@
this.uiLabel2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
this.uiLabel2.Location = new System.Drawing.Point(3, 122);
this.uiLabel2.Name = "uiLabel2";
this.uiLabel2.Size = new System.Drawing.Size(110, 31);
this.uiLabel2.Size = new System.Drawing.Size(74, 21);
this.uiLabel2.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel2.TabIndex = 0;
this.uiLabel2.Text = "产品颜色";
this.uiLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// uiLabel9
// col_code
//
this.uiLabel9.AutoSize = true;
this.uiLabel9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiLabel9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
this.uiLabel9.Location = new System.Drawing.Point(8, 256);
this.uiLabel9.Name = "uiLabel9";
this.uiLabel9.Size = new System.Drawing.Size(62, 31);
this.uiLabel9.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel9.TabIndex = 0;
this.uiLabel9.Text = "张力";
this.uiLabel9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.col_code.DataPropertyName = "Code";
this.col_code.HeaderText = "code";
this.col_code.MinimumWidth = 8;
this.col_code.Name = "col_code";
this.col_code.ReadOnly = true;
this.col_code.Visible = false;
this.col_code.Width = 150;
//
// tcbarTensionValue
// col_zxd
//
this.tcbarTensionValue.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tcbarTensionValue.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tcbarTensionValue.Location = new System.Drawing.Point(14, 292);
this.tcbarTensionValue.Maximum = 999;
this.tcbarTensionValue.MinimumSize = new System.Drawing.Size(1, 1);
this.tcbarTensionValue.Name = "tcbarTensionValue";
this.tcbarTensionValue.Size = new System.Drawing.Size(312, 29);
this.tcbarTensionValue.Style = Sunny.UI.UIStyle.Custom;
this.tcbarTensionValue.TabIndex = 6;
this.tcbarTensionValue.Text = "uiTrackBar1";
this.tcbarTensionValue.Value = 1;
this.tcbarTensionValue.ValueChanged += new System.EventHandler(this.tcbarTensionValue_ValueChanged);
this.col_zxd.DataPropertyName = "ZXD";
dataGridViewCellStyle3.NullValue = null;
this.col_zxd.DefaultCellStyle = dataGridViewCellStyle3;
this.col_zxd.HeaderText = "置信度";
this.col_zxd.MinimumWidth = 20;
this.col_zxd.Name = "col_zxd";
this.col_zxd.Width = 150;
//
// lblTensionValue
// col_area
//
this.lblTensionValue.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.lblTensionValue.AutoSize = true;
this.lblTensionValue.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblTensionValue.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
this.lblTensionValue.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblTensionValue.Location = new System.Drawing.Point(133, 263);
this.lblTensionValue.Name = "lblTensionValue";
this.lblTensionValue.Size = new System.Drawing.Size(84, 24);
this.lblTensionValue.Style = Sunny.UI.UIStyle.Custom;
this.lblTensionValue.TabIndex = 0;
this.lblTensionValue.Text = "255/255";
this.lblTensionValue.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.col_area.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.col_area.DataPropertyName = "Area";
this.col_area.HeaderText = "面积(mm^2)";
this.col_area.MinimumWidth = 20;
this.col_area.Name = "col_area";
//
// col_contrast_lower
//
this.col_contrast_lower.DataPropertyName = "Contrast";
this.col_contrast_lower.HeaderText = "对比度(下限)";
this.col_contrast_lower.MinimumWidth = 80;
this.col_contrast_lower.Name = "col_contrast_lower";
this.col_contrast_lower.Width = 120;
//
// col_contrast_top
//
this.col_contrast_top.HeaderText = "对比度(上限)";
this.col_contrast_top.MinimumWidth = 80;
this.col_contrast_top.Name = "col_contrast_top";
this.col_contrast_top.Width = 120;
//
// col_IsOR
//
this.col_IsOR.HeaderText = "或向选择";
this.col_IsOR.MinimumWidth = 8;
this.col_IsOR.Name = "col_IsOR";
this.col_IsOR.Width = 150;
//
// FProductInfo
//
@ -1014,12 +1014,6 @@
private System.Windows.Forms.DataGridViewTextBoxColumn col2_3;
private System.Windows.Forms.DataGridViewTextBoxColumn col2_4;
private System.Windows.Forms.DataGridViewTextBoxColumn col2_5;
private System.Windows.Forms.DataGridViewTextBoxColumn col_code;
private System.Windows.Forms.DataGridViewTextBoxColumn col_zxd;
private System.Windows.Forms.DataGridViewTextBoxColumn col_area;
private System.Windows.Forms.DataGridViewTextBoxColumn col_contrast_lower;
private System.Windows.Forms.DataGridViewTextBoxColumn col_contrast_top;
private System.Windows.Forms.DataGridViewCheckBoxColumn col_IsOR;
private Sunny.UI.UITitlePanel uiTitlePanel1;
private Sunny.UI.UIComboBox cmbColor;
private Sunny.UI.UILabel uiLabel3;
@ -1033,5 +1027,11 @@
private Sunny.UI.UITrackBar tcbarTensionValue;
private Sunny.UI.UILabel uiLabel9;
private Sunny.UI.UILabel lblTensionValue;
private System.Windows.Forms.DataGridViewTextBoxColumn col_code;
private System.Windows.Forms.DataGridViewTextBoxColumn col_zxd;
private System.Windows.Forms.DataGridViewTextBoxColumn col_area;
private System.Windows.Forms.DataGridViewTextBoxColumn col_contrast_lower;
private System.Windows.Forms.DataGridViewTextBoxColumn col_contrast_top;
private System.Windows.Forms.DataGridViewCheckBoxColumn col_IsOR;
}
}

View File

@ -150,7 +150,7 @@ namespace LeatherApp.Page
if (item1 != null)
{
uiDataGridView1.Rows[i].Cells["col_zxd"].Value=item1.ZXD;
uiDataGridView1.Rows[i].Cells["col_area"].Value = item1.Area;
uiDataGridView1.Rows[i].Cells["col_area"].Value = item1.Area * 100;
uiDataGridView1.Rows[i].Cells["col_contrast_top"].Value = item1.ContrastTop;
uiDataGridView1.Rows[i].Cells["col_contrast_lower"].Value = item1.ContrastLower;
uiDataGridView1.Rows[i].Cells["col_IsOR"].Value = item1.IsOR;
@ -288,7 +288,7 @@ namespace LeatherApp.Page
{
Code = uiDataGridView1.Rows[i].Cells["col_code"].Value.ToString(),
ZXD = Utils.Util.IsDecimal(uiDataGridView1.Rows[i].Cells["col_zxd"].Value) ? Convert.ToDouble(uiDataGridView1.Rows[i].Cells["col_zxd"].Value) : 0,
Area = Utils.Util.IsDecimal(uiDataGridView1.Rows[i].Cells["col_area"].Value) ? Convert.ToDouble(uiDataGridView1.Rows[i].Cells["col_area"].Value) : 0,
Area = Utils.Util.IsDecimal(uiDataGridView1.Rows[i].Cells["col_area"].Value) ? Convert.ToDouble(uiDataGridView1.Rows[i].Cells["col_area"].Value) / 100 : 0,
ContrastLower = Utils.Util.IsDecimal(uiDataGridView1.Rows[i].Cells["col_contrast_lower"].Value) ? Convert.ToDouble(uiDataGridView1.Rows[i].Cells["col_contrast_lower"].Value) : 0,
ContrastTop = Utils.Util.IsDecimal(uiDataGridView1.Rows[i].Cells["col_contrast_top"].Value) ? Convert.ToDouble(uiDataGridView1.Rows[i].Cells["col_contrast_top"].Value) : 0,
IsOR = Convert.ToBoolean(uiDataGridView1.Rows[i].Cells["col_IsOR"].Value),

View File

@ -176,7 +176,7 @@ namespace LeatherApp.Page
};
data.DefectTotal = record.DefectInfoList.GroupBy(x => x.Name).Select(g => new JDefectTotal { Name = g.Key,Count=g.Count() }).ToList();
data.DefectDetail = record.DefectInfoList.Select(x => new JDefectDetail {
Index=x.PhotoIndex,Name=x.Name, X=x.X,Y=Math.Round(x.Y/100.0d,2),Width=x.Width,Height=x.Height,ZXD=x.ZXD,Area=x.Area,Contrast=x.Contrast })
Index=x.PhotoIndex,Name=x.Name, X=x.X,Y=Math.Round(x.Y/100.0d,2),Width=x.Width * 10,Height=x.Height * 10,ZXD=x.ZXD,Area=x.Area * 100,Contrast=x.Contrast })
.OrderBy(x=>x.Index).ThenBy(x=>x.Y).ToList();
var image1 = captureControl(this.lineChartDefect);
var image2=captureControl(this.lineChartFaceWidth);
@ -512,7 +512,7 @@ namespace LeatherApp.Page
//rowIndex++;
if (ProductDefects.DefectDetail != null && ProductDefects.DefectDetail.Count > 0)
{
List<string> lstRow5str = new List<string>() { "源图", "名称", "X(cm)", "Y(米)", "宽(cm)", "高(cm)", "置信度", "面积cm^2)", "对比度" };
List<string> lstRow5str = new List<string>() { "源图", "名称", "X(cm)", "Y(米)", "宽(mm)", "高(mm)", "置信度", "面积mm^2)", "对比度" };
for (int i = 0; i < lstRow5str.Count; i++)
{

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2.4")]
[assembly: AssemblyFileVersion("1.0.2.4")]
[assembly: AssemblyVersion("1.0.2.5")]
[assembly: AssemblyFileVersion("1.0.2.5")]

View File

@ -74,10 +74,15 @@ namespace LeatherApp.UIExtend
pictureBox1.Image = img;//del
pictureBox1.Refresh();
//ActiveControl = pictureBox1; // 设置焦点
pictureBox1.Width = this.Width;
pictureBox1.Height = this.Height;
}
private void UCImageView_Load(object sender, EventArgs e)
{
pictureBox1.Width = this.Width;
pictureBox1.Height = this.Height;
}
private void checkBorderLine()

View File

@ -41,12 +41,11 @@
this.uiComboBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiComboBox1.ItemHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(200)))), ((int)(((byte)(255)))));
this.uiComboBox1.ItemSelectForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.uiComboBox1.Location = new System.Drawing.Point(4, 359);
this.uiComboBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiComboBox1.MinimumSize = new System.Drawing.Size(63, 0);
this.uiComboBox1.Location = new System.Drawing.Point(3, 239);
this.uiComboBox1.MinimumSize = new System.Drawing.Size(42, 0);
this.uiComboBox1.Name = "uiComboBox1";
this.uiComboBox1.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
this.uiComboBox1.Size = new System.Drawing.Size(104, 29);
this.uiComboBox1.Size = new System.Drawing.Size(69, 19);
this.uiComboBox1.TabIndex = 0;
this.uiComboBox1.Text = "uiComboBox1";
this.uiComboBox1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
@ -58,10 +57,11 @@
this.uiCheckBox1.Cursor = System.Windows.Forms.Cursors.Hand;
this.uiCheckBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiCheckBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
this.uiCheckBox1.Location = new System.Drawing.Point(125, 361);
this.uiCheckBox1.Location = new System.Drawing.Point(83, 241);
this.uiCheckBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.uiCheckBox1.MinimumSize = new System.Drawing.Size(1, 1);
this.uiCheckBox1.Name = "uiCheckBox1";
this.uiCheckBox1.Size = new System.Drawing.Size(94, 29);
this.uiCheckBox1.Size = new System.Drawing.Size(63, 19);
this.uiCheckBox1.TabIndex = 1;
this.uiCheckBox1.Text = "忽略";
//
@ -71,32 +71,38 @@
this.lblLocation.AutoSize = true;
this.lblLocation.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblLocation.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
this.lblLocation.Location = new System.Drawing.Point(206, 359);
this.lblLocation.Location = new System.Drawing.Point(137, 239);
this.lblLocation.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblLocation.Name = "lblLocation";
this.lblLocation.Size = new System.Drawing.Size(109, 31);
this.lblLocation.Size = new System.Drawing.Size(73, 21);
this.lblLocation.TabIndex = 3;
this.lblLocation.Text = "uiLabel1";
this.lblLocation.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// ucImageView1
//
this.ucImageView1.Location = new System.Drawing.Point(2, 2);
this.ucImageView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ucImageView1.Location = new System.Drawing.Point(1, 1);
this.ucImageView1.Margin = new System.Windows.Forms.Padding(1, 1, 1, 1);
this.ucImageView1.Name = "ucImageView1";
this.ucImageView1.Size = new System.Drawing.Size(367, 350);
this.ucImageView1.Size = new System.Drawing.Size(245, 233);
this.ucImageView1.TabIndex = 2;
this.ucImageView1.Load += new System.EventHandler(this.ucImageView1_Load);
//
// UIDefectImage
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.Controls.Add(this.lblLocation);
this.Controls.Add(this.uiComboBox1);
this.Controls.Add(this.uiCheckBox1);
this.Controls.Add(this.ucImageView1);
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.Name = "UIDefectImage";
this.Size = new System.Drawing.Size(372, 392);
this.Size = new System.Drawing.Size(248, 261);
this.ResumeLayout(false);
this.PerformLayout();

View File

@ -52,7 +52,7 @@ namespace LeatherApp.UIExtend
[Description("瑕疵图"), Category("自定义")]
public Image Image
{
set { this.ucImageView1.loadImage(value); }
set { this.ucImageView1.loadImage(value);}
}
private void uiComboBox1_SelectedIndexChanged(object sender, EventArgs e)

View File

@ -0,0 +1,16 @@
2024-04-08 15:20:33
Global捕获到未处理异常System.FormatException
异常信息:输入字符串的格式不正确。
异常堆栈: 在 System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
在 System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
在 LeatherApp.Page.FProductInfo.loadProduct(String pcode, Boolean resetAll) 位置 E:\CPL\迈沐智能项目\2023\革博士\源码\V1.0\LeatherProject\LeatherApp\Page\FProductInfo.cs:行号 119
在 LeatherApp.Page.FProductInfo.cmbMaterial_SelectedIndexChanged(Object sender, EventArgs e) 位置 E:\CPL\迈沐智能项目\2023\革博士\源码\V1.0\LeatherProject\LeatherApp\Page\FProductInfo.cs:行号 376
在 Sunny.UI.UIComboBox.Box_SelectedIndexChanged(Object sender, EventArgs e)
在 System.EventHandler.Invoke(Object sender, EventArgs e)
在 System.Windows.Forms.ListBox.OnSelectedIndexChanged(EventArgs e)
在 Sunny.UI.ListBoxEx.OnSelectedIndexChanged(EventArgs e)
在 System.Windows.Forms.ListBox.WmReflectCommand(Message& m)
在 System.Windows.Forms.ListBox.WndProc(Message& m)
在 Sunny.UI.ListBoxEx.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)