v1.2.0.6 禾欣所有现场系列程序

This commit is contained in:
CPL 2024-11-08 09:10:43 +08:00
parent 0664c27f3e
commit 0e8c28e672
37 changed files with 2481 additions and 426 deletions

View File

@ -40,7 +40,7 @@ namespace LeatherApp
public static string ErpSql = "select top 1 a,b,c from tableA where code=@code order by id desc"; public static string ErpSql = "select top 1 a,b,c from tableA where code=@code order by id desc";
//使用oracle数据库 //使用oracle数据库
public static bool OracleDB = false; public static string ErpDBType = "sqlServer";
//远程服务器连接字段 //远程服务器连接字段
public static string ServerDBConStr = "server=localhost;Database=LeatherDB;Uid=root;Pwd=123456; AllowLoadLocalInfile=true"; public static string ServerDBConStr = "server=localhost;Database=LeatherDB;Uid=root;Pwd=123456; AllowLoadLocalInfile=true";
//LOG //LOG
@ -51,6 +51,7 @@ namespace LeatherApp
public static bool StopIO = false; public static bool StopIO = false;
public static bool StopPLC=true; public static bool StopPLC=true;
public static bool StopLight = true; public static bool StopLight = true;
public static bool StopCeHou = true;
public static string PlcIPAdrees; public static string PlcIPAdrees;
public static short PlcRackN=0, PlcSolt=1; public static short PlcRackN=0, PlcSolt=1;
@ -62,6 +63,11 @@ namespace LeatherApp
public static string Light_PortName;//COM端口号 public static string Light_PortName;//COM端口号
public static LightDevNameEnum Light_Name = LightDevNameEnum.; public static LightDevNameEnum Light_Name = LightDevNameEnum.;
public static CamerDevNameEnum Camer_Name = CamerDevNameEnum.; public static CamerDevNameEnum Camer_Name = CamerDevNameEnum.;
public static string CeHouIP;
public static int CeHouPort;
public static int CeHouCnt;
public static double JinShuTanCeDis;
public static string CustomerName;
public static string JM_PortName;//COM端口号 public static string JM_PortName;//COM端口号
//LIB //LIB
@ -104,6 +110,8 @@ namespace LeatherApp
public static bool OpenBeep; public static bool OpenBeep;
public static int BeepTime; public static int BeepTime;
//开启检出就报警
public static bool OpenWarnBeep;
//边补偿 //边补偿
public static int L_offset, R_offset; public static int L_offset, R_offset;
public static void LoadCloudConfig() public static void LoadCloudConfig()
@ -133,6 +141,10 @@ namespace LeatherApp
if (!Directory.Exists(lsCmdPath)) if (!Directory.Exists(lsCmdPath))
Directory.CreateDirectory(lsCmdPath); Directory.CreateDirectory(lsCmdPath);
string TempPicPath = appBasePath + "\\TempPic\\";
if (!Directory.Exists(TempPicPath))
Directory.CreateDirectory(TempPicPath);
string fileName; string fileName;
CMDProcess = new Dictionary<CMDName, JObject>(); CMDProcess = new Dictionary<CMDName, JObject>();
foreach (int item in Enum.GetValues(typeof(CMDName)))//item为key值 foreach (int item in Enum.GetValues(typeof(CMDName)))//item为key值
@ -150,7 +162,9 @@ namespace LeatherApp
//[DB] //[DB]
DBConStr = ini.ReadString("DB", "DBConStr", ""); DBConStr = ini.ReadString("DB", "DBConStr", "");
OracleDB = ini.ReadBool("DB", "OracleDB"); ErpDBType = ini.ReadString("DB", "ErpDBType", "SqlServer");
if (string.IsNullOrEmpty(ErpDBType))
ErpDBType = "SqlServer";
//[Erp] //[Erp]
ErpDBConStr = ini.ReadString("ErpDB", "ErpDBConStr", ""); ErpDBConStr = ini.ReadString("ErpDB", "ErpDBConStr", "");
ErpSql = ini.ReadString("ErpDB", "ErpSql", ""); ErpSql = ini.ReadString("ErpDB", "ErpSql", "");
@ -170,6 +184,7 @@ namespace LeatherApp
PlcSolt = ini.ReadShort("DEV", "PlcSolt", PlcSolt); PlcSolt = ini.ReadShort("DEV", "PlcSolt", PlcSolt);
StopLight = ini.ReadBool("DEV", "StopLight", false); StopLight = ini.ReadBool("DEV", "StopLight", false);
Carmer1ConfigFilePath = ini.ReadString("DEV", "Carmer1ConfigFilePath", ""); Carmer1ConfigFilePath = ini.ReadString("DEV", "Carmer1ConfigFilePath", "");
Carmer2ConfigFilePath = ini.ReadString("DEV", "Carmer2ConfigFilePath", ""); Carmer2ConfigFilePath = ini.ReadString("DEV", "Carmer2ConfigFilePath", "");
IOCard_DeviceNum = ini.ReadString("DEV", "IOCard_DeviceNum", ""); IOCard_DeviceNum = ini.ReadString("DEV", "IOCard_DeviceNum", "");
@ -181,6 +196,11 @@ namespace LeatherApp
JM_PortName = ini.ReadString("DEV", "JM_PortName", ""); JM_PortName = ini.ReadString("DEV", "JM_PortName", "");
StopCeHou = ini.ReadBool("DEV", "StopCeHou", true);
CeHouIP = ini.ReadString("DEV", "CeHouIP", "");
CeHouPort = ini.ReadInt("DEV", "CeHouPort");
CeHouCnt = ini.ReadInt("DEV", "CeHouCnt");
JinShuTanCeDis = ini.ReadDouble("DEV", "JinShuTanCeDis");
//[LIB] //[LIB]
model_path = ini.ReadString("LIB", "model_path", ""); model_path = ini.ReadString("LIB", "model_path", "");
//labels_path = ini.ReadString("LIB", "labels_path", ""); //labels_path = ini.ReadString("LIB", "labels_path", "");
@ -244,10 +264,13 @@ namespace LeatherApp
//蜂鸣 //蜂鸣
OpenBeep = ini.ReadBool("Beep", "OpenBeep"); OpenBeep = ini.ReadBool("Beep", "OpenBeep");
OpenWarnBeep = ini.ReadBool("Beep", "OpenWarnBeep");
BeepTime = ini.ReadInt("Beep", "BeepTime", 3000); BeepTime = ini.ReadInt("Beep", "BeepTime", 3000);
L_offset = ini.ReadInt("BOffset", "L_offset", 0); L_offset = ini.ReadInt("BOffset", "L_offset", 0);
R_offset = ini.ReadInt("BOffset", "R_offset", 0); R_offset = ini.ReadInt("BOffset", "R_offset", 0);
CustomerName = ini.ReadString("Customer", "CustomerName", "").Trim();
} }
#region defectItemList <=> DefectItemList.json #region defectItemList <=> DefectItemList.json

View File

@ -38,6 +38,8 @@ namespace LeatherApp
private PictureBox preView1, preView2; private PictureBox preView1, preView2;
private SerialPort lengthCounter; private SerialPort lengthCounter;
private DL_EN1Dev dL_EN1Dev;
public void start(PictureBox view1, PictureBox view2) public void start(PictureBox view1, PictureBox view2)
{ {
this.preView1 = view1; this.preView1 = view1;
@ -68,6 +70,10 @@ namespace LeatherApp
try { libDefect.stop(); } catch { } try { libDefect.stop(); } catch { }
try { libPhoto.stop(); } catch { } try { libPhoto.stop(); } catch { }
if (!Config.StopCeHou)
{
try { dL_EN1Dev.stopDev(); } catch { }
}
} }
catch { } catch { }
} }
@ -95,6 +101,13 @@ namespace LeatherApp
#if JM #if JM
lengthCounter = new SerialPort(Config.JM_PortName, 9600); lengthCounter = new SerialPort(Config.JM_PortName, 9600);
#endif #endif
//开启测厚
if (!Config.StopCeHou)
{
dL_EN1Dev = new DL_EN1Dev();
if(!dL_EN1Dev.startDev(Config.CeHouIP, Config.CeHouPort))
throw new Exception("位移传感器初始化失败!");
}
if (Config.Camer_Name == CamerDevNameEnum.) if (Config.Camer_Name == CamerDevNameEnum.)
{ {
devCamer2 = new CamerCardDev(); devCamer2 = new CamerCardDev();

View File

@ -0,0 +1,400 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Net;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using DocumentFormat.OpenXml.VariantTypes;
namespace LeatherApp.Device
{
public class DL_EN1Dev
{
TCPClient tCPClient;
public DL_EN1Dev()
{
}
public bool startDev(string localIp, int port)
{
tCPClient = new TCPClient(localIp, port);
return tCPClient.TcpClientStart();
}
public void stopDev()
{
tCPClient.CloseAll();
}
public bool GetValue(string index, out double val)
{
val = 0;
bool ret = true;
string recv;
ret = tCPClient.SendMessage($"SW,{index},171,+000000001\r\n");
if ( !ret )
{
return ret;
}
Thread.Sleep( 10 );
DateTime dateTime = DateTime.Now;
do
{
ret = tCPClient.SendMessage($"SW,{index},172\r\n");
if (!ret)
{
return ret;
}
Thread.Sleep(10);
ret = tCPClient.ReceiveMessage(out recv);
if (recv.IndexOf("1.") >= 0)
break;
if ((DateTime.Now - dateTime).TotalSeconds > 3)
return false;
} while (true);
ret = tCPClient.SendMessage($"SW,{index},173\r\n");
if (!ret)
{
return ret;
}
Thread.Sleep(10);
ret = tCPClient.ReceiveMessage(out recv);
if (!ret)
{
return ret;
}
if(string.IsNullOrEmpty(recv))
return ret;
ret = double.TryParse(recv, out val);
val = val / 100;
return ret;
}
}
//客户端类
public class TCPClient
{
//private TcpListener tcpListener = null;
private TcpClient tcpClient;
private IPAddress localIP;
private NetworkStream stream;
private int port;
//private int buffer_length = 0;
private bool isConnected;
Thread myThread = null;
CancellationTokenSource cts;
/// <summary>
/// 接收队列的上限
/// </summary>
public int comDDLength = 100;
/// <summary>
/// 客户端的连接状态
/// </summary>
public bool IsConnected
{
get { return this.isConnected; }
}
public TCPClient(string localIp, int port)
{
this.localIP = IPAddress.Parse(localIp);
this.port = port;
//this.buffer_length = Marshal.SizeOf(dataType);
}
public bool TcpClientStart()
{
try
{
tcpClient = new TcpClient();
tcpClient.Connect(this.localIP, this.port);
this.isConnected = true;
//ThreadStart myThreadDelegate = new ThreadStart(Listening);
////实例化新线程
//cts = new CancellationTokenSource();
//myThread = new Thread(myThreadDelegate);
//myThread.IsBackground = true;
//myThread.Start();
return true;
}
catch (Exception)
{
this.isConnected = false;
return false;
}
}
private void Listening()
{
try
{
while (true)
{
// 获取一个数据流对象来进行读取和写入
this.stream = tcpClient.GetStream();
if (this.stream.CanRead)
{
if (cts.Token.IsCancellationRequested) return;
byte[] buffer = new byte[256];//new byte[buffer_length];
int bytesLength = this.stream.Read(buffer, 0, buffer.Length);
#region
if (bytesLength == 0)
{
CloseAll();
this.isConnected = false;
//Thread.Sleep(500);
//while (true)
//{
// try
// {
// TcpClientStart();
// break;
// }
// catch (Exception)
// {
// }
//}
//break;
}
#endregion
//object msg = BytesToStuct(buffer, this.type);
//if (msg == null) continue;
//lock (this)
//{
//}
}
}
}
catch (System.IO.IOException)//服务器异常断开
{
CloseAll();
this.isConnected = false;
}
catch (Exception)
{
}
}
public bool SendMessage(object sendMsg)
{
//把成 ASCII 字符串转化数据字符。
byte[] sendMsgbyte = null;
// NetworkStream stream = null;
//TcpClient tcpClient = new TcpClient();
try
{
//tcpClient.Connect(this.localIP, port);
this.stream = this.tcpClient.GetStream();
if (this.stream.CanWrite)
{
sendMsgbyte = StructToBytes(sendMsg);
stream.Write(sendMsgbyte, 0, sendMsgbyte.Length);
}
return true;
}
catch (Exception)
{
return false;
}
}
public bool SendMessage(string sendMsg)
{
//把成 ASCII 字符串转化数据字符。
byte[] sendMsgbyte = null;
try
{
this.stream = this.tcpClient.GetStream();
if (this.stream.CanWrite)
{
sendMsgbyte = System.Text.Encoding.ASCII.GetBytes(sendMsg);
stream.Write(sendMsgbyte, 0, sendMsgbyte.Length);
}
return true;
}
catch (Exception)
{
return false;
}
}
/// <summary>
/// 清除缓存区中某条指令
/// </summary>
/// <param name="cmdID"></param>
/// <returns></returns>
public bool ClearMessage(int cmdID)
{
try
{
return true;
}
catch (Exception)
{
return false;
}
}
/// <summary>
/// 不启用监听功能时可以使用
/// </summary>
/// <param name="receiveMsg"></param>
public bool ReceiveMessage(out string receiveMsg)
{
receiveMsg = "";
try
{
// 获取一个数据流对象来进行读取和写入
stream = tcpClient.GetStream();
if (this.stream.CanRead)
{
byte[] buffer = new byte[this.tcpClient.ReceiveBufferSize];
this.stream.Read(buffer, 0, this.tcpClient.ReceiveBufferSize);
receiveMsg = Encoding.Default.GetString(buffer);
}
return true;
}
catch (SocketException)
{
return false;
//MessageBox.Show(se.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
///// <summary>
///// 启用监听功能时使用,默认接收队列中的第一个数据
///// </summary>
///// <param name="timeOut">超时时间单位ms</param>
///// <param name="comData">返回接收到的数据</param>
///// <returns></returns>
//public bool ReceiveMessage(double timeOut, out ComData comData)
//{
// comData = new ComData(0);
// try
// {
// DateTime startTime = DateTime.Now;
// while (true)
// {
// if (DateTime.Now.Subtract(startTime).TotalMilliseconds > timeOut)
// return false;
// if (comDataDic.Count > 0)
// {
// foreach (var item in comDataDic.Values)
// {
// if (comDataDic.TryRemove(item.cmdID, out comData))
// {
// comData.status = 1;
// return true;
// }
// }
// }
// }
// }
// catch (Exception)
// {
// return false;
// }
//}
///// <summary>
///// 异步接收信息,防止主线程卡死
///// </summary>
///// <param name="cmdID"></param>
///// <param name="timeOut"></param>
///// <returns></returns>
//public Task<ComData> ReceiveMsgAsync(double timeOut)
//{
// return Task.Run(() =>
// {
// ComData comData;
// ReceiveMessage(timeOut, out comData);
// return comData;
// });
//}
//// <summary>
/// 结构体转byte数组
/// </summary>
/// <param name="structObj">要转换的结构体</param>
/// <returns>转换后的byte数组</returns>
public static byte[] StructToBytes(object structObj)
{
//得到结构体的大小
int size = Marshal.SizeOf(structObj);
//创建byte数组
byte[] bytes = new byte[size];
//分配结构体大小的内存空间
IntPtr structPtr = Marshal.AllocHGlobal(size);
//将结构体拷到分配好的内存空间
Marshal.StructureToPtr(structObj, structPtr, false);
//从内存空间拷到byte数组
Marshal.Copy(structPtr, bytes, 0, size);
//释放内存空间
Marshal.FreeHGlobal(structPtr);
//返回byte数组
return bytes;
}
/// <summary>
/// byte数组转结构体
/// </summary>
/// <param name="bytes">byte数组</param>
/// <param name="type">结构体类型</param>
/// <returns>转换后的结构体</returns>
public static object BytesToStuct(byte[] bytes, Type type)
{
//得到结构体的大小
int size = Marshal.SizeOf(type);
//byte数组长度小于结构体的大小
if (size > bytes.Length)
{
//返回空
return null;
}
//分配结构体大小的内存空间
IntPtr structPtr = Marshal.AllocHGlobal(size);
//将byte数组拷到分配好的内存空间
Marshal.Copy(bytes, 0, structPtr, size);
//将内存空间转换为目标结构体
object obj = Marshal.PtrToStructure(structPtr, type);
//释放内存空间
Marshal.FreeHGlobal(structPtr);
//返回结构体
return obj;
}
public void CloseAll()
{
this.CloseResource();
}
private void CloseResource()
{
if (this != null)
{
cts.Cancel();
if (this.stream != null)
{
this.stream.Close();
this.stream.Dispose();
}
if (this.tcpClient != null)
{
this.tcpClient.Close();
this.tcpClient = null;
}
}
}
}
}

View File

@ -118,7 +118,12 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="textBox1.Text" xml:space="preserve"> <data name="textBox1.Text" xml:space="preserve">
<value>v1.2.0.0(2024-09-27) <value>v1.2.0.6(2024-11-06)
1、禾欣控股所有设备兼容
2、新材料ERP并入
3、内存缓存改为硬盘存图
4、计米器单独传感器流程
v1.2.0.0(2024-09-27)
1、加入传统算法修改核心 1、加入传统算法修改核心
v1.0.2.10(2024-08-05) v1.0.2.10(2024-08-05)
1、修复bug优化显示 1、修复bug优化显示

View File

@ -227,6 +227,7 @@
<Compile Include="Device\CamerUtil\IKDevice.cs" /> <Compile Include="Device\CamerUtil\IKDevice.cs" />
<Compile Include="Device\CamerUtil\IKDeviceCL.cs" /> <Compile Include="Device\CamerUtil\IKDeviceCL.cs" />
<Compile Include="Device\CloudMgr.cs" /> <Compile Include="Device\CloudMgr.cs" />
<Compile Include="Device\DL_EN1Dev.cs" />
<Compile Include="Device\PLCDev.cs" /> <Compile Include="Device\PLCDev.cs" />
<Compile Include="Device\PhotoLib.cs" /> <Compile Include="Device\PhotoLib.cs" />
<Compile Include="Device\DefectLib.cs" /> <Compile Include="Device\DefectLib.cs" />
@ -261,6 +262,18 @@
</Compile> </Compile>
<Compile Include="Interface\ABSCamerCardDev.cs" /> <Compile Include="Interface\ABSCamerCardDev.cs" />
<Compile Include="Jobject.cs" /> <Compile Include="Jobject.cs" />
<Compile Include="Page\AddErpFrm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Page\AddErpFrm.Designer.cs">
<DependentUpon>AddErpFrm.cs</DependentUpon>
</Compile>
<Compile Include="Page\FErpMesEdit.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Page\FErpMesEdit.Designer.cs">
<DependentUpon>FErpMesEdit.cs</DependentUpon>
</Compile>
<Compile Include="Page\FSelDefect.cs"> <Compile Include="Page\FSelDefect.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@ -367,6 +380,12 @@
<EmbeddedResource Include="FrmVerList.resx"> <EmbeddedResource Include="FrmVerList.resx">
<DependentUpon>FrmVerList.cs</DependentUpon> <DependentUpon>FrmVerList.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Page\AddErpFrm.resx">
<DependentUpon>AddErpFrm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Page\FErpMesEdit.resx">
<DependentUpon>FErpMesEdit.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Page\FSelDefect.resx"> <EmbeddedResource Include="Page\FSelDefect.resx">
<DependentUpon>FSelDefect.cs</DependentUpon> <DependentUpon>FSelDefect.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>

View File

@ -0,0 +1,127 @@
namespace LeatherApp.Page
{
partial class AddErpFrm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.panel1 = new System.Windows.Forms.Panel();
this.tbERPID = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.cbPdtList = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.pnlBtm.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// pnlBtm
//
this.pnlBtm.Location = new System.Drawing.Point(1, 344);
this.pnlBtm.Size = new System.Drawing.Size(725, 55);
//
// btnCancel
//
this.btnCancel.Location = new System.Drawing.Point(597, 12);
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(482, 12);
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// panel1
//
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.cbPdtList);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.tbERPID);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(1, 35);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(725, 309);
this.panel1.TabIndex = 2;
//
// tbERPID
//
this.tbERPID.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tbERPID.Location = new System.Drawing.Point(154, 55);
this.tbERPID.Name = "tbERPID";
this.tbERPID.Size = new System.Drawing.Size(543, 30);
this.tbERPID.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(43, 61);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(87, 16);
this.label1.TabIndex = 1;
this.label1.Text = "产品绑定ID";
//
// cbPdtList
//
this.cbPdtList.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbPdtList.FormattingEnabled = true;
this.cbPdtList.Location = new System.Drawing.Point(154, 133);
this.cbPdtList.Name = "cbPdtList";
this.cbPdtList.Size = new System.Drawing.Size(543, 29);
this.cbPdtList.TabIndex = 2;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(43, 140);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(103, 16);
this.label2.TabIndex = 3;
this.label2.Text = "产品检测流程";
//
// AddErpFrm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(727, 402);
this.Controls.Add(this.panel1);
this.Name = "AddErpFrm";
this.Text = "添加ERP绑定";
this.ZoomScaleRect = new System.Drawing.Rectangle(15, 15, 727, 377);
this.Controls.SetChildIndex(this.pnlBtm, 0);
this.Controls.SetChildIndex(this.panel1, 0);
this.pnlBtm.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox cbPdtList;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox tbERPID;
}
}

View File

@ -0,0 +1,109 @@
using DocumentFormat.OpenXml.EMMA;
using Sunny.UI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LeatherApp.Page
{
public partial class AddErpFrm : UIEditForm
{
private Service.ProductService service = new Service.ProductService();
string _ErpID;
string[] Material = new string[6];
public AddErpFrm(string erpID)
{
InitializeComponent();
_ErpID = erpID;
FrmInit();
}
private void FrmInit()
{
tbERPID.Text = _ErpID;
Material[0] = Config.materialNameList.FirstOrDefault(x => x.Value<int>("code") == 0).Value<string>("name");
Material[1] = Config.materialNameList.FirstOrDefault(x => x.Value<int>("code") == 1).Value<string>("name");
Material[2] = Config.materialNameList.FirstOrDefault(x => x.Value<int>("code") == 2).Value<string>("name");
Material[3] = Config.materialNameList.FirstOrDefault(x => x.Value<int>("code") == 3).Value<string>("name");
Material[4] = Config.materialNameList.FirstOrDefault(x => x.Value<int>("code") == 4).Value<string>("name");
Material[5] = Config.materialNameList.FirstOrDefault(x => x.Value<int>("code") == 5).Value<string>("name");
var lstColor = Config.colorNameList.Select(x => new { code = x.Value<int>("code"), name = x.Value<string>("name") }).ToList();
var modellist = service.GetListNav();
foreach (var model in modellist)
{
string pdtName = "";
if (model.Material == "0")
pdtName += Material[0];
else if (model.Material == "1")
pdtName += Material[1];
else if (model.Material == "2")
pdtName += Material[2];
else if (model.Material == "3")
pdtName += Material[3];
else if (model.Material == "4")
pdtName += Material[4];
else if (model.Material == "5")
pdtName += Material[5];
else
pdtName += "错误材质";
var tp = lstColor.Find(x => x.code == model.Color);
if (tp != null)
pdtName += "_" + tp.name;
else
pdtName += "_无效颜色";
cbPdtList.Items.Add(pdtName);
}
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
private void btnOK_Click(object sender, EventArgs e)
{
try
{
var temp = cbPdtList.Text.Split('_');
string MaterialID = "";
if (temp[0] == Material[0])
MaterialID = "0";
else if (temp[0] == Material[1])
MaterialID = "1";
else if (temp[0] == Material[2])
MaterialID = "2";
else if (temp[0] == Material[3])
MaterialID = "3";
else if (temp[0] == Material[4])
MaterialID = "4";
else if (temp[0] == Material[5])
MaterialID = "5";
var lstColor = Config.colorNameList.Select(x => new { code = x.Value<int>("code"), name = x.Value<string>("name") }).ToList();
int colorID = lstColor.Find(x => x.name == temp[1]).code;
var modellist = service.GetListNav();
var model = modellist.Find(x => (x.Material == MaterialID && x.Color == colorID));
if (string.IsNullOrEmpty(model.Spec))
model.Spec += _ErpID;
else
model.Spec += $",{_ErpID}";
var result = service.UpdateNav(model);
UIMessageTip.ShowOk($"Erp信息绑定成功", 2000);
}
catch (Exception ex)
{
UIMessageTip.ShowError($"Erp信息绑定失败:{ex.Message}", 2000);
}
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,79 @@
namespace LeatherApp.Page
{
partial class FErpMesEdit
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.pnlBtm.SuspendLayout();
this.SuspendLayout();
//
// pnlBtm
//
this.pnlBtm.Location = new System.Drawing.Point(1, 240);
this.pnlBtm.Size = new System.Drawing.Size(562, 55);
//
// btnCancel
//
this.btnCancel.Location = new System.Drawing.Point(434, 12);
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(319, 12);
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// textBox1
//
this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBox1.Location = new System.Drawing.Point(1, 35);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(562, 205);
this.textBox1.TabIndex = 2;
//
// FErpMesEdit
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(564, 298);
this.Controls.Add(this.textBox1);
this.Name = "FErpMesEdit";
this.Text = "MES/ERP信息编辑";
this.ZoomScaleRect = new System.Drawing.Rectangle(15, 15, 800, 450);
this.Controls.SetChildIndex(this.pnlBtm, 0);
this.Controls.SetChildIndex(this.textBox1, 0);
this.pnlBtm.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox textBox1;
}
}

View File

@ -0,0 +1,35 @@
using Sunny.UI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LeatherApp.Page
{
public partial class FErpMesEdit : UIEditForm
{
public string erpInfo;
public FErpMesEdit(string mesInfo)
{
InitializeComponent();
textBox1.Text = mesInfo;
erpInfo = mesInfo;
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
private void btnOK_Click(object sender, EventArgs e)
{
erpInfo = textBox1.Text;
this.Close();
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -28,14 +28,14 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle137 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle138 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle142 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle143 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle144 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle139 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle140 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle141 = new System.Windows.Forms.DataGridViewCellStyle();
this.uiPanel1 = new Sunny.UI.UIPanel(); this.uiPanel1 = new Sunny.UI.UIPanel();
this.lblLen = new Sunny.UI.UILabel(); this.lblLen = new Sunny.UI.UILabel();
this.lblSpeed = new Sunny.UI.UISymbolLabel(); this.lblSpeed = new Sunny.UI.UISymbolLabel();
@ -60,6 +60,7 @@
this.btnEnd = new Sunny.UI.UISymbolButton(); this.btnEnd = new Sunny.UI.UISymbolButton();
this.btnStart = new Sunny.UI.UISymbolButton(); this.btnStart = new Sunny.UI.UISymbolButton();
this.uiTitlePanel2 = new Sunny.UI.UITitlePanel(); this.uiTitlePanel2 = new Sunny.UI.UITitlePanel();
this.ucColorListDefect = new LeatherApp.UIExtend.UCColorList();
this.lineChartDefect = new Sunny.UI.UILineChart(); this.lineChartDefect = new Sunny.UI.UILineChart();
this.uiTitlePanel3 = new Sunny.UI.UITitlePanel(); this.uiTitlePanel3 = new Sunny.UI.UITitlePanel();
this.uiDataGridView1 = new Sunny.UI.UIDataGridView(); this.uiDataGridView1 = new Sunny.UI.UIDataGridView();
@ -82,6 +83,7 @@
this.lstboxLog = new Sunny.UI.UIListBox(); this.lstboxLog = new Sunny.UI.UIListBox();
this.uiTitlePanel6 = new Sunny.UI.UITitlePanel(); this.uiTitlePanel6 = new Sunny.UI.UITitlePanel();
this.uiPanel3 = new Sunny.UI.UIPanel(); this.uiPanel3 = new Sunny.UI.UIPanel();
this.picDefectImage = new LeatherApp.UIExtend.UCImageView();
this.pnlScannerImg = new Sunny.UI.UITitlePanel(); this.pnlScannerImg = new Sunny.UI.UITitlePanel();
this.picScanner2 = new System.Windows.Forms.PictureBox(); this.picScanner2 = new System.Windows.Forms.PictureBox();
this.picScanner1 = new System.Windows.Forms.PictureBox(); this.picScanner1 = new System.Windows.Forms.PictureBox();
@ -100,8 +102,6 @@
this.uiLabel8 = new Sunny.UI.UILabel(); this.uiLabel8 = new Sunny.UI.UILabel();
this.uiLabel7 = new Sunny.UI.UILabel(); this.uiLabel7 = new Sunny.UI.UILabel();
this.uiLabel6 = new Sunny.UI.UILabel(); this.uiLabel6 = new Sunny.UI.UILabel();
this.picDefectImage = new LeatherApp.UIExtend.UCImageView();
this.ucColorListDefect = new LeatherApp.UIExtend.UCColorList();
this.uiPanel1.SuspendLayout(); this.uiPanel1.SuspendLayout();
this.uiTitlePanel1.SuspendLayout(); this.uiTitlePanel1.SuspendLayout();
this.uiPanel2.SuspendLayout(); this.uiPanel2.SuspendLayout();
@ -659,6 +659,29 @@
this.uiTitlePanel2.TitleColor = System.Drawing.Color.White; this.uiTitlePanel2.TitleColor = System.Drawing.Color.White;
this.uiTitlePanel2.TitleForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(29)))), ((int)(((byte)(138))))); this.uiTitlePanel2.TitleForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(29)))), ((int)(((byte)(138)))));
// //
// 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;
//
// lineChartDefect // lineChartDefect
// //
this.lineChartDefect.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.lineChartDefect.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@ -708,21 +731,21 @@
// //
// uiDataGridView1 // uiDataGridView1
// //
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(238)))), ((int)(((byte)(251)))), ((int)(((byte)(250))))); dataGridViewCellStyle137.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(238)))), ((int)(((byte)(251)))), ((int)(((byte)(250)))));
this.uiDataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; this.uiDataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle137;
this.uiDataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.uiDataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.uiDataGridView1.BackgroundColor = System.Drawing.Color.White; this.uiDataGridView1.BackgroundColor = System.Drawing.Color.White;
this.uiDataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; this.uiDataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; dataGridViewCellStyle138.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.Blue; dataGridViewCellStyle138.BackColor = System.Drawing.Color.Blue;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle138.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White; dataGridViewCellStyle138.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(29)))), ((int)(((byte)(138))))); dataGridViewCellStyle138.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(29)))), ((int)(((byte)(138)))));
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle138.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; dataGridViewCellStyle138.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.uiDataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; this.uiDataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle138;
this.uiDataGridView1.ColumnHeadersHeight = 32; this.uiDataGridView1.ColumnHeadersHeight = 32;
this.uiDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.uiDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.uiDataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.uiDataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@ -737,14 +760,14 @@
this.colArea, this.colArea,
this.colZXD, this.colZXD,
this.colTarget}); this.colTarget});
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle142.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle6.BackColor = System.Drawing.Color.White; dataGridViewCellStyle142.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle142.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle6.ForeColor = System.Drawing.Color.White; dataGridViewCellStyle142.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(242)))), ((int)(((byte)(238))))); dataGridViewCellStyle142.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(242)))), ((int)(((byte)(238)))));
dataGridViewCellStyle6.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle142.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; dataGridViewCellStyle142.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.uiDataGridView1.DefaultCellStyle = dataGridViewCellStyle6; this.uiDataGridView1.DefaultCellStyle = dataGridViewCellStyle142;
this.uiDataGridView1.EnableHeadersVisualStyles = false; this.uiDataGridView1.EnableHeadersVisualStyles = false;
this.uiDataGridView1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.uiDataGridView1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiDataGridView1.GridColor = System.Drawing.Color.CornflowerBlue; this.uiDataGridView1.GridColor = System.Drawing.Color.CornflowerBlue;
@ -752,21 +775,21 @@
this.uiDataGridView1.MultiSelect = false; this.uiDataGridView1.MultiSelect = false;
this.uiDataGridView1.Name = "uiDataGridView1"; this.uiDataGridView1.Name = "uiDataGridView1";
this.uiDataGridView1.RectColor = System.Drawing.Color.DodgerBlue; this.uiDataGridView1.RectColor = System.Drawing.Color.DodgerBlue;
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle143.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(238)))), ((int)(((byte)(251)))), ((int)(((byte)(250))))); dataGridViewCellStyle143.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(238)))), ((int)(((byte)(251)))), ((int)(((byte)(250)))));
dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle143.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle143.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle7.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(29)))), ((int)(((byte)(138))))); dataGridViewCellStyle143.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(29)))), ((int)(((byte)(138)))));
dataGridViewCellStyle7.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle143.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; dataGridViewCellStyle143.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.uiDataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle7; this.uiDataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle143;
this.uiDataGridView1.RowHeadersWidth = 62; this.uiDataGridView1.RowHeadersWidth = 62;
dataGridViewCellStyle8.BackColor = System.Drawing.Color.White; dataGridViewCellStyle144.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle144.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle144.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(242)))), ((int)(((byte)(238))))); dataGridViewCellStyle144.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(242)))), ((int)(((byte)(238)))));
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle144.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
this.uiDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle8; this.uiDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle144;
this.uiDataGridView1.RowTemplate.Height = 30; this.uiDataGridView1.RowTemplate.Height = 30;
this.uiDataGridView1.ScrollBarBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(238)))), ((int)(((byte)(251)))), ((int)(((byte)(250))))); this.uiDataGridView1.ScrollBarBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(238)))), ((int)(((byte)(251)))), ((int)(((byte)(250)))));
this.uiDataGridView1.ScrollBarColor = System.Drawing.Color.DodgerBlue; this.uiDataGridView1.ScrollBarColor = System.Drawing.Color.DodgerBlue;
@ -817,9 +840,9 @@
// colX // colX
// //
this.colX.DataPropertyName = "X"; this.colX.DataPropertyName = "X";
dataGridViewCellStyle3.Format = "N1"; dataGridViewCellStyle139.Format = "N1";
dataGridViewCellStyle3.NullValue = null; dataGridViewCellStyle139.NullValue = null;
this.colX.DefaultCellStyle = dataGridViewCellStyle3; this.colX.DefaultCellStyle = dataGridViewCellStyle139;
this.colX.HeaderText = "X(cm)"; this.colX.HeaderText = "X(cm)";
this.colX.MinimumWidth = 8; this.colX.MinimumWidth = 8;
this.colX.Name = "colX"; this.colX.Name = "colX";
@ -829,9 +852,9 @@
// colY // colY
// //
this.colY.DataPropertyName = "Y"; this.colY.DataPropertyName = "Y";
dataGridViewCellStyle4.Format = "N2"; dataGridViewCellStyle140.Format = "N2";
dataGridViewCellStyle4.NullValue = null; dataGridViewCellStyle140.NullValue = null;
this.colY.DefaultCellStyle = dataGridViewCellStyle4; this.colY.DefaultCellStyle = dataGridViewCellStyle140;
this.colY.HeaderText = "Y(米)"; this.colY.HeaderText = "Y(米)";
this.colY.MinimumWidth = 8; this.colY.MinimumWidth = 8;
this.colY.Name = "colY"; this.colY.Name = "colY";
@ -854,9 +877,9 @@
// //
// colArea // colArea
// //
dataGridViewCellStyle5.Format = "N2"; dataGridViewCellStyle141.Format = "N2";
dataGridViewCellStyle5.NullValue = null; dataGridViewCellStyle141.NullValue = null;
this.colArea.DefaultCellStyle = dataGridViewCellStyle5; this.colArea.DefaultCellStyle = dataGridViewCellStyle141;
this.colArea.HeaderText = "面积(mm²)"; this.colArea.HeaderText = "面积(mm²)";
this.colArea.MinimumWidth = 8; this.colArea.MinimumWidth = 8;
this.colArea.Name = "colArea"; this.colArea.Name = "colArea";
@ -1065,6 +1088,15 @@
this.uiPanel3.Text = null; this.uiPanel3.Text = null;
this.uiPanel3.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; this.uiPanel3.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
// //
// 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;
//
// pnlScannerImg // pnlScannerImg
// //
this.pnlScannerImg.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.pnlScannerImg.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@ -1353,38 +1385,6 @@
this.uiLabel6.Text = "光源"; this.uiLabel6.Text = "光源";
this.uiLabel6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 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;
//
// FHome // FHome
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;

File diff suppressed because it is too large Load Diff

View File

@ -8,6 +8,7 @@ using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
using System.Drawing; using System.Drawing;
using System.IO;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -33,12 +34,14 @@ namespace LeatherApp.Page
{ {
this.Text += $" 原图索引({list[0].PhotoIndex})"; this.Text += $" 原图索引({list[0].PhotoIndex})";
list.ForEach(item => { list.ForEach(item => {
string filename = Path.Combine(Config.appBasePath + "\\TempPic\\", $"{item.imageID}.jpg");
OpenCvSharp.Mat img = new OpenCvSharp.Mat(filename);
UIDefectImage userCon = new UIDefectImage() UIDefectImage userCon = new UIDefectImage()
{ {
Code = item.Code, Code = item.Code,
Tag = item, Tag = item,
DefecLocation=$"[{item.CentreX}cm,{Math.Round(item.CentreY/ 100.0f,2)}米]", DefecLocation=$"[{item.CentreX}cm,{Math.Round(item.CentreY/ 100.0f,2)}米]",
Image = item.image Image = img.ToBitmap()
}; };
//userCon.CodeChangeEvent = (code, name) => //userCon.CodeChangeEvent = (code, name) =>
//{ //{

View File

@ -28,17 +28,17 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle34 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle35 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle39 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle36 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle40 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle41 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle42 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle43 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle44 = new System.Windows.Forms.DataGridViewCellStyle();
this.uiTitlePanel2 = new Sunny.UI.UITitlePanel(); this.uiTitlePanel2 = new Sunny.UI.UITitlePanel();
this.tcbarTensionValue = new Sunny.UI.UITrackBar(); this.tcbarTensionValue = new Sunny.UI.UITrackBar();
this.tcbarGain = new Sunny.UI.UITrackBar(); this.tcbarGain = new Sunny.UI.UITrackBar();
@ -53,6 +53,10 @@
this.lblLightValue = new Sunny.UI.UILabel(); this.lblLightValue = new Sunny.UI.UILabel();
this.uiLabel6 = new Sunny.UI.UILabel(); this.uiLabel6 = new Sunny.UI.UILabel();
this.uiTitlePanel3 = new Sunny.UI.UITitlePanel(); this.uiTitlePanel3 = new Sunny.UI.UITitlePanel();
this.tbClass = new Sunny.UI.UITextBox();
this.uiLabel13 = new Sunny.UI.UILabel();
this.tbAera = new Sunny.UI.UINumPadTextBox();
this.uiLabel12 = new Sunny.UI.UILabel();
this.cmbModelName = new Sunny.UI.UIComboBox(); this.cmbModelName = new Sunny.UI.UIComboBox();
this.uiLabel1 = new Sunny.UI.UILabel(); this.uiLabel1 = new Sunny.UI.UILabel();
this.uiTitlePanel4 = new Sunny.UI.UITitlePanel(); this.uiTitlePanel4 = new Sunny.UI.UITitlePanel();
@ -99,10 +103,8 @@
this.cmbColor = new Sunny.UI.UIComboBox(); this.cmbColor = new Sunny.UI.UIComboBox();
this.uiLabel3 = new Sunny.UI.UILabel(); this.uiLabel3 = new Sunny.UI.UILabel();
this.uiLabel2 = new Sunny.UI.UILabel(); this.uiLabel2 = new Sunny.UI.UILabel();
this.uiLabel12 = new Sunny.UI.UILabel(); this.uiSymbolButton1 = new Sunny.UI.UISymbolButton();
this.uiLabel13 = new Sunny.UI.UILabel(); this.uiLabel14 = new Sunny.UI.UILabel();
this.tbAera = new Sunny.UI.UINumPadTextBox();
this.tbClass = new Sunny.UI.UITextBox();
this.uiTitlePanel2.SuspendLayout(); this.uiTitlePanel2.SuspendLayout();
this.uiTitlePanel3.SuspendLayout(); this.uiTitlePanel3.SuspendLayout();
this.uiTitlePanel4.SuspendLayout(); this.uiTitlePanel4.SuspendLayout();
@ -327,6 +329,8 @@
// uiTitlePanel3 // uiTitlePanel3
// //
this.uiTitlePanel3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.uiTitlePanel3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.uiTitlePanel3.Controls.Add(this.uiLabel14);
this.uiTitlePanel3.Controls.Add(this.uiSymbolButton1);
this.uiTitlePanel3.Controls.Add(this.tbClass); this.uiTitlePanel3.Controls.Add(this.tbClass);
this.uiTitlePanel3.Controls.Add(this.uiLabel13); this.uiTitlePanel3.Controls.Add(this.uiLabel13);
this.uiTitlePanel3.Controls.Add(this.tbAera); this.uiTitlePanel3.Controls.Add(this.tbAera);
@ -349,6 +353,65 @@
this.uiTitlePanel3.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; this.uiTitlePanel3.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.uiTitlePanel3.TitleColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192))))); this.uiTitlePanel3.TitleColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
// //
// tbClass
//
this.tbClass.ButtonSymbolOffset = new System.Drawing.Point(0, 0);
this.tbClass.Cursor = System.Windows.Forms.Cursors.IBeam;
this.tbClass.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tbClass.Location = new System.Drawing.Point(4, 176);
this.tbClass.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tbClass.MinimumSize = new System.Drawing.Size(1, 16);
this.tbClass.Name = "tbClass";
this.tbClass.Padding = new System.Windows.Forms.Padding(5);
this.tbClass.ShowText = false;
this.tbClass.Size = new System.Drawing.Size(233, 29);
this.tbClass.Style = Sunny.UI.UIStyle.Custom;
this.tbClass.TabIndex = 29;
this.tbClass.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.tbClass.Watermark = "";
//
// uiLabel13
//
this.uiLabel13.AutoSize = true;
this.uiLabel13.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiLabel13.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
this.uiLabel13.Location = new System.Drawing.Point(3, 210);
this.uiLabel13.Name = "uiLabel13";
this.uiLabel13.Size = new System.Drawing.Size(215, 21);
this.uiLabel13.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel13.TabIndex = 28;
this.uiLabel13.Text = "传统算法过滤像素面积(piexl)";
this.uiLabel13.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// tbAera
//
this.tbAera.FillColor = System.Drawing.Color.White;
this.tbAera.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tbAera.Location = new System.Drawing.Point(4, 236);
this.tbAera.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tbAera.MinimumSize = new System.Drawing.Size(63, 0);
this.tbAera.Name = "tbAera";
this.tbAera.NumPadType = Sunny.UI.NumPadType.Double;
this.tbAera.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
this.tbAera.Size = new System.Drawing.Size(235, 29);
this.tbAera.Style = Sunny.UI.UIStyle.Custom;
this.tbAera.TabIndex = 27;
this.tbAera.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.tbAera.Watermark = "";
//
// uiLabel12
//
this.uiLabel12.AutoSize = true;
this.uiLabel12.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiLabel12.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
this.uiLabel12.Location = new System.Drawing.Point(5, 150);
this.uiLabel12.Name = "uiLabel12";
this.uiLabel12.Size = new System.Drawing.Size(138, 21);
this.uiLabel12.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel12.TabIndex = 26;
this.uiLabel12.Text = "传统算法颜色类别";
this.uiLabel12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// cmbModelName // cmbModelName
// //
this.cmbModelName.DataSource = null; this.cmbModelName.DataSource = null;
@ -572,21 +635,21 @@
// //
// uiDataGridView1 // uiDataGridView1
// //
dataGridViewCellStyle12.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255))))); dataGridViewCellStyle34.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
this.uiDataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle12; this.uiDataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle34;
this.uiDataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.uiDataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.uiDataGridView1.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255))))); this.uiDataGridView1.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
this.uiDataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; this.uiDataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; dataGridViewCellStyle35.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); dataGridViewCellStyle35.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
dataGridViewCellStyle13.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle35.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle13.ForeColor = System.Drawing.Color.White; dataGridViewCellStyle35.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle13.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); dataGridViewCellStyle35.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle35.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True; dataGridViewCellStyle35.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.uiDataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle13; this.uiDataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle35;
this.uiDataGridView1.ColumnHeadersHeight = 32; this.uiDataGridView1.ColumnHeadersHeight = 32;
this.uiDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.uiDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.uiDataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.uiDataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@ -598,35 +661,35 @@
this.col_IsOR, this.col_IsOR,
this.col_Len, this.col_Len,
this.col_Cnt}); this.col_Cnt});
dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle37.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle15.BackColor = System.Drawing.Color.White; dataGridViewCellStyle37.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle37.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle15.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle37.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle15.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255))))); dataGridViewCellStyle37.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
dataGridViewCellStyle15.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle37.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.False; dataGridViewCellStyle37.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.uiDataGridView1.DefaultCellStyle = dataGridViewCellStyle15; this.uiDataGridView1.DefaultCellStyle = dataGridViewCellStyle37;
this.uiDataGridView1.EnableHeadersVisualStyles = false; this.uiDataGridView1.EnableHeadersVisualStyles = false;
this.uiDataGridView1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.uiDataGridView1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiDataGridView1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255))))); this.uiDataGridView1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
this.uiDataGridView1.Location = new System.Drawing.Point(3, 41); this.uiDataGridView1.Location = new System.Drawing.Point(3, 41);
this.uiDataGridView1.MultiSelect = false; this.uiDataGridView1.MultiSelect = false;
this.uiDataGridView1.Name = "uiDataGridView1"; this.uiDataGridView1.Name = "uiDataGridView1";
dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle38.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle16.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255))))); dataGridViewCellStyle38.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
dataGridViewCellStyle16.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle38.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle16.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle38.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle16.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); dataGridViewCellStyle38.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
dataGridViewCellStyle16.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle38.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.True; dataGridViewCellStyle38.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.uiDataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle16; this.uiDataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle38;
this.uiDataGridView1.RowHeadersWidth = 62; this.uiDataGridView1.RowHeadersWidth = 62;
dataGridViewCellStyle17.BackColor = System.Drawing.Color.White; dataGridViewCellStyle39.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle17.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle39.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle17.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle39.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle17.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255))))); dataGridViewCellStyle39.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
dataGridViewCellStyle17.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle39.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
this.uiDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle17; this.uiDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle39;
this.uiDataGridView1.RowTemplate.Height = 30; this.uiDataGridView1.RowTemplate.Height = 30;
this.uiDataGridView1.SelectedIndex = -1; this.uiDataGridView1.SelectedIndex = -1;
this.uiDataGridView1.Size = new System.Drawing.Size(581, 308); this.uiDataGridView1.Size = new System.Drawing.Size(581, 308);
@ -646,8 +709,8 @@
// col_zxd // col_zxd
// //
this.col_zxd.DataPropertyName = "ZXD"; this.col_zxd.DataPropertyName = "ZXD";
dataGridViewCellStyle14.NullValue = null; dataGridViewCellStyle36.NullValue = null;
this.col_zxd.DefaultCellStyle = dataGridViewCellStyle14; this.col_zxd.DefaultCellStyle = dataGridViewCellStyle36;
this.col_zxd.HeaderText = "置信度"; this.col_zxd.HeaderText = "置信度";
this.col_zxd.MinimumWidth = 20; this.col_zxd.MinimumWidth = 20;
this.col_zxd.Name = "col_zxd"; this.col_zxd.Name = "col_zxd";
@ -718,21 +781,21 @@
// //
// uiDataGridView2 // uiDataGridView2
// //
dataGridViewCellStyle18.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255))))); dataGridViewCellStyle40.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
this.uiDataGridView2.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle18; this.uiDataGridView2.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle40;
this.uiDataGridView2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.uiDataGridView2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.uiDataGridView2.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255))))); this.uiDataGridView2.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
this.uiDataGridView2.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; this.uiDataGridView2.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; dataGridViewCellStyle41.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle19.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); dataGridViewCellStyle41.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
dataGridViewCellStyle19.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle41.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle19.ForeColor = System.Drawing.Color.White; dataGridViewCellStyle41.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle19.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); dataGridViewCellStyle41.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle41.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True; dataGridViewCellStyle41.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.uiDataGridView2.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle19; this.uiDataGridView2.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle41;
this.uiDataGridView2.ColumnHeadersHeight = 32; this.uiDataGridView2.ColumnHeadersHeight = 32;
this.uiDataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.uiDataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.uiDataGridView2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.uiDataGridView2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@ -742,35 +805,35 @@
this.col2_3, this.col2_3,
this.col2_4, this.col2_4,
this.col2_5}); this.col2_5});
dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle42.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle20.BackColor = System.Drawing.Color.White; dataGridViewCellStyle42.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle20.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle42.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle20.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle42.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle20.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255))))); dataGridViewCellStyle42.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
dataGridViewCellStyle20.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle42.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.False; dataGridViewCellStyle42.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.uiDataGridView2.DefaultCellStyle = dataGridViewCellStyle20; this.uiDataGridView2.DefaultCellStyle = dataGridViewCellStyle42;
this.uiDataGridView2.EnableHeadersVisualStyles = false; this.uiDataGridView2.EnableHeadersVisualStyles = false;
this.uiDataGridView2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.uiDataGridView2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiDataGridView2.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255))))); this.uiDataGridView2.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
this.uiDataGridView2.Location = new System.Drawing.Point(3, 41); this.uiDataGridView2.Location = new System.Drawing.Point(3, 41);
this.uiDataGridView2.MultiSelect = false; this.uiDataGridView2.MultiSelect = false;
this.uiDataGridView2.Name = "uiDataGridView2"; this.uiDataGridView2.Name = "uiDataGridView2";
dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle43.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle21.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255))))); dataGridViewCellStyle43.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
dataGridViewCellStyle21.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle43.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle21.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle43.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle21.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); dataGridViewCellStyle43.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
dataGridViewCellStyle21.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle43.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.True; dataGridViewCellStyle43.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.uiDataGridView2.RowHeadersDefaultCellStyle = dataGridViewCellStyle21; this.uiDataGridView2.RowHeadersDefaultCellStyle = dataGridViewCellStyle43;
this.uiDataGridView2.RowHeadersWidth = 62; this.uiDataGridView2.RowHeadersWidth = 62;
dataGridViewCellStyle22.BackColor = System.Drawing.Color.White; dataGridViewCellStyle44.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle22.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle44.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle22.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle44.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle22.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255))))); dataGridViewCellStyle44.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
dataGridViewCellStyle22.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle44.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
this.uiDataGridView2.RowsDefaultCellStyle = dataGridViewCellStyle22; this.uiDataGridView2.RowsDefaultCellStyle = dataGridViewCellStyle44;
this.uiDataGridView2.RowTemplate.Height = 30; this.uiDataGridView2.RowTemplate.Height = 30;
this.uiDataGridView2.SelectedIndex = -1; this.uiDataGridView2.SelectedIndex = -1;
this.uiDataGridView2.Size = new System.Drawing.Size(488, 308); this.uiDataGridView2.Size = new System.Drawing.Size(488, 308);
@ -1073,64 +1136,32 @@
this.uiLabel2.Text = "产品颜色"; this.uiLabel2.Text = "产品颜色";
this.uiLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.uiLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
// uiLabel12 // uiSymbolButton1
// //
this.uiLabel12.AutoSize = true; this.uiSymbolButton1.Cursor = System.Windows.Forms.Cursors.Hand;
this.uiLabel12.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.uiSymbolButton1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiLabel12.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); this.uiSymbolButton1.Location = new System.Drawing.Point(155, 292);
this.uiLabel12.Location = new System.Drawing.Point(5, 150); this.uiSymbolButton1.MinimumSize = new System.Drawing.Size(1, 1);
this.uiLabel12.Name = "uiLabel12"; this.uiSymbolButton1.Name = "uiSymbolButton1";
this.uiLabel12.Size = new System.Drawing.Size(138, 21); this.uiSymbolButton1.Size = new System.Drawing.Size(82, 29);
this.uiLabel12.Style = Sunny.UI.UIStyle.Custom; this.uiSymbolButton1.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel12.TabIndex = 26; this.uiSymbolButton1.Symbol = 61459;
this.uiLabel12.Text = "传统算法颜色类别"; this.uiSymbolButton1.TabIndex = 30;
this.uiLabel12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.uiSymbolButton1.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiSymbolButton1.Click += new System.EventHandler(this.uiSymbolButton1_Click);
// //
// uiLabel13 // uiLabel14
// //
this.uiLabel13.AutoSize = true; this.uiLabel14.AutoSize = true;
this.uiLabel13.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.uiLabel14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiLabel13.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); this.uiLabel14.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
this.uiLabel13.Location = new System.Drawing.Point(3, 210); this.uiLabel14.Location = new System.Drawing.Point(20, 294);
this.uiLabel13.Name = "uiLabel13"; this.uiLabel14.Name = "uiLabel14";
this.uiLabel13.Size = new System.Drawing.Size(215, 21); this.uiLabel14.Size = new System.Drawing.Size(112, 21);
this.uiLabel13.Style = Sunny.UI.UIStyle.Custom; this.uiLabel14.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel13.TabIndex = 28; this.uiLabel14.TabIndex = 31;
this.uiLabel13.Text = "传统算法过滤像素面积(piexl)"; this.uiLabel14.Text = "ERP/MES配置";
this.uiLabel13.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.uiLabel14.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// tbAera
//
this.tbAera.FillColor = System.Drawing.Color.White;
this.tbAera.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tbAera.Location = new System.Drawing.Point(2, 236);
this.tbAera.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tbAera.MinimumSize = new System.Drawing.Size(63, 0);
this.tbAera.Name = "tbAera";
this.tbAera.NumPadType = Sunny.UI.NumPadType.Double;
this.tbAera.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
this.tbAera.Size = new System.Drawing.Size(235, 29);
this.tbAera.Style = Sunny.UI.UIStyle.Custom;
this.tbAera.TabIndex = 27;
this.tbAera.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.tbAera.Watermark = "";
//
// tbClass
//
this.tbClass.ButtonSymbolOffset = new System.Drawing.Point(0, 0);
this.tbClass.Cursor = System.Windows.Forms.Cursors.IBeam;
this.tbClass.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tbClass.Location = new System.Drawing.Point(4, 176);
this.tbClass.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tbClass.MinimumSize = new System.Drawing.Size(1, 16);
this.tbClass.Name = "tbClass";
this.tbClass.Padding = new System.Windows.Forms.Padding(5);
this.tbClass.ShowText = false;
this.tbClass.Size = new System.Drawing.Size(233, 29);
this.tbClass.Style = Sunny.UI.UIStyle.Custom;
this.tbClass.TabIndex = 29;
this.tbClass.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.tbClass.Watermark = "";
// //
// FProductInfo // FProductInfo
// //
@ -1231,5 +1262,7 @@
private Sunny.UI.UINumPadTextBox tbAera; private Sunny.UI.UINumPadTextBox tbAera;
private Sunny.UI.UILabel uiLabel12; private Sunny.UI.UILabel uiLabel12;
private Sunny.UI.UITextBox tbClass; private Sunny.UI.UITextBox tbClass;
private Sunny.UI.UILabel uiLabel14;
private Sunny.UI.UISymbolButton uiSymbolButton1;
} }
} }

View File

@ -55,6 +55,17 @@ namespace LeatherApp.Page
this.rbMaterial4.Text = Config.materialNameList.FirstOrDefault(x => x.Value<int>("code") == 4).Value<string>("name"); this.rbMaterial4.Text = Config.materialNameList.FirstOrDefault(x => x.Value<int>("code") == 4).Value<string>("name");
this.rbMaterial5.Text = Config.materialNameList.FirstOrDefault(x => x.Value<int>("code") == 5).Value<string>("name"); this.rbMaterial5.Text = Config.materialNameList.FirstOrDefault(x => x.Value<int>("code") == 5).Value<string>("name");
if(Config.CustomerName == "MX" || Config.CustomerName == "XCL")
{
uiLabel14.Visible = true;
uiSymbolButton1.Visible = true;
}
else
{
uiLabel14.Visible = false;
uiSymbolButton1.Visible = false;
}
initData(); initData();
} }
private void initData() private void initData()
@ -509,5 +520,27 @@ namespace LeatherApp.Page
{ {
btnDefectOption.Enabled = swcDefectPauseForUser.Active; btnDefectOption.Enabled = swcDefectPauseForUser.Active;
} }
/// <summary>
/// MES、ERP信息输入
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void uiSymbolButton1_Click(object sender, EventArgs e)
{
if (this.model == null || this.model.Id == 0)
return;
FErpMesEdit frm = new FErpMesEdit(model.Spec);
frm.Render();
frm.Text = "MES/ERP信息编辑";
frm.ShowDialog();
if (frm.IsOK)
{
model.Spec = frm.erpInfo;
}
frm.Dispose();
}
} }
} }

View File

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

View File

@ -1,4 +1,5 @@
using SqlSugar; using Newtonsoft.Json;
using SqlSugar;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
@ -48,7 +49,7 @@ namespace LeatherApp.Utils
} }
public static DataTable execSql(string sql, List<SugarParameter> parameters, SqlSugar.DbType dbType = SqlSugar.DbType.SqlServer) public static DataTable execSql(string sql, List<SugarParameter> parameters, SqlSugar.DbType dbType = SqlSugar.DbType.SqlServer)
{ {
if (!Config.OracleDB) if (string.IsNullOrEmpty(Config.ErpDBType) || Config.ErpDBType == "SqlServer")
{ {
//查询表的所有 //查询表的所有
var mydb = getErpDBCon(dbType); var mydb = getErpDBCon(dbType);
@ -62,7 +63,7 @@ namespace LeatherApp.Utils
mydb.Ado.Open(); mydb.Ado.Open();
return mydb.Ado.GetDataTable(sql, parameters); return mydb.Ado.GetDataTable(sql, parameters);
} }
else else if (Config.ErpDBType == "Oracle")
{ {
SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() SqlSugarClient db = new SqlSugarClient(new ConnectionConfig()
{ {
@ -87,14 +88,63 @@ namespace LeatherApp.Utils
// Console.WriteLine($"PJXTBH{dt.Rows[i]["PJXTBH"]}WPH{dt.Rows[i]["WPH"]}WPMC{dt.Rows[i]["WPMC"]}SL{dt.Rows[i]["SL"]}PH{dt.Rows[i]["PH"]}JH{dt.Rows[i]["JH"]}"); // Console.WriteLine($"PJXTBH{dt.Rows[i]["PJXTBH"]}WPH{dt.Rows[i]["WPH"]}WPMC{dt.Rows[i]["WPMC"]}SL{dt.Rows[i]["SL"]}PH{dt.Rows[i]["PH"]}JH{dt.Rows[i]["JH"]}");
// } // }
//} //}
string sqlstr = $"{sql}'{parameters[0].Value}'";
string sqlstr = $"select * from tb_qc_prodinfo where PJXTBH='{parameters[0].Value}'"; //string sqlstr = $"select * from tb_qc_prodinfo where PJXTBH='{parameters[0].Value}'";
var dt2 = db.Ado.GetDataTable(sqlstr); var dt2 = db.Ado.GetDataTable(sqlstr);
dt2.Columns.RemoveAt(0); dt2.Columns.RemoveAt(0);
dt2.Columns.RemoveAt(0); dt2.Columns.RemoveAt(0);
return dt2; return dt2;
//var dt2 = db.Ado.GetDataTable(sqlstr); //var dt2 = db.Ado.GetDataTable(sqlstr);
} }
else if (Config.ErpDBType == "PostgreSQL")
{
SqlSugarClient db = new SqlSugarClient(new ConnectionConfig()
{
DbType = SqlSugar.DbType.PostgreSQL,
ConnectionString = Config.ErpDBConStr,
IsAutoCloseConnection = true,
AopEvents = new AopEvents
{
OnLogExecuting = (tsql, p) =>
{
Console.WriteLine(tsql);
Console.WriteLine(string.Join(",", p?.Select(it => it.ParameterName + ":" + it.Value)));
}
}
});
//string sqlstr = $"select * from mingxin_prod where PJXTBH='{parameters[0].Value}'";
//var dt2 = db.Ado.GetDataTable(sqlstr);
//dt2.Columns.RemoveAt(0);
//dt2.Columns.RemoveAt(0);
string sqlstr = $"select id,current_qty,batch_no,goods_code,material_id from mfg_material_goods where id={parameters[0].Value}";
var dt2 = db.Ado.GetDataTable(sqlstr);
sqlstr = $"select id,material_code,material_name from base_material where id={dt2.Rows[0]["material_id"]}";
var dt3 = db.Ado.GetDataTable(sqlstr);
DataTable dt = new DataTable(); //建立个数据表WPMC,SL,PH,JH
dt.Columns.Add(new DataColumn("WPMC", typeof(string)));//在表中添加string类型的列
dt.Columns.Add(new DataColumn("SL", typeof(string)));//在表中添加string类型的列
dt.Columns.Add(new DataColumn("PH", typeof(string)));//在表中添加string类型的列
dt.Columns.Add(new DataColumn("JH", typeof(string)));//在表中添加string类型的列
dt.Columns.Add(new DataColumn("ERPID", typeof(string)));//在表中添加string类型的列
DataRow dr;//行
dr = dt.NewRow();
dr["WPMC"] = dt3.Rows[0]["material_name"];
dr["SL"] = dt2.Rows[0]["current_qty"];
dr["PH"] = dt2.Rows[0]["batch_no"];
dr["JH"] = dt2.Rows[0]["goods_code"];
dr["ERPID"] = dt3.Rows[0]["material_code"];
dt.Rows.Add(dr);//在表的对象的行里添加此行
return dt;
}
else
return null;
} }
} }
} }

View File

@ -0,0 +1,57 @@
[
{
"id": 0,
"code": "laji",
"name": "垃圾",
"color": "#0080FF"
},
{
"id": 1,
"code": "wuyin",
"name": "污印",
"color": "Lime"
},
{
"id": 2,
"code": "jiangyin",
"name": "浆印",
"color": "DarkViolet"
},
{
"id": 3,
"code": "zhouyin",
"name": "皱印",
"color": "Magenta"
},
{
"id": 4,
"code": "hengdang",
"name": "横档",
"color": "Orange"
},
{
"id": 5,
"code": "jietou",
"name": "接头",
"color": "Blue"
},
{
"id": 6,
"code": "chongying",
"name": "重影",
"color": "Red"
},
{
"id": 7,
"code": "aokeng",
"name": "凹坑",
"color": "Green"
},
{
"id": 8,
"code": "bmss",
"name": "表面损伤",
"color": "Yellow"
}
]

View File

@ -1,57 +1,56 @@
[ [
{ {
"id": 0, "id": 0,
"code": "laji", "code": "bmss",
"name": "垃圾", "name": "表面损伤",
"color": "#0080FF" "color": "Orange"
}, },
{ {
"id": 1, "id": 1,
"code": "wuyin", "code": "zw",
"name": "", "name": "污",
"color": "Lime" "color": "Lime"
}, },
{ {
"id": 2, "id": 2,
"code": "jiangyin", "code": "zy",
"name": "印", "name": "印",
"color": "DarkViolet" "color": "DarkViolet"
}, },
{ {
"id": 3, "id": 3,
"code": "zhouyin", "code": "ty",
"name": "印", "name": "印",
"color": "Magenta" "color": "#0080FF"
}, },
{ {
"id": 4, "id": 4,
"code": "hengdang", "code": "jt",
"name": "横档", "name": "接头",
"color": "Orange" "color": "Magenta"
}, },
{ {
"id": 5, "id": 5,
"code": "jietou", "code": "wy",
"name": "接头", "name": "污印",
"color": "Blue" "color": "Blue"
}, },
{ {
"id": 6, "id": 6,
"code": "chongying", "code": "jty",
"name": "重影", "name": "停车印",
"color": "Red"
},
{
"id": 7,
"code": "aokeng",
"name": "凹坑",
"color": "Green" "color": "Green"
}, },
{ {
"id": 8, "id": 7,
"code": "bmss", "code": "hd",
"name": "表面损伤", "name": "横档",
"color": "Yellow" "color": "Yellow"
},
{
"id": 8,
"code": "chongying",
"name": "重影",
"color": "#208020"
} }
] ]

View File

@ -164,3 +164,33 @@ Global捕获到未处理异常System.NullReferenceException
异常堆栈: 在 LeatherApp.Page.FHome.reDrawDefectPoints(List`1 lstDefectInfo, Double[] XSizeRange, Double[] YSizeRange, Boolean addSelRect) 异常堆栈: 在 LeatherApp.Page.FHome.reDrawDefectPoints(List`1 lstDefectInfo, Double[] XSizeRange, Double[] YSizeRange, Boolean addSelRect)
在 LeatherApp.Page.FHome.<>c__DisplayClass41_1.<callBackDefectEvent>b__0() 在 LeatherApp.Page.FHome.<>c__DisplayClass41_1.<callBackDefectEvent>b__0()
2024-10-25 15:05:47
Global捕获到未处理异常MySql.Data.MySqlClient.MySqlException
异常信息Column 'BarCodeName' cannot be null
异常堆栈: 在 SqlSugar.AdoProvider.ExecuteCommand(String sql, SugarParameter[] parameters)
在 SqlSugar.InsertableProvider`1.ExecuteCommand()
在 Service.InitDB.SendServerDB(String dbConStr, Records record, Boolean dropTable) 位置 E:\CPL\迈沐智能项目\2023\革博士\源码\V1.0\LeatherProject\Service\InitDB.cs:行号 153
在 LeatherApp.Page.FHome.button3_Click(Object sender, EventArgs e) 位置 E:\CPL\迈沐智能项目\2023\革博士\源码\V1.0\LeatherProject\LeatherApp\Page\FHome.cs:行号 3607
在 System.Windows.Forms.Control.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
在 System.Windows.Forms.Button.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
2024-10-25 15:06:39
Global捕获到未处理异常MySql.Data.MySqlClient.MySqlException
异常信息Column 'Material' cannot be null
异常堆栈: 在 SqlSugar.AdoProvider.ExecuteCommand(String sql, SugarParameter[] parameters)
在 SqlSugar.InsertableProvider`1.ExecuteCommand()
在 Service.InitDB.SendServerDB(String dbConStr, Records record, Boolean dropTable) 位置 E:\CPL\迈沐智能项目\2023\革博士\源码\V1.0\LeatherProject\Service\InitDB.cs:行号 153
在 LeatherApp.Page.FHome.button3_Click(Object sender, EventArgs e) 位置 E:\CPL\迈沐智能项目\2023\革博士\源码\V1.0\LeatherProject\LeatherApp\Page\FHome.cs:行号 3608
在 System.Windows.Forms.Control.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
在 System.Windows.Forms.Button.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

View File

@ -42,13 +42,18 @@ cm2px_y=73
MiddleSuperposition=700 MiddleSuperposition=700
[DB] [DB]
DBConStr=server=localhost;Database=LeatherDB;Uid=root;Pwd=123456; AllowLoadLocalInfile=true DBConStr=server=localhost;Database=LeatherDB;Uid=root;Pwd=123456; AllowLoadLocalInfile=true
ErpDBType=PostgreSQL
[ErpDB] [ErpDB]
ErpDBConStr= ErpDBConStr=Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=200.1.1.15)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=PUDB)));User Id=qcvi;Password=qcvi;Pooling='true';Max Pool Size=150
ErpSql= ErpSql=select * from tb_qc_prodinfo where PJXTBH=
ServerDBConStr=server=172.16.21.210;Database=LeatherDB;Uid=XCL001;Pwd=123456;AllowLoadLocalInfile=true
[LOG] [LOG]
LogPath=D:\log\ LogPath=D:\log\
[Halcon] [Halcon]
OpenHalconDefect=false OpenHalconDefect=false
[Beep] [Beep]
OpenBeep=True OpenBeep=True
OpenWarnBeep=True
BeepTime=3000 BeepTime=3000
[Customer]
CustomerName=MX

View File

@ -457,3 +457,5 @@ E:\CPL\迈沐智能项目\2023\革博士\源码\V1.0\LeatherProject\LeatherApp\b
E:\CPL\迈沐智能项目\2023\革博士\源码\V1.0\LeatherProject\LeatherApp\bin\Debug\System.Text.Encodings.Web.xml E:\CPL\迈沐智能项目\2023\革博士\源码\V1.0\LeatherProject\LeatherApp\bin\Debug\System.Text.Encodings.Web.xml
E:\CPL\迈沐智能项目\2023\革博士\源码\V1.0\LeatherProject\LeatherApp\bin\Debug\System.Text.Json.xml E:\CPL\迈沐智能项目\2023\革博士\源码\V1.0\LeatherProject\LeatherApp\bin\Debug\System.Text.Json.xml
E:\CPL\迈沐智能项目\2023\革博士\源码\V1.0\LeatherProject\LeatherApp\bin\Debug\System.Threading.Tasks.Extensions.xml E:\CPL\迈沐智能项目\2023\革博士\源码\V1.0\LeatherProject\LeatherApp\bin\Debug\System.Threading.Tasks.Extensions.xml
E:\CPL\迈沐智能项目\2023\革博士\源码\V1.0\LeatherProject\LeatherApp\obj\Debug\LeatherApp.Page.FErpMesEdit.resources
E:\CPL\迈沐智能项目\2023\革博士\源码\V1.0\LeatherProject\LeatherApp\obj\Debug\LeatherApp.Page.AddErpFrm.resources

View File

@ -26,7 +26,7 @@ namespace Models
/// <summary> /// <summary>
/// 规格 /// 规格
/// </summary> /// </summary>
[SugarColumn(IsNullable = true)] [SugarColumn(IsNullable = true, Length = 4096)]
public string Spec { get; set; } public string Spec { get; set; }
/// <summary> /// <summary>
/// 颜色名称 /// 颜色名称

View File

@ -79,19 +79,6 @@ namespace Models
/// 缺陷总数 /// 缺陷总数
/// </summary> /// </summary>
public int DefectTotalCount { get; set; } public int DefectTotalCount { get; set; }
#region
public int DKCount { get; set; }//堵孔数量
public int ZWCount { get; set; }//脏污数量
public int GSYCCount { get; set; }//钢丝异常数量
public int XWSCount { get; set; }//纤维丝数量
public int QKCount { get; set; }//缺口数量
public int ZKCount { get; set; }//针孔数量
public int PPCount { get; set; }//泡泡数量
public int HSCount { get; set; }//划伤数量
public int YXCount { get; set; }//压线数量
public int XBCount { get; set; }//斜边数量 new
public int SXCount { get; set; }//栅线数量 new
#endregion
public bool Succeed { get; set; } public bool Succeed { get; set; }
/// <summary> /// <summary>
@ -109,6 +96,12 @@ namespace Models
[SqlSugar.SugarColumn(IsJson = true, ColumnDataType = StaticConfig.CodeFirst_BigString)] [SqlSugar.SugarColumn(IsJson = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
public List<float[]> FacePointList { get; set; } = new List<float[]>(); public List<float[]> FacePointList { get; set; } = new List<float[]>();
/// <summary>
/// 测厚数据[长度厚度1厚度2厚度3]
/// </summary>
[SqlSugar.SugarColumn(IsJson = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
public List<float[]> ThicknessPointList { get; set; } = new List<float[]>();
/// <summary> /// <summary>
/// Defect和Size比对失败的坐标位置 /// Defect和Size比对失败的坐标位置
/// </summary> /// </summary>
@ -202,9 +195,13 @@ namespace Models
{ {
get { return Width * Height; } get { return Width * Height; }
} }
//[SugarColumn(IsIgnore = true)]
//public Image image{get;set;}
/// <summary>
/// 图像编号
/// </summary>
[SugarColumn(IsIgnore = true)] [SugarColumn(IsIgnore = true)]
public Image image{get;set;} public string imageID { get; set; }
[SugarColumn(IsIgnore = true)] [SugarColumn(IsIgnore = true)]
public string Name { get; set; } public string Name { get; set; }
[SugarColumn(IsIgnore = true)] [SugarColumn(IsIgnore = true)]

View File

@ -110,7 +110,57 @@ namespace Service
public static void SendServerDB(string dbConStr, Records record, bool dropTable = false) public static void SendServerDB(string dbConStr, Records record, bool dropTable = false)
{ {
ConnectionString = dbConStr; //ConnectionString = dbConStr;
int errStep = 0;
try
{
var db = new SqlSugarClient(new ConnectionConfig()
{
DbType = SqlSugar.DbType.MySql,
//InitKeyType = InitKeyType.Attribute,
IsAutoCloseConnection = true,
ConnectionString = dbConStr
});
errStep = 1;
//var pt = db.Queryable<Product>()
// //.Includes(m => m.ClassesInfo)
// .Includes(m => m.QualifiedLimitList)
// .Includes(m => m.GradeLimitList)
// .First(m => m.Code == record.ProductInfo.Code);
//errStep = 2;
//if (pt == null)
//{
// errStep = 3;
// db.InsertNav<Product>(record.ProductInfo)
// //.Include(a => a.ProductParamsList)//.ThenInclude(z1 => z1.RoomList) //插入2层 Root->ShoolA->RoomList
// .Include(m => m.QualifiedLimitList)
// .Include(m => m.GradeLimitList)
// .ExecuteCommand();
//}
//else
//{
// errStep = 4;
// //db.DeleteNav<Product>(pt)
// //.Include(m => m.QualifiedLimitList)
// //.Include(m => m.GradeLimitList)
// //.ExecuteCommand();
// record.ProductInfo.Id = pt.Id;
// db.UpdateNav<Product>(record.ProductInfo)
// .Include(m => m.QualifiedLimitList)
// .Include(m => m.GradeLimitList)
// .ExecuteCommand();
//}
errStep = 5;
//var newpd = db.Queryable<Product>()
// .Includes(m => m.QualifiedLimitList)
// .Includes(m => m.GradeLimitList)
// .First(m => m.Code == record.ProductInfo.Code);
//record.ProductId = newpd.Id;
db.InsertNav(record)
.Include(m => m.DefectInfoList)
.ExecuteCommand();
/*
ConnectionConfig connectionConfig = new ConnectionConfig() ConnectionConfig connectionConfig = new ConnectionConfig()
{ {
ConnectionString = dbConStr, ConnectionString = dbConStr,
@ -137,12 +187,15 @@ namespace Service
if (dropTable && db.DbMaintenance.IsAnyTable("DefectInfo", false)) db.DbMaintenance.DropTable("DefectInfo"); if (dropTable && db.DbMaintenance.IsAnyTable("DefectInfo", false)) db.DbMaintenance.DropTable("DefectInfo");
//===添加与更新表 //===添加与更新表
try
{
db.CodeFirst.InitTables<Models.Product>(); db.CodeFirst.InitTables<Models.Product>();
db.CodeFirst.InitTables<Models.QualifiedLimit>(); db.CodeFirst.InitTables<Models.QualifiedLimit>();
db.CodeFirst.InitTables<Models.GradeLimit>(); db.CodeFirst.InitTables<Models.GradeLimit>();
db.CodeFirst.InitTables<Models.Records>(); db.CodeFirst.InitTables<Models.Records>();
db.CodeFirst.InitTables<Models.DefectInfo>(); db.CodeFirst.InitTables<Models.DefectInfo>();
}
catch { }
//更改表数据 //更改表数据
try try
{ {
@ -151,8 +204,18 @@ namespace Service
catch { } catch { }
//数据插入表 //数据插入表
db.Insertable(record).ExecuteCommand(); db.Insertable(record).ExecuteCommand();
db.Insertable(record.DefectInfoList).ExecuteCommand();
db.Insertable(record.ProductInfo).ExecuteCommand();
db.Insertable(record.ProductInfo.QualifiedLimitList).ExecuteCommand();
db.Insertable(record.ProductInfo.GradeLimitList).ExecuteCommand();
} }
*/
}
catch (Exception ex)
{
throw new Exception($"err{errStep}:{ex.Message}");
}
} }
/// <summary> /// <summary>
/// 备份DB (还原mysql -uroot -p < d:\dbName.sql) /// 备份DB (还原mysql -uroot -p < d:\dbName.sql)

View File

@ -46,6 +46,30 @@ namespace Service
.Includes(m => m.GradeLimitList) .Includes(m => m.GradeLimitList)
.First(m => m.Id == id); .First(m => m.Id == id);
} }
public Product GetModelNavByErpID(string id)
{
var lt = base.AsSugarClient().Queryable<Product>()
//.Includes(m => m.ClassesInfo)
.Includes(m => m.QualifiedLimitList)
.Includes(m => m.GradeLimitList)
.ToList();
foreach (var item in lt)
{
if (!string.IsNullOrWhiteSpace(item.Spec))
{
if (item.Spec.Split(',').Contains(id))
return item;
}
}
return null;
//return base.AsSugarClient().Queryable<Product>()
// //.Includes(m => m.ClassesInfo)
// .Includes(m => m.QualifiedLimitList)
// .Includes(m => m.GradeLimitList)
// .First(m => m.Spec.Split(',').Contains(id));
}
public Product GetModelNav(string code) public Product GetModelNav(string code)
{ {
return base.AsSugarClient().Queryable<Product>() return base.AsSugarClient().Queryable<Product>()

View File

@ -69,6 +69,20 @@ namespace Service
.Include(m => m.DefectInfoList) .Include(m => m.DefectInfoList)
.ExecuteCommand(); .ExecuteCommand();
} }
public Records GetRecordsNav(string barCode, string barCodeName)
{
return base.AsSugarClient().Queryable<Records>()
.OrderByDescending(m => m.CreateTime)
//.Includes(m => m.ProductInfo).Includes(m => m.ProductInfo.GradeLimitList).Includes(m => m.ProductInfo.QualifiedLimitList)
.Includes(m => m.DefectInfoList)//.OrderBy(st => SqlFunc.Desc(st.CreateTime))
.First(m => m.BarCode == barCode && m.BarCodeName == barCodeName );
}
public bool UpdateNav(Models.Records model)
{
return base.AsSugarClient().UpdateNav(model)
.Include(m => m.DefectInfoList)
.ExecuteCommand();
}
public bool DelNav(Models.Records model) public bool DelNav(Models.Records model)
{ {
return base.AsSugarClient().DeleteNav(model) return base.AsSugarClient().DeleteNav(model)
@ -207,17 +221,17 @@ namespace Service
.Select((a) => new { .Select((a) => new {
a.CreateTime.Date, a.CreateTime.Date,
Total = SqlFunc.AggregateSum(1), Total = SqlFunc.AggregateSum(1),
= SqlFunc.AggregateSum(a.DKCount), //堵孔 = SqlFunc.AggregateSum(a.DKCount),
= SqlFunc.AggregateSum(a.ZWCount), //脏污 = SqlFunc.AggregateSum(a.ZWCount),
= SqlFunc.AggregateSum(a.GSYCCount), //钢丝异常 = SqlFunc.AggregateSum(a.GSYCCount),
= SqlFunc.AggregateSum(a.XWSCount), //纤维丝 = SqlFunc.AggregateSum(a.XWSCount),
= SqlFunc.AggregateSum(a.QKCount), //缺口 = SqlFunc.AggregateSum(a.QKCount),
= SqlFunc.AggregateSum(a.ZKCount), //针孔 = SqlFunc.AggregateSum(a.ZKCount),
= SqlFunc.AggregateSum(a.PPCount), //泡泡 = SqlFunc.AggregateSum(a.PPCount),
= SqlFunc.AggregateSum(a.HSCount), //划伤 = SqlFunc.AggregateSum(a.HSCount),
线 = SqlFunc.AggregateSum(a.YXCount), //压线 = SqlFunc.AggregateSum(a.YXCount),
= SqlFunc.AggregateSum(a.XBCount), //斜边 = SqlFunc.AggregateSum(a.XBCount),
线 = SqlFunc.AggregateSum(a.SXCount), //栅线 = SqlFunc.AggregateSum(a.SXCount),
}); });
return sql2.ToJson(); return sql2.ToJson();
@ -233,17 +247,17 @@ namespace Service
.WhereIF(exp != null, exp); .WhereIF(exp != null, exp);
return sql.Select((a) => new return sql.Select((a) => new
{ {
= SqlFunc.AggregateSum(a.DKCount), //堵孔 = SqlFunc.AggregateSum(a.DKCount),
= SqlFunc.AggregateSum(a.ZWCount), //脏污 = SqlFunc.AggregateSum(a.ZWCount),
= SqlFunc.AggregateSum(a.GSYCCount), //钢丝异常 = SqlFunc.AggregateSum(a.GSYCCount),
= SqlFunc.AggregateSum(a.XWSCount), //纤维丝 = SqlFunc.AggregateSum(a.XWSCount),
= SqlFunc.AggregateSum(a.QKCount), //缺口 = SqlFunc.AggregateSum(a.QKCount),
= SqlFunc.AggregateSum(a.ZKCount), //针孔 = SqlFunc.AggregateSum(a.ZKCount),
= SqlFunc.AggregateSum(a.PPCount), //泡泡 = SqlFunc.AggregateSum(a.PPCount),
= SqlFunc.AggregateSum(a.HSCount), //划伤 = SqlFunc.AggregateSum(a.HSCount),
线 = SqlFunc.AggregateSum(a.YXCount), //压线 = SqlFunc.AggregateSum(a.YXCount),
= SqlFunc.AggregateSum(a.XBCount), //斜边 = SqlFunc.AggregateSum(a.XBCount),
线 = SqlFunc.AggregateSum(a.SXCount), //栅线 = SqlFunc.AggregateSum(a.SXCount),
}).ToJson(); }).ToJson();
} }
} }