版本-v1.2.1 修复新建产品bug,新增张力补偿,新增缺陷分布启用

This commit is contained in:
CPL 2023-11-27 16:44:10 +08:00
parent 8e78cdd0ba
commit e6bd2d06ce
16 changed files with 5409 additions and 5322 deletions

BIN
halftoneproject-master.rar Normal file

Binary file not shown.

View File

@ -1,101 +1,103 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using ProductionControl.Utils; using ProductionControl.Utils;
namespace ProductionControl namespace ProductionControl
{ {
public class Config public class Config
{ {
public static Models.User loginUser; public static Models.User loginUser;
public static bool HeightDevIOState; public static bool HeightDevIOState;
public static Dictionary<string, string> dicDevType = new Dictionary<string, string>(); public static Dictionary<string, string> dicDevType = new Dictionary<string, string>();
// //
public static string appBasePath = ""; public static string appBasePath = "";
public static string CustomerVer = "A"; public static string CustomerVer = "A";
//跳过检测设备 //跳过检测设备
public static bool SkipAxis0, SkipAxis1, SkipAxis2, SkipAxis3; public static bool SkipAxis0, SkipAxis1, SkipAxis2, SkipAxis3;
public static bool SkipTension, SkipHeight, SkipLight, SkipScannerGL, SkipScannerCC, SkipSmallAxis; public static bool SkipTension, SkipHeight, SkipLight, SkipScannerGL, SkipScannerCC, SkipSmallAxis;
//启用功能 2023-1023 //启用功能 2023-1023
public static bool OpenMarkErrorStop; public static bool OpenMarkErrorStop;
//启用缺陷分布功能
//DEV public static bool OpenFlawDistribution;
public static int[] Axis_PulseOutMode=new int[4]; //DEV
public static int[] Axis_MM2PulseNum = new int[4] { 5000, 5000, 5000, 1000};//1mm对应脉冲数 public static int[] Axis_PulseOutMode=new int[4];
public static int[] Axis_HomeMode = new int[4]; public static int[] Axis_MM2PulseNum = new int[4] { 5000, 5000, 5000, 1000};//1mm对应脉冲数
public static int[] Axis_HomeDir = new int[4];//回Home方向 public static int[] Axis_HomeMode = new int[4];
//回HOME速度 public static int[] Axis_HomeDir = new int[4];//回Home方向
public static JArray Axis_HomeVelLow = new JArray(); //回HOME速度
public static JArray Axis_HomeVelHigh = new JArray(); public static JArray Axis_HomeVelLow = new JArray();
public static JArray Axis_HomeAcc = new JArray(); public static JArray Axis_HomeVelHigh = new JArray();
public static JArray Axis_HomeDec = new JArray(); public static JArray Axis_HomeAcc = new JArray();
public static JArray Axis_HomeDec = new JArray();
public static string IOCard_DeviceNum = "PCI-1730,BID#0";
public static LightDevNameEnum Light_Name= LightDevNameEnum.; public static string IOCard_DeviceNum = "PCI-1730,BID#0";
public static int Light_PortNum = 1;//COM端口号 public static LightDevNameEnum Light_Name= LightDevNameEnum.;
public static int Tension_PortNum = 7;//COM端口号 public static int Light_PortNum = 1;//COM端口号
public static string SmallAxis_ComName = "COM2";//COM端口号 public static int Tension_PortNum = 7;//COM端口号
public static string HeightDev_IP = "192.168.3.35"; public static double Tension_Offset = 0;//张力偏移值
public static int HeightDev_Port = 64000; public static string SmallAxis_ComName = "COM2";//COM端口号
public static decimal HeightDev_SafeValue = 0;//厚度传感器安全值(axis移动前的前提条件) public static string HeightDev_IP = "192.168.3.35";
public static int HeightDev_Port = 64000;
public static string Scanner_GENTL_CTI = "ScannerRuntime\\Win64_x64\\MvFGProducerCXP.cti";//板卡相机 public static decimal HeightDev_SafeValue = 0;//厚度传感器安全值(axis移动前的前提条件)
//public static string Scanner_GENTL_CTI = "ScannerRuntime\\Win64_x64\\MvFGProducerCML.cti";//GE相机
public static string SizeEnginePath; public static string Scanner_GENTL_CTI = "ScannerRuntime\\Win64_x64\\MvFGProducerCXP.cti";//板卡相机
public static string SizeBmp_SavePath, SizeBmp_Compare_SavePath, SizeBmp_Zoom_Image_SavePath; //public static string Scanner_GENTL_CTI = "ScannerRuntime\\Win64_x64\\MvFGProducerCML.cti";//GE相机
public static double SizeBmp_SavePath_AutoClear = -1, SizeBmp_Compare_SavePath_AutoClear = -1, SizeBmp_Zoom_Image_SavePath_AutoClear = -1; public static string SizeEnginePath;
//缺陷配置 public static string SizeBmp_SavePath, SizeBmp_Compare_SavePath, SizeBmp_Zoom_Image_SavePath;
public static Size Defect_CutSize, Defect_ReSize; public static double SizeBmp_SavePath_AutoClear = -1, SizeBmp_Compare_SavePath_AutoClear = -1, SizeBmp_Zoom_Image_SavePath_AutoClear = -1;
public static float Defect_Thresholds; //缺陷配置
public static string Defect_SavePath, Defect_Compress_SavePath, Defect_Small_SavePath; public static Size Defect_CutSize, Defect_ReSize;
public static double Defect_SavePath_AutoClear =-1,Defect_Compress_SavePath_AutoClear=-1,Defect_Small_SavePath_AutoClear=-1; public static float Defect_Thresholds;
public static bool SaveAllDefectImg, MakeTag; public static string Defect_SavePath, Defect_Compress_SavePath, Defect_Small_SavePath;
//尺寸配置 public static double Defect_SavePath_AutoClear =-1,Defect_Compress_SavePath_AutoClear=-1,Defect_Small_SavePath_AutoClear=-1;
//public static string Size_LoadPath, Size_FileName; public static bool SaveAllDefectImg, MakeTag;
//尺寸配置
// //public static string Size_LoadPath, Size_FileName;
public static Dictionary<CMDName, JObject> CMDProcess;
//
//DB public static Dictionary<CMDName, JObject> CMDProcess;
//有些服务器防火墙有问题需要加上 min pool size=1 避免认为是恶意请求
//如果用到bulkCopy需要加 AllowLoadLocalInfile=true //DB
//public static string dbMysqlCon = "server=localhost;Database=ProductionDB;Uid=root;Pwd=123456;"; //有些服务器防火墙有问题需要加上 min pool size=1 避免认为是恶意请求
public static string DBConStr = "server=localhost;Database=ProductionDB;Uid=root;Pwd=123456; AllowLoadLocalInfile=true"; //如果用到bulkCopy需要加 AllowLoadLocalInfile=true
//public static string dbMysqlCon = "server=localhost;Database=ProductionDB;Uid=root;Pwd=123456;";
//LOG public static string DBConStr = "server=localhost;Database=ProductionDB;Uid=root;Pwd=123456; AllowLoadLocalInfile=true";
public static string LogPath;
//LOG
//WEBService public static string LogPath;
public static string LocalIp="";
public static int LocalHttpPort=18082, LocalSocketPort; //WEBService
public static int timeout_http_wait = -1;//webapi超时限制,-1为无限制一直等待 public static string LocalIp="";
public static int LocalHttpPort=18082, LocalSocketPort;
//==========位置 初始位 上料位 下料位(下料位不存在时使用上料位) public static int timeout_http_wait = -1;//webapi超时限制,-1为无限制一直等待
public static JObject joPTSetting = new JObject()
{ //==========位置 初始位 上料位 下料位(下料位不存在时使用上料位)
{ "initPT", null }, public static JObject joPTSetting = new JObject()
{ "upPT", null}, {
{ "downPT", null} { "initPT", null },
}; { "upPT", null},
//=========全局按钮 { "downPT", null}
//public static JObject joGButtonSetting = new JObject() { };
// { "start", null }, //=========全局按钮
// { "pause", null}, //public static JObject joGButtonSetting = new JObject() {
// { "reset", null}, // { "start", null },
// { "warning", null}, // { "pause", null},
// { "iodefault", null} // { "reset", null},
//}; // { "warning", null},
public static void DelectPictureFile() // { "iodefault", null}
{ //};
//删除文件 public static void DelectPictureFile()
Task.Factory.StartNew(() => {
//删除文件
Task.Factory.StartNew(() =>
{ {
// CreateSysFolder(); // CreateSysFolder();
@ -103,284 +105,291 @@ namespace ProductionControl
//DeleteFiles(appBasePath + "\\temp\\"); //DeleteFiles(appBasePath + "\\temp\\");
// //
if (Defect_SavePath_AutoClear >= 0) if (Defect_SavePath_AutoClear >= 0)
DeleteFiles(Config.Defect_SavePath, Defect_SavePath_AutoClear, false); DeleteFiles(Config.Defect_SavePath, Defect_SavePath_AutoClear, false);
if (Defect_Compress_SavePath_AutoClear >= 0) if (Defect_Compress_SavePath_AutoClear >= 0)
DeleteFiles(Config.Defect_Compress_SavePath, Defect_Compress_SavePath_AutoClear, false); DeleteFiles(Config.Defect_Compress_SavePath, Defect_Compress_SavePath_AutoClear, false);
if (Defect_Small_SavePath_AutoClear >= 0) if (Defect_Small_SavePath_AutoClear >= 0)
DeleteFiles(Config.Defect_Small_SavePath, Defect_Small_SavePath_AutoClear, false); DeleteFiles(Config.Defect_Small_SavePath, Defect_Small_SavePath_AutoClear, false);
// //
if (SizeBmp_SavePath_AutoClear >= 0) if (SizeBmp_SavePath_AutoClear >= 0)
DeleteFiles(Config.SizeBmp_SavePath, SizeBmp_SavePath_AutoClear, false); DeleteFiles(Config.SizeBmp_SavePath, SizeBmp_SavePath_AutoClear, false);
if (SizeBmp_Compare_SavePath_AutoClear >= 0) if (SizeBmp_Compare_SavePath_AutoClear >= 0)
DeleteFiles(Config.SizeBmp_Compare_SavePath, SizeBmp_Compare_SavePath_AutoClear, false); DeleteFiles(Config.SizeBmp_Compare_SavePath, SizeBmp_Compare_SavePath_AutoClear, false);
if (SizeBmp_Zoom_Image_SavePath_AutoClear >= 0) if (SizeBmp_Zoom_Image_SavePath_AutoClear >= 0)
DeleteFiles(Config.SizeBmp_Zoom_Image_SavePath, SizeBmp_Zoom_Image_SavePath_AutoClear, false); DeleteFiles(Config.SizeBmp_Zoom_Image_SavePath, SizeBmp_Zoom_Image_SavePath_AutoClear, false);
}); });
} }
public static void LoadAllConfig() public static void LoadAllConfig()
{ {
if (string.IsNullOrWhiteSpace(appBasePath)) if (string.IsNullOrWhiteSpace(appBasePath))
appBasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); appBasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
//删除文件 //删除文件
Task.Factory.StartNew(() => Task.Factory.StartNew(() =>
{ {
CreateSysFolder(); CreateSysFolder();
// //
DeleteFiles(appBasePath+"\\temp\\"); DeleteFiles(appBasePath+"\\temp\\");
// //
if (Defect_SavePath_AutoClear>=0) if (Defect_SavePath_AutoClear>=0)
DeleteFiles(Config.Defect_SavePath, Defect_SavePath_AutoClear,true); DeleteFiles(Config.Defect_SavePath, Defect_SavePath_AutoClear,true);
if (Defect_Compress_SavePath_AutoClear >= 0) if (Defect_Compress_SavePath_AutoClear >= 0)
DeleteFiles(Config.Defect_Compress_SavePath, Defect_Compress_SavePath_AutoClear, true); DeleteFiles(Config.Defect_Compress_SavePath, Defect_Compress_SavePath_AutoClear, true);
if (Defect_Small_SavePath_AutoClear>=0) if (Defect_Small_SavePath_AutoClear>=0)
DeleteFiles(Config.Defect_Small_SavePath, Defect_Small_SavePath_AutoClear, true); DeleteFiles(Config.Defect_Small_SavePath, Defect_Small_SavePath_AutoClear, true);
// //
if (SizeBmp_SavePath_AutoClear >= 0) if (SizeBmp_SavePath_AutoClear >= 0)
DeleteFiles(Config.SizeBmp_SavePath, SizeBmp_SavePath_AutoClear, true); DeleteFiles(Config.SizeBmp_SavePath, SizeBmp_SavePath_AutoClear, true);
if (SizeBmp_Compare_SavePath_AutoClear >= 0) if (SizeBmp_Compare_SavePath_AutoClear >= 0)
DeleteFiles(Config.SizeBmp_Compare_SavePath, SizeBmp_Compare_SavePath_AutoClear, true); DeleteFiles(Config.SizeBmp_Compare_SavePath, SizeBmp_Compare_SavePath_AutoClear, true);
if (SizeBmp_Zoom_Image_SavePath_AutoClear >= 0) if (SizeBmp_Zoom_Image_SavePath_AutoClear >= 0)
DeleteFiles(Config.SizeBmp_Zoom_Image_SavePath, SizeBmp_Zoom_Image_SavePath_AutoClear, true); DeleteFiles(Config.SizeBmp_Zoom_Image_SavePath, SizeBmp_Zoom_Image_SavePath_AutoClear, true);
}); });
InitDevDic(); InitDevDic();
LoadSysConfig(); LoadSysConfig();
LoadPTConfig(); LoadPTConfig();
// //
string lsCmdPath = appBasePath + "\\CMDProcess\\"; string lsCmdPath = appBasePath + "\\CMDProcess\\";
if(!Directory.Exists(lsCmdPath)) if(!Directory.Exists(lsCmdPath))
Directory.CreateDirectory(lsCmdPath); Directory.CreateDirectory(lsCmdPath);
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值
{ {
//string name = Enum.GetName(typeof(CMDName), item);//获取名称 //string name = Enum.GetName(typeof(CMDName), item);//获取名称
fileName = lsCmdPath + item + ".json"; fileName = lsCmdPath + item + ".json";
if (File.Exists(fileName)) if (File.Exists(fileName))
CMDProcess.Add((CMDName)item, JObject.Parse(File.ReadAllText(fileName))); CMDProcess.Add((CMDName)item, JObject.Parse(File.ReadAllText(fileName)));
//else //else
// CMDProcess.Add((CMDName)item, null); // CMDProcess.Add((CMDName)item, null);
} }
} }
public static void LoadSysConfig() public static void LoadSysConfig()
{ {
if (string.IsNullOrWhiteSpace(appBasePath)) if (string.IsNullOrWhiteSpace(appBasePath))
appBasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); appBasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string configPath = appBasePath + "\\SysConfig.ini"; string configPath = appBasePath + "\\SysConfig.ini";
string lsTmp = ""; string lsTmp = "";
CustomerVer = Util.ReadIniValue(configPath, "VER", "CustomerVer"); CustomerVer = Util.ReadIniValue(configPath, "VER", "CustomerVer");
if (string.IsNullOrWhiteSpace(CustomerVer)) if (string.IsNullOrWhiteSpace(CustomerVer))
CustomerVer = "A"; CustomerVer = "A";
//Skip //Skip
SkipAxis0 = Util.ReadIniValue(configPath, "SKIP", "SkipAxis0") =="1"; SkipAxis0 = Util.ReadIniValue(configPath, "SKIP", "SkipAxis0") =="1";
SkipAxis1 = Util.ReadIniValue(configPath, "SKIP", "SkipAxis1") == "1"; SkipAxis1 = Util.ReadIniValue(configPath, "SKIP", "SkipAxis1") == "1";
SkipAxis2 = Util.ReadIniValue(configPath, "SKIP", "SkipAxis2") == "1"; SkipAxis2 = Util.ReadIniValue(configPath, "SKIP", "SkipAxis2") == "1";
SkipAxis3 = Util.ReadIniValue(configPath, "SKIP", "SkipAxis3") == "1"; SkipAxis3 = Util.ReadIniValue(configPath, "SKIP", "SkipAxis3") == "1";
SkipTension = Util.ReadIniValue(configPath, "SKIP", "SkipTension") == "1"; SkipTension = Util.ReadIniValue(configPath, "SKIP", "SkipTension") == "1";
SkipHeight = Util.ReadIniValue(configPath, "SKIP", "SkipHeight") == "1"; SkipHeight = Util.ReadIniValue(configPath, "SKIP", "SkipHeight") == "1";
SkipLight = Util.ReadIniValue(configPath, "SKIP", "SkipLight") == "1"; SkipLight = Util.ReadIniValue(configPath, "SKIP", "SkipLight") == "1";
SkipScannerGL = Util.ReadIniValue(configPath, "SKIP", "SkipScannerGL") == "1"; SkipScannerGL = Util.ReadIniValue(configPath, "SKIP", "SkipScannerGL") == "1";
SkipScannerCC = Util.ReadIniValue(configPath, "SKIP", "SkipScannerCC") == "1"; SkipScannerCC = Util.ReadIniValue(configPath, "SKIP", "SkipScannerCC") == "1";
SkipSmallAxis = Util.ReadIniValue(configPath, "SKIP", "SkipSmallAxis") == "1"; SkipSmallAxis = Util.ReadIniValue(configPath, "SKIP", "SkipSmallAxis") == "1";
OpenMarkErrorStop = Util.ReadIniValue(configPath, "SKIP", "MarkErrorStop") == "1"; OpenMarkErrorStop = Util.ReadIniValue(configPath, "SKIP", "MarkErrorStop") == "1";
//DEV OpenFlawDistribution = Util.ReadIniValue(configPath, "SKIP", "OpenFlawDistribution") == "1";
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis0_PulseOutMode"); //DEV
if (Util.IsNumber(lsTmp)) Config.Axis_PulseOutMode[0] = Convert.ToInt32(lsTmp); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis0_PulseOutMode");
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis1_PulseOutMode"); if (Util.IsNumber(lsTmp)) Config.Axis_PulseOutMode[0] = Convert.ToInt32(lsTmp);
if (Util.IsNumber(lsTmp)) Config.Axis_PulseOutMode[1] = Convert.ToInt32(lsTmp); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis1_PulseOutMode");
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis2_PulseOutMode"); if (Util.IsNumber(lsTmp)) Config.Axis_PulseOutMode[1] = Convert.ToInt32(lsTmp);
if (Util.IsNumber(lsTmp)) Config.Axis_PulseOutMode[2] = Convert.ToInt32(lsTmp); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis2_PulseOutMode");
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis3_PulseOutMode"); if (Util.IsNumber(lsTmp)) Config.Axis_PulseOutMode[2] = Convert.ToInt32(lsTmp);
if (Util.IsNumber(lsTmp)) Config.Axis_PulseOutMode[3] = Convert.ToInt32(lsTmp); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis3_PulseOutMode");
if (Util.IsNumber(lsTmp)) Config.Axis_PulseOutMode[3] = Convert.ToInt32(lsTmp);
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis0_HomeMode");
if (Util.IsNumber(lsTmp)) Config.Axis_HomeMode[0] = Convert.ToInt32(lsTmp); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis0_HomeMode");
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis1_HomeMode"); if (Util.IsNumber(lsTmp)) Config.Axis_HomeMode[0] = Convert.ToInt32(lsTmp);
if (Util.IsNumber(lsTmp)) Config.Axis_HomeMode[1] = Convert.ToInt32(lsTmp); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis1_HomeMode");
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis2_HomeMode"); if (Util.IsNumber(lsTmp)) Config.Axis_HomeMode[1] = Convert.ToInt32(lsTmp);
if (Util.IsNumber(lsTmp)) Config.Axis_HomeMode[2] = Convert.ToInt32(lsTmp); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis2_HomeMode");
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis3_HomeMode"); if (Util.IsNumber(lsTmp)) Config.Axis_HomeMode[2] = Convert.ToInt32(lsTmp);
if (Util.IsNumber(lsTmp)) Config.Axis_HomeMode[3] = Convert.ToInt32(lsTmp); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis3_HomeMode");
if (Util.IsNumber(lsTmp)) Config.Axis_HomeMode[3] = Convert.ToInt32(lsTmp);
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis0_HomeDir");
if (Util.IsNumber(lsTmp)) Config.Axis_HomeDir[0] = Convert.ToInt32(lsTmp); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis0_HomeDir");
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis1_HomeDir"); if (Util.IsNumber(lsTmp)) Config.Axis_HomeDir[0] = Convert.ToInt32(lsTmp);
if (Util.IsNumber(lsTmp)) Config.Axis_HomeDir[1] = Convert.ToInt32(lsTmp); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis1_HomeDir");
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis2_HomeDir"); if (Util.IsNumber(lsTmp)) Config.Axis_HomeDir[1] = Convert.ToInt32(lsTmp);
if (Util.IsNumber(lsTmp)) Config.Axis_HomeDir[2] = Convert.ToInt32(lsTmp); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis2_HomeDir");
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis3_HomeDir"); if (Util.IsNumber(lsTmp)) Config.Axis_HomeDir[2] = Convert.ToInt32(lsTmp);
if (Util.IsNumber(lsTmp)) Config.Axis_HomeDir[3] = Convert.ToInt32(lsTmp); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis3_HomeDir");
if (Util.IsNumber(lsTmp)) Config.Axis_HomeDir[3] = Convert.ToInt32(lsTmp);
//
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis_HomeVelLow"); //
if (!string.IsNullOrWhiteSpace(lsTmp)) Axis_HomeVelLow = JArray.Parse(lsTmp); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis_HomeVelLow");
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis_HomeVelHigh"); if (!string.IsNullOrWhiteSpace(lsTmp)) Axis_HomeVelLow = JArray.Parse(lsTmp);
if (!string.IsNullOrWhiteSpace(lsTmp)) Axis_HomeVelHigh = JArray.Parse(lsTmp); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis_HomeVelHigh");
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis_HomeAcc"); if (!string.IsNullOrWhiteSpace(lsTmp)) Axis_HomeVelHigh = JArray.Parse(lsTmp);
if (!string.IsNullOrWhiteSpace(lsTmp)) Axis_HomeAcc = JArray.Parse(lsTmp); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis_HomeAcc");
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis_HomeDec"); if (!string.IsNullOrWhiteSpace(lsTmp)) Axis_HomeAcc = JArray.Parse(lsTmp);
if (!string.IsNullOrWhiteSpace(lsTmp)) Axis_HomeDec = JArray.Parse(lsTmp); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis_HomeDec");
// if (!string.IsNullOrWhiteSpace(lsTmp)) Axis_HomeDec = JArray.Parse(lsTmp);
lsTmp = Util.ReadIniValue(configPath, "DEV", "Light_Name"); //
if (Util.IsNumber(lsTmp)) Config.Light_Name = (LightDevNameEnum)Convert.ToInt32(lsTmp); lsTmp = Util.ReadIniValue(configPath, "DEV", "Light_Name");
lsTmp = Util.ReadIniValue(configPath, "DEV", "Light_PortNum"); if (Util.IsNumber(lsTmp)) Config.Light_Name = (LightDevNameEnum)Convert.ToInt32(lsTmp);
if (Util.IsNumber(lsTmp)) Config.Light_PortNum = Convert.ToInt32(lsTmp); lsTmp = Util.ReadIniValue(configPath, "DEV", "Light_PortNum");
lsTmp = Util.ReadIniValue(configPath, "DEV", "Tension_PortNum"); if (Util.IsNumber(lsTmp)) Config.Light_PortNum = Convert.ToInt32(lsTmp);
if (Util.IsNumber(lsTmp)) Config.Tension_PortNum = Convert.ToInt32(lsTmp); lsTmp = Util.ReadIniValue(configPath, "DEV", "Tension_PortNum");
Config.SmallAxis_ComName = Util.ReadIniValue(configPath, "DEV", "SmallAxis_ComName"); if (Util.IsNumber(lsTmp)) Config.Tension_PortNum = Convert.ToInt32(lsTmp);
Config.SmallAxis_ComName = Util.ReadIniValue(configPath, "DEV", "SmallAxis_ComName");
HeightDev_IP = Util.ReadIniValue(configPath, "DEV", "HeightDev_IP");
lsTmp = Util.ReadIniValue(configPath, "DEV", "HeightDev_Port"); lsTmp = Util.ReadIniValue(configPath, "DEV", "Tension_Offset");
if (Util.IsNumber(lsTmp)) Config.HeightDev_Port = Convert.ToInt32(lsTmp); if (string.IsNullOrEmpty(lsTmp))
lsTmp = Util.ReadIniValue(configPath, "DEV", "HeightDev_SafeValue"); Config.Tension_Offset = 0;
if (Util.IsNumber(lsTmp)) Config.HeightDev_SafeValue = Convert.ToDecimal(lsTmp); else
Config.Tension_Offset = double.Parse(lsTmp);
IOCard_DeviceNum = Util.ReadIniValue(configPath, "DEV", "IOCard_DeviceNum");
HeightDev_IP = Util.ReadIniValue(configPath, "DEV", "HeightDev_IP");
Defect_SavePath = Util.ReadIniValue(configPath, "DEV", "Defect_SavePath"); lsTmp = Util.ReadIniValue(configPath, "DEV", "HeightDev_Port");
lsTmp = Util.ReadIniValue(configPath, "DEV", "Defect_SavePath_AutoClear"); if (Util.IsNumber(lsTmp)) Config.HeightDev_Port = Convert.ToInt32(lsTmp);
if (Util.IsNumber(lsTmp)) Defect_SavePath_AutoClear = Convert.ToDouble(lsTmp); lsTmp = Util.ReadIniValue(configPath, "DEV", "HeightDev_SafeValue");
Defect_Compress_SavePath = Util.ReadIniValue(configPath, "DEV", "Defect_Compress_SavePath"); if (Util.IsNumber(lsTmp)) Config.HeightDev_SafeValue = Convert.ToDecimal(lsTmp);
lsTmp = Util.ReadIniValue(configPath, "DEV", "Defect_Compress_SavePath_AutoClear");
if (Util.IsNumber(lsTmp)) Defect_Compress_SavePath_AutoClear = Convert.ToDouble(lsTmp); IOCard_DeviceNum = Util.ReadIniValue(configPath, "DEV", "IOCard_DeviceNum");
Defect_Small_SavePath = Util.ReadIniValue(configPath, "DEV", "Defect_Small_SavePath"); Defect_SavePath = Util.ReadIniValue(configPath, "DEV", "Defect_SavePath");
lsTmp = Util.ReadIniValue(configPath, "DEV", "Defect_Small_SavePath_AutoClear"); lsTmp = Util.ReadIniValue(configPath, "DEV", "Defect_SavePath_AutoClear");
if (Util.IsNumber(lsTmp)) Defect_Small_SavePath_AutoClear = Convert.ToDouble(lsTmp); if (Util.IsNumber(lsTmp)) Defect_SavePath_AutoClear = Convert.ToDouble(lsTmp);
Defect_Compress_SavePath = Util.ReadIniValue(configPath, "DEV", "Defect_Compress_SavePath");
lsTmp = Util.ReadIniValue(configPath, "DEV", "SaveAllDefectImg"); lsTmp = Util.ReadIniValue(configPath, "DEV", "Defect_Compress_SavePath_AutoClear");
SaveAllDefectImg = (lsTmp == "1"); if (Util.IsNumber(lsTmp)) Defect_Compress_SavePath_AutoClear = Convert.ToDouble(lsTmp);
MakeTag = Util.ReadIniValue(configPath, "DEV", "MakeTag") == "1";
SizeEnginePath = Util.ReadIniValue(configPath, "DEV", "SizeEnginePath"); Defect_Small_SavePath = Util.ReadIniValue(configPath, "DEV", "Defect_Small_SavePath");
lsTmp = Util.ReadIniValue(configPath, "DEV", "Defect_Small_SavePath_AutoClear");
SizeBmp_SavePath = Util.ReadIniValue(configPath, "DEV", "SizeBmp_SavePath"); if (Util.IsNumber(lsTmp)) Defect_Small_SavePath_AutoClear = Convert.ToDouble(lsTmp);
lsTmp = Util.ReadIniValue(configPath, "DEV", "SizeBmp_SavePath_AutoClear");
if (Util.IsNumber(lsTmp)) SizeBmp_SavePath_AutoClear = Convert.ToDouble(lsTmp); lsTmp = Util.ReadIniValue(configPath, "DEV", "SaveAllDefectImg");
SaveAllDefectImg = (lsTmp == "1");
SizeBmp_Compare_SavePath = Util.ReadIniValue(configPath, "DEV", "SizeBmp_Compare_SavePath"); MakeTag = Util.ReadIniValue(configPath, "DEV", "MakeTag") == "1";
lsTmp = Util.ReadIniValue(configPath, "DEV", "SizeBmp_Compare_SavePath_AutoClear"); SizeEnginePath = Util.ReadIniValue(configPath, "DEV", "SizeEnginePath");
if (Util.IsNumber(lsTmp)) SizeBmp_Compare_SavePath_AutoClear = Convert.ToDouble(lsTmp);
SizeBmp_SavePath = Util.ReadIniValue(configPath, "DEV", "SizeBmp_SavePath");
SizeBmp_Zoom_Image_SavePath = Util.ReadIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath"); lsTmp = Util.ReadIniValue(configPath, "DEV", "SizeBmp_SavePath_AutoClear");
lsTmp = Util.ReadIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath_AutoClear"); if (Util.IsNumber(lsTmp)) SizeBmp_SavePath_AutoClear = Convert.ToDouble(lsTmp);
if (Util.IsNumber(lsTmp)) SizeBmp_Zoom_Image_SavePath_AutoClear = Convert.ToDouble(lsTmp);
//DB SizeBmp_Compare_SavePath = Util.ReadIniValue(configPath, "DEV", "SizeBmp_Compare_SavePath");
DBConStr = Util.ReadIniValue(configPath, "DB", "DBConStr"); lsTmp = Util.ReadIniValue(configPath, "DEV", "SizeBmp_Compare_SavePath_AutoClear");
//HTTP if (Util.IsNumber(lsTmp)) SizeBmp_Compare_SavePath_AutoClear = Convert.ToDouble(lsTmp);
LocalIp= Util.ReadIniValue(configPath, "HTTP", "LocalIp");
lsTmp = Util.ReadIniValue(configPath, "HTTP", "LocalHttpPort"); SizeBmp_Zoom_Image_SavePath = Util.ReadIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath");
if (Util.IsNumber(lsTmp)) Config.LocalHttpPort = Convert.ToInt32(lsTmp); lsTmp = Util.ReadIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath_AutoClear");
lsTmp = Util.ReadIniValue(configPath, "HTTP", "LocalSocketPort"); if (Util.IsNumber(lsTmp)) SizeBmp_Zoom_Image_SavePath_AutoClear = Convert.ToDouble(lsTmp);
if (Util.IsNumber(lsTmp)) Config.LocalSocketPort = Convert.ToInt32(lsTmp); //DB
//LOG DBConStr = Util.ReadIniValue(configPath, "DB", "DBConStr");
LogPath = Util.ReadIniValue(configPath, "LOG", "LogPath"); //HTTP
LocalIp= Util.ReadIniValue(configPath, "HTTP", "LocalIp");
//缺陷配置 lsTmp = Util.ReadIniValue(configPath, "HTTP", "LocalHttpPort");
Defect_CutSize = new Size(592, 532); if (Util.IsNumber(lsTmp)) Config.LocalHttpPort = Convert.ToInt32(lsTmp);
Defect_ReSize = new Size(224, 224); lsTmp = Util.ReadIniValue(configPath, "HTTP", "LocalSocketPort");
Defect_Thresholds = 0.4f; if (Util.IsNumber(lsTmp)) Config.LocalSocketPort = Convert.ToInt32(lsTmp);
} //LOG
public static void LoadPTConfig() LogPath = Util.ReadIniValue(configPath, "LOG", "LogPath");
{
if (string.IsNullOrWhiteSpace(appBasePath)) //缺陷配置
appBasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); Defect_CutSize = new Size(592, 532);
string configPath = appBasePath + "\\PTConfig.json"; Defect_ReSize = new Size(224, 224);
string lsTmp = File.ReadAllText(configPath); Defect_Thresholds = 0.4f;
joPTSetting = JObject.Parse(lsTmp); }
} public static void LoadPTConfig()
{
private static void InitDevDic() if (string.IsNullOrWhiteSpace(appBasePath))
{ appBasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
//dicDevType.Add("CodeScanner", "扫码枪");//固定为必有开始 string configPath = appBasePath + "\\PTConfig.json";
if(!dicDevType.ContainsKey("IOCard")) dicDevType.Add("IOCard", "I/O控制"); string lsTmp = File.ReadAllText(configPath);
if (!dicDevType.ContainsKey("Tension")) dicDevType.Add("Tension", "张力测量"); joPTSetting = JObject.Parse(lsTmp);
if (!dicDevType.ContainsKey("Height")) dicDevType.Add("Height", "厚度测量"); }
if (!dicDevType.ContainsKey("Axis")) dicDevType.Add("Axis", "滑台电机");
if (!dicDevType.ContainsKey("AxisTag")) dicDevType.Add("AxisTag", "滑台&测量"); private static void InitDevDic()
if (!dicDevType.ContainsKey("Light")) dicDevType.Add("Light", "光源"); {
if (!dicDevType.ContainsKey("Scanner_GENTL")) dicDevType.Add("Scanner_GENTL", "相机GENTL"); //dicDevType.Add("CodeScanner", "扫码枪");//固定为必有开始
if (!dicDevType.ContainsKey("Scanner_CC")) dicDevType.Add("Scanner_CC", "相机CC"); if(!dicDevType.ContainsKey("IOCard")) dicDevType.Add("IOCard", "I/O控制");
if (!dicDevType.ContainsKey("SmallAxis")) dicDevType.Add("SmallAxis", "镜头电机"); if (!dicDevType.ContainsKey("Tension")) dicDevType.Add("Tension", "张力测量");
if (!dicDevType.ContainsKey("Defect")) dicDevType.Add("Defect", "缺陷检测"); if (!dicDevType.ContainsKey("Height")) dicDevType.Add("Height", "厚度测量");
if (!dicDevType.ContainsKey("Size")) dicDevType.Add("Size", "尺寸测量"); if (!dicDevType.ContainsKey("Axis")) dicDevType.Add("Axis", "滑台电机");
if (!dicDevType.ContainsKey("For")) dicDevType.Add("For", "For循环"); if (!dicDevType.ContainsKey("AxisTag")) dicDevType.Add("AxisTag", "滑台&测量");
if (!dicDevType.ContainsKey("If")) dicDevType.Add("If", "If条件"); if (!dicDevType.ContainsKey("Light")) dicDevType.Add("Light", "光源");
} if (!dicDevType.ContainsKey("Scanner_GENTL")) dicDevType.Add("Scanner_GENTL", "相机GENTL");
if (!dicDevType.ContainsKey("Scanner_CC")) dicDevType.Add("Scanner_CC", "相机CC");
private static void CreateSysFolder() if (!dicDevType.ContainsKey("SmallAxis")) dicDevType.Add("SmallAxis", "镜头电机");
{ if (!dicDevType.ContainsKey("Defect")) dicDevType.Add("Defect", "缺陷检测");
appBasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); if (!dicDevType.ContainsKey("Size")) dicDevType.Add("Size", "尺寸测量");
string dirPath = appBasePath + "\\Attachment\\"; if (!dicDevType.ContainsKey("For")) dicDevType.Add("For", "For循环");
if(!Directory.Exists(dirPath)) Directory.CreateDirectory(dirPath); if (!dicDevType.ContainsKey("If")) dicDevType.Add("If", "If条件");
}
dirPath = appBasePath + "\\Temp\\";
if (!Directory.Exists(dirPath)) Directory.CreateDirectory(dirPath); private static void CreateSysFolder()
} {
/// <summary> appBasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
/// string dirPath = appBasePath + "\\Attachment\\";
/// </summary> if(!Directory.Exists(dirPath)) Directory.CreateDirectory(dirPath);
/// <param name="dirPath"></param>
/// <param name="days"></param> dirPath = appBasePath + "\\Temp\\";
/// <param name="delDir">把日期文件夹也按days进行删除格式:yyyyMMdd</param> if (!Directory.Exists(dirPath)) Directory.CreateDirectory(dirPath);
private static void DeleteFiles(string dirPath,double days=0,bool delDir=false) }
{ /// <summary>
if (!Directory.Exists(dirPath)) return; ///
DateTime delDate = DateTime.Now.AddDays(-days); /// </summary>
API.OutputDebugString($"清除{delDate.ToString("yyyyMMdd")}前记录:{dirPath}。"); /// <param name="dirPath"></param>
string[] file_list = Directory.GetFiles(dirPath); /// <param name="days"></param>
if(days>0) /// <param name="delDir">把日期文件夹也按days进行删除格式:yyyyMMdd</param>
file_list = file_list.Select(file => new FileInfo(file)) private static void DeleteFiles(string dirPath,double days=0,bool delDir=false)
.Where(f=>f.CreationTime<= delDate) {
.Select(x => x.FullName) if (!Directory.Exists(dirPath)) return;
.ToArray(); DateTime delDate = DateTime.Now.AddDays(-days);
API.OutputDebugString($"清除{delDate.ToString("yyyyMMdd")}前记录:{dirPath}。");
foreach (string file in file_list) string[] file_list = Directory.GetFiles(dirPath);
{ if(days>0)
try { file_list = file_list.Select(file => new FileInfo(file))
API.OutputDebugString($"清除文件:{file}..."); .Where(f=>f.CreationTime<= delDate)
File.Delete(file); .Select(x => x.FullName)
} catch(Exception ex) { .ToArray();
API.OutputDebugString($"Ex1:{ex.Message}");
} foreach (string file in file_list)
} {
try {
// API.OutputDebugString($"清除文件:{file}...");
if (delDir) File.Delete(file);
{ } catch(Exception ex) {
int dateNum = Convert.ToInt32(delDate.ToString("yyyyMMdd")); API.OutputDebugString($"Ex1:{ex.Message}");
string floderName; }
string[] dirList = Directory.GetDirectories(dirPath,"20*"); }
foreach (string dir in dirList)
{ //
floderName= dir.Trim('\\'); if (delDir)
floderName = floderName.Substring(floderName.LastIndexOf('\\') + 1); {
if (floderName.Length == 8 && Util.IsNumber(floderName) && Convert.ToInt32(floderName) <= dateNum) int dateNum = Convert.ToInt32(delDate.ToString("yyyyMMdd"));
{ string floderName;
try string[] dirList = Directory.GetDirectories(dirPath,"20*");
{ foreach (string dir in dirList)
API.OutputDebugString($"清除目录:{dir}..."); {
Directory.Delete(dir,true); floderName= dir.Trim('\\');
} floderName = floderName.Substring(floderName.LastIndexOf('\\') + 1);
catch (Exception ex) if (floderName.Length == 8 && Util.IsNumber(floderName) && Convert.ToInt32(floderName) <= dateNum)
{ {
API.OutputDebugString($"Ex2:{ex.Message}"); try
} {
} API.OutputDebugString($"清除目录:{dir}...");
} Directory.Delete(dir,true);
} }
catch (Exception ex)
} {
} API.OutputDebugString($"Ex2:{ex.Message}");
} }
}
}
}
}
}
}

View File

@ -279,9 +279,12 @@ namespace ProductionControl.Device
task.Xmm, task.Ymm, out task.defectInfor2RestorationDesk); task.Xmm, task.Ymm, out task.defectInfor2RestorationDesk);
liStep = 5; liStep = 5;
//大图缺陷坐标转换到图纸坐标 if (Config.OpenFlawDistribution)
if (!string.IsNullOrWhiteSpace(task.drawingPagePath) && task.defectInfor2RestorationDesk != null && task.defectInfor2RestorationDesk.Count > 0) {
task.defectInfor2RestorationDeskPage = yolo1.DefectDrawGerberImage(task.drawingPagePath, task.defectInfor2RestorationDesk); //大图缺陷坐标转换到图纸坐标
if (!string.IsNullOrWhiteSpace(task.drawingPagePath) && task.defectInfor2RestorationDesk != null && task.defectInfor2RestorationDesk.Count > 0)
task.defectInfor2RestorationDeskPage = yolo1.DefectDrawGerberImage(task.drawingPagePath, task.defectInfor2RestorationDesk);
}
stopwatch.Stop(); stopwatch.Stop();
task.stopwatch[4] = stopwatch.ElapsedMilliseconds; task.stopwatch[4] = stopwatch.ElapsedMilliseconds;

View File

@ -1,391 +1,395 @@
using HalconDotNet; using HalconDotNet;
using Microsoft.ML.OnnxRuntime; using Microsoft.ML.OnnxRuntime;
using Microsoft.ML.OnnxRuntime.Tensors; using Microsoft.ML.OnnxRuntime.Tensors;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using OpenCvSharp; using OpenCvSharp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Drawing.Imaging; using System.Drawing.Imaging;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Yolo5; using Yolo5;
namespace ProductionControl.Device namespace ProductionControl.Device
{ {
public class SizeLib : IDisposable public class SizeLib : IDisposable
{ {
public Action<WarningEnum, string> WarningEvent; public Action<WarningEnum, string> WarningEvent;
/// <summary> /// <summary>
/// 检测结果JSON(原图,结果) /// 检测结果JSON(原图,结果)
/// </summary> /// </summary>
public Action<SizeTask> finishEvent; public Action<SizeTask> finishEvent;
/// <summary> /// <summary>
/// 是否打开设备成功 /// 是否打开设备成功
/// </summary> /// </summary>
public bool IsInit { get; private set; } = false; public bool IsInit { get; private set; } = false;
//private System.Timers.Timer timer = new System.Timers.Timer(); //private System.Timers.Timer timer = new System.Timers.Timer();
//配置 //配置
HDevEngine MyEngine = new HDevEngine(); HDevEngine MyEngine = new HDevEngine();
//777时用 //777时用
Yolo_Class yolo5 =new Yolo_Class(); Yolo_Class yolo5 =new Yolo_Class();
private Thread t_task; private Thread t_task;
public SizeLib() public SizeLib()
{ {
} }
public bool start(string enginePath) public bool start(string enginePath)
{ {
try try
{ {
IsInit = true; IsInit = true;
taskList.Clear(); taskList.Clear();
MyEngine.SetProcedurePath(enginePath); MyEngine.SetProcedurePath(enginePath);
t_task = new System.Threading.Thread(run); t_task = new System.Threading.Thread(run);
t_task.IsBackground = true; t_task.IsBackground = true;
t_task.Start(); t_task.Start();
return true; return true;
} }
catch (Exception ex) catch (Exception ex)
{ {
WarningEvent?.Invoke(WarningEnum.High,ex.Message); WarningEvent?.Invoke(WarningEnum.High,ex.Message);
return false; return false;
} }
} }
public void stop() public void stop()
{ {
if (!IsInit) return; if (!IsInit) return;
try try
{ {
IsInit = false; IsInit = false;
//timer.Elapsed -= Timer_Elapsed; //timer.Elapsed -= Timer_Elapsed;
MyEngine.Dispose(); MyEngine.Dispose();
} }
catch { } catch { }
} }
private bool _debug = false; private bool _debug = false;
public bool setDebug { public bool setDebug {
get { return _debug; } get { return _debug; }
set { set {
if (!IsInit) return; if (!IsInit) return;
_debug=value; _debug=value;
if (_debug) if (_debug)
MyEngine.StartDebugServer(); MyEngine.StartDebugServer();
else else
MyEngine.StopDebugServer(); MyEngine.StopDebugServer();
} }
} }
//流程111222444333777777777。。。 //流程111222444333777777777。。。
private void run() private void run()
{ {
int taskCount; int taskCount;
while (IsInit) while (IsInit)
{ {
lock (taskList) lock (taskList)
{ {
taskCount = taskList.Count; taskCount = taskList.Count;
} }
if (taskCount < 1) if (taskCount < 1)
{ {
Thread.Sleep(10); Thread.Sleep(10);
continue; continue;
} }
//// ////
int step = 0; int step = 0;
var task = pop(); var task = pop();
try try
{ {
if (task != null) if (task != null)
{ {
var Program1 = new HDevProcedure(task.engineName); var Program1 = new HDevProcedure(task.engineName);
HDevProcedureCall ProcCall1_PI_PT = new HDevProcedureCall(Program1); HDevProcedureCall ProcCall1_PI_PT = new HDevProcedureCall(Program1);
step = 1; step = 1;
// //
HObject image; HObject image;
if (task.bmp != null) if (task.bmp != null)
Bitmap2HObjectBpp24(out image, task.bmp); Bitmap2HObjectBpp24(out image, task.bmp);
else else
HOperatorSet.ReadImage(out image, task.file_path); HOperatorSet.ReadImage(out image, task.file_path);
step = 2; step = 2;
//设置外部函数输入 //设置外部函数输入
//if (task.index < 100) //if (task.index < 100)
{ {
ProcCall1_PI_PT.SetInputIconicParamObject("Image1", image.Clone()); ProcCall1_PI_PT.SetInputIconicParamObject("Image1", image.Clone());
ProcCall1_PI_PT.SetInputCtrlParamTuple("index", task.index);//参数1-9 ProcCall1_PI_PT.SetInputCtrlParamTuple("index", task.index);//参数1-9
ProcCall1_PI_PT.SetInputCtrlParamTuple("posX", task.posX); ProcCall1_PI_PT.SetInputCtrlParamTuple("posX", task.posX);
ProcCall1_PI_PT.SetInputCtrlParamTuple("posY", task.posY); ProcCall1_PI_PT.SetInputCtrlParamTuple("posY", task.posY);
ProcCall1_PI_PT.SetInputCtrlParamTuple("GerberPath",new HTuple( task.drawingPagePath));//美尚没有 ProcCall1_PI_PT.SetInputCtrlParamTuple("GerberPath",new HTuple( task.drawingPagePath));//美尚没有
//设置外部函数输入 //设置外部函数输入
if ((task.PTandLinePos != null) && (task.PTandLinePos[0] != 0)) if ((task.PTandLinePos != null) && (task.PTandLinePos[0] != 0))
{ {
double[] posarray = new double[23]; double[] posarray = new double[23];
posarray[0] = task.PTandLinePos[0]; posarray[0] = task.PTandLinePos[0];
posarray[1] = task.PTandLinePos[2]; posarray[1] = task.PTandLinePos[2];
posarray[2] = task.PTandLinePos[4]; posarray[2] = task.PTandLinePos[4];
posarray[3] = task.PTandLinePos[6]; posarray[3] = task.PTandLinePos[6];
posarray[4] = task.PTandLinePos[8]; posarray[4] = task.PTandLinePos[8];
for (int i = 0; i < 18; i++) for (int i = 0; i < 18; i++)
{ {
posarray[5 + i] = task.PTandLinePos[10 + i]; posarray[5 + i] = task.PTandLinePos[10 + i];
} }
ProcCall1_PI_PT.SetInputCtrlParamTuple("UserPose", posarray); ProcCall1_PI_PT.SetInputCtrlParamTuple("UserPose", posarray);
///// /////
/// ///
//string directory = Config.LogPath + "\\" + DateTime.Now.ToString("yyyyMM") + "\\"; //string directory = Config.LogPath + "\\" + DateTime.Now.ToString("yyyyMM") + "\\";
//if (!System.IO.Directory.Exists(directory)) //if (!System.IO.Directory.Exists(directory))
// System.IO.Directory.CreateDirectory(directory); // System.IO.Directory.CreateDirectory(directory);
//File.AppendAllText(directory + "sizeData.log", "data:" + string.Join(",", posarray) + "\r\n"); //File.AppendAllText(directory + "sizeData.log", "data:" + string.Join(",", posarray) + "\r\n");
} }
else else
{ {
double[] posarray = new double[23]; double[] posarray = new double[23];
ProcCall1_PI_PT.SetInputCtrlParamTuple("UserPose", posarray); ProcCall1_PI_PT.SetInputCtrlParamTuple("UserPose", posarray);
} }
} }
if (task.index == 777) if (task.index == 777)
{ {
ProcCall1_PI_PT.SetInputIconicParamObject("ContoursAffineTrans1", task.ContoursAffineTrans1_Out); ProcCall1_PI_PT.SetInputIconicParamObject("ContoursAffineTrans1", task.ContoursAffineTrans1_Out);
} }
else else
{ {
HObject ContoursAffineTrans1; HObject ContoursAffineTrans1;
HOperatorSet.GenEmptyObj(out ContoursAffineTrans1); HOperatorSet.GenEmptyObj(out ContoursAffineTrans1);
ProcCall1_PI_PT.SetInputIconicParamObject("ContoursAffineTrans1", ContoursAffineTrans1); ProcCall1_PI_PT.SetInputIconicParamObject("ContoursAffineTrans1", ContoursAffineTrans1);
} }
step = 3; step = 3;
ProcCall1_PI_PT.Execute();//执行外部函数 ProcCall1_PI_PT.Execute();//执行外部函数
step = 4; step = 4;
//获取外部函数输出 //获取外部函数输出
switch (task.index) switch (task.index)
{ {
case 777://比对结果 case 777://比对结果
step = 10; step = 10;
task.CompResult = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("RES") == 1;//结果1为true0为false task.CompResult = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("RES") == 1;//结果1为true0为false
step = 11; step = 11;
if (!task.CompResult) if (!task.CompResult)
{ {
var Defects_X = ProcCall1_PI_PT.GetOutputCtrlParamTuple("Defects_X"); var Defects_X = ProcCall1_PI_PT.GetOutputCtrlParamTuple("Defects_X");
var Defects_Y = ProcCall1_PI_PT.GetOutputCtrlParamTuple("Defects_Y"); var Defects_Y = ProcCall1_PI_PT.GetOutputCtrlParamTuple("Defects_Y");
var Defects_LeftTop_X = ProcCall1_PI_PT.GetOutputCtrlParamTuple("Defects_LeftTop_X"); var Defects_LeftTop_X = ProcCall1_PI_PT.GetOutputCtrlParamTuple("Defects_LeftTop_X");
var Defects_LeftTop_Y = ProcCall1_PI_PT.GetOutputCtrlParamTuple("Defects_LeftTop_Y"); var Defects_LeftTop_Y = ProcCall1_PI_PT.GetOutputCtrlParamTuple("Defects_LeftTop_Y");
var Defects_RightBottom_X = ProcCall1_PI_PT.GetOutputCtrlParamTuple("Defects_RightBottom_X"); var Defects_RightBottom_X = ProcCall1_PI_PT.GetOutputCtrlParamTuple("Defects_RightBottom_X");
var Defects_RightBottom_Y = ProcCall1_PI_PT.GetOutputCtrlParamTuple("Defects_RightBottom_Y"); var Defects_RightBottom_Y = ProcCall1_PI_PT.GetOutputCtrlParamTuple("Defects_RightBottom_Y");
var Contour_Image = ProcCall1_PI_PT.GetOutputIconicParamObject("Contour_Image"); var Contour_Image = ProcCall1_PI_PT.GetOutputIconicParamObject("Contour_Image");
//var Zoom_Image = ProcCall1_PI_PT.GetOutputIconicParamObject("Zoom_Image"); //var Zoom_Image = ProcCall1_PI_PT.GetOutputIconicParamObject("Zoom_Image");
var Defects_Type = ProcCall1_PI_PT.GetOutputCtrlParamTuple("Defects_Type"); var Defects_Type = ProcCall1_PI_PT.GetOutputCtrlParamTuple("Defects_Type");
var Defects_Index = ProcCall1_PI_PT.GetOutputCtrlParamTuple("Defects_Index"); var Defects_Index = ProcCall1_PI_PT.GetOutputCtrlParamTuple("Defects_Index");
step = 12; step = 12;
//对比打标图显示在UI上以后修复台用 //对比打标图显示在UI上以后修复台用
//task.Zoom_Image_mat = yolo5.DrawContour_Opencv(Contour_Image, Zoom_Image, Defects_LeftTop_X, Defects_LeftTop_Y, Defects_RightBottom_X, Defects_RightBottom_Y); //task.Zoom_Image_mat = yolo5.DrawContour_Opencv(Contour_Image, Zoom_Image, Defects_LeftTop_X, Defects_LeftTop_Y, Defects_RightBottom_X, Defects_RightBottom_Y);
//新YOLO.DLL //新YOLO.DLL
task.defectInfor2RestorationDesk = new List<List<string>>(); task.defectInfor2RestorationDesk = new List<List<string>>();
task.Zoom_Image_mat = yolo5.DrawContour_Opencv(Contour_Image, image, Defects_LeftTop_X, Defects_LeftTop_Y, task.Zoom_Image_mat = yolo5.DrawContour_Opencv(Contour_Image, image, Defects_LeftTop_X, Defects_LeftTop_Y,
Defects_RightBottom_X, Defects_RightBottom_Y, Defects_Type, Defects_Index, Defects_X, Defects_Y, out task.defectInfor2RestorationDesk); Defects_RightBottom_X, Defects_RightBottom_Y, Defects_Type, Defects_Index, Defects_X, Defects_Y, out task.defectInfor2RestorationDesk);
//WarningEvent?.Invoke(WarningEnum.Normal, $"SizeLib 777 call DrawContour_Opencv(),Defects_LeftTop_X={Defects_LeftTop_X}," + //WarningEvent?.Invoke(WarningEnum.Normal, $"SizeLib 777 call DrawContour_Opencv(),Defects_LeftTop_X={Defects_LeftTop_X}," +
// $"Defects_LeftTop_Y={Defects_LeftTop_Y},Defects_RightBottom_X={Defects_RightBottom_X},Defects_RightBottom_Y={Defects_RightBottom_Y}," + // $"Defects_LeftTop_Y={Defects_LeftTop_Y},Defects_RightBottom_X={Defects_RightBottom_X},Defects_RightBottom_Y={Defects_RightBottom_Y}," +
// $"Defects_Type={Defects_Type},Defects_Index={Defects_Index},Defects_X={Defects_X},Defects_Y={Defects_Y}," + // $"Defects_Type={Defects_Type},Defects_Index={Defects_Index},Defects_X={Defects_X},Defects_Y={Defects_Y}," +
// $"defectInfor2RestorationDesk={JsonConvert.SerializeObject(task.defectInfor2RestorationDesk)}"); // $"defectInfor2RestorationDesk={JsonConvert.SerializeObject(task.defectInfor2RestorationDesk)}");
step = 13; step = 13;
task.Zoom_Image_mat = yolo5.ResizesMat_4(task.Zoom_Image_mat); task.Zoom_Image_mat = yolo5.ResizesMat_4(task.Zoom_Image_mat);
//大图缺陷坐标转换到图纸坐标 //大图缺陷坐标转换到图纸坐标
step = 14; step = 14;
if (!string.IsNullOrWhiteSpace(task.drawingPagePath) && task.defectInfor2RestorationDesk != null && task.defectInfor2RestorationDesk.Count > 0) if (Config.OpenFlawDistribution)
task.defectInfor2RestorationDeskPage = yolo5.DefectDrawGerberImage(task.drawingPagePath, task.defectInfor2RestorationDesk); {
} if (!string.IsNullOrWhiteSpace(task.drawingPagePath) && task.defectInfor2RestorationDesk != null && task.defectInfor2RestorationDesk.Count > 0)
break; task.defectInfor2RestorationDeskPage = yolo5.DefectDrawGerberImage(task.drawingPagePath, task.defectInfor2RestorationDesk);
case 111:
task.MarkPointList[0] = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("PoseMarkX_1"); }
task.MarkPointList[1] = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("PoseMarkY_1"); }
break; break;
case 222: case 111:
task.MarkPointList[2] = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("PoseMarkX_2"); task.MarkPointList[0] = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("PoseMarkX_1");
task.MarkPointList[3] = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("PoseMarkY_2"); task.MarkPointList[1] = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("PoseMarkY_1");
break; break;
case 333: case 222:
task.MarkPointList[4] = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("PoseMarkX_3"); task.MarkPointList[2] = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("PoseMarkX_2");
task.MarkPointList[5] = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("PoseMarkY_3");//ContoursAffineTrans1 task.MarkPointList[3] = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("PoseMarkY_2");
task.ContoursAffineTrans1_Out = ProcCall1_PI_PT.GetOutputIconicParamObject("ContoursAffineTrans1_Out"); break;
break; case 333:
case 444: task.MarkPointList[4] = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("PoseMarkX_3");
task.MarkPointList[6] = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("PoseMarkX_4"); task.MarkPointList[5] = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("PoseMarkY_3");//ContoursAffineTrans1
task.MarkPointList[7] = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("PoseMarkY_4"); task.ContoursAffineTrans1_Out = ProcCall1_PI_PT.GetOutputIconicParamObject("ContoursAffineTrans1_Out");
break; break;
case 3333: //Tag使用同时继续获取使用default时时校正和其它值 case 444:
step = 80; task.MarkPointList[6] = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("PoseMarkX_4");
if (!string.IsNullOrWhiteSpace( task.sizeTag)) task.MarkPointList[7] = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("PoseMarkY_4");
task.posePT= ProcCall1_PI_PT.GetOutputCtrlParamTuple("posePT").DArr; break;
goto default; case 3333: //Tag使用同时继续获取使用default时时校正和其它值
default: step = 80;
step = 90; if (!string.IsNullOrWhiteSpace( task.sizeTag))
task.PT1 = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("DistancePT1");//index=8 PT1=PT2 task.posePT= ProcCall1_PI_PT.GetOutputCtrlParamTuple("posePT").DArr;
task.PT2 = ProcCall1_PI_PT.GetOutputCtrlParamTuple("DistancePT2"); goto default;
task.Shanxian = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("Distance3Median"); default:
//task.RowP = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("RowP"); step = 90;
task.Circle_Ymm = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("Circle_Ymm"); task.PT1 = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("DistancePT1");//index=8 PT1=PT2
task.Circle_Xmm = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("Circle_Xmm"); task.PT2 = ProcCall1_PI_PT.GetOutputCtrlParamTuple("DistancePT2");
task.offsetX = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("offsetX"); task.Shanxian = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("Distance3Median");
task.offsetY = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("offsetY"); //task.RowP = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("RowP");
break; task.Circle_Ymm = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("Circle_Ymm");
} task.Circle_Xmm = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("Circle_Xmm");
step = 100; task.offsetX = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("offsetX");
ProcCall1_PI_PT.Dispose(); task.offsetY = (double)ProcCall1_PI_PT.GetOutputCtrlParamTuple("offsetY");
Program1.Dispose(); break;
}
step = 101; step = 100;
task.isSucceed = true; ProcCall1_PI_PT.Dispose();
task.resultInfo = "成功"; Program1.Dispose();
callback(task);
step = 102; step = 101;
} task.isSucceed = true;
Thread.Sleep(5); task.resultInfo = "成功";
} callback(task);
catch (Exception ex) step = 102;
{ }
WarningEvent?.Invoke(WarningEnum.Low, $"SizeLib task err({step}) index({task.index}):"+ ex.Message); Thread.Sleep(5);
task.isSucceed = false; }
task.resultInfo = $"(errcode:{step}):{ex.Message}"; catch (Exception ex)
callback(task); {
} WarningEvent?.Invoke(WarningEnum.Low, $"SizeLib task err({step}) index({task.index}):"+ ex.Message);
} task.isSucceed = false;
} task.resultInfo = $"(errcode:{step}):{ex.Message}";
private void callback(SizeTask task) callback(task);
{ }
//返回成功/失败,异步调用 }
if (task.finishEvent != null || (task.finishEvent = finishEvent) != null) }
//task.finishEvent.BeginInvoke(result, errInfo, res => task.finishEvent.EndInvoke(res), null); private void callback(SizeTask task)
System.Threading.ThreadPool.QueueUserWorkItem(waitCallback, task); {
} //返回成功/失败,异步调用
//异步回调 if (task.finishEvent != null || (task.finishEvent = finishEvent) != null)
WaitCallback waitCallback = new WaitCallback(o => { //task.finishEvent.BeginInvoke(result, errInfo, res => task.finishEvent.EndInvoke(res), null);
var task = (SizeTask)o; System.Threading.ThreadPool.QueueUserWorkItem(waitCallback, task);
task.finishEvent(task); }
}); //异步回调
//=======task list WaitCallback waitCallback = new WaitCallback(o => {
private List<SizeTask> taskList = new List<SizeTask>(); var task = (SizeTask)o;
public class SizeTask task.finishEvent(task);
{ });
public int stepIndex;//只为回调记录当前工序信息 //=======task list
public string processName;//只为回调记录当前工序信息 private List<SizeTask> taskList = new List<SizeTask>();
public class SizeTask
public string engineName,sizeTag; {
/// <summary> public int stepIndex;//只为回调记录当前工序信息
/// 源文件 public string processName;//只为回调记录当前工序信息
/// </summary>
public string file_path; public string engineName,sizeTag;
public double posX,posY; /// <summary>
public Bitmap bmp; /// 源文件
/// </summary>
public string file_path;
public double posX,posY;
public Bitmap bmp;
public string drawingPagePath = "";//.gbx图纸路径 public string drawingPagePath = "";//.gbx图纸路径
//2023-10-27 新增图纸选择pt点位与线宽点位 //2023-10-27 新增图纸选择pt点位与线宽点位
public double[] PTandLinePos; public double[] PTandLinePos;
/// <summary> /// <summary>
/// 比对(index=777); 计算Mark(111/222/333/444); 尺寸(1-9); 轴偏移调整(10,20,30...) /// 比对(index=777); 计算Mark(111/222/333/444); 尺寸(1-9); 轴偏移调整(10,20,30...)
/// </summary> /// </summary>
public int index; //index=8 PT1=PT2 public int index; //index=8 PT1=PT2
/// <summary> /// <summary>
/// 完成后回调 /// 完成后回调
/// </summary> /// </summary>
public Action<SizeTask> finishEvent; public Action<SizeTask> finishEvent;
public long createTime = DateTime.Now.Ticks; public long createTime = DateTime.Now.Ticks;
//==结果返回 //==结果返回
/// <summary> /// <summary>
/// 比对结果(index=777) /// 比对结果(index=777)
/// </summary> /// </summary>
public bool CompResult; public bool CompResult;
public Mat Zoom_Image_mat;//对比打标图:777比对失败时计算得出后面显示到UI 以后修复台用 public Mat Zoom_Image_mat;//对比打标图:777比对失败时计算得出后面显示到UI 以后修复台用
public List<List<string>> defectInfor2RestorationDesk, defectInfor2RestorationDeskPage;//对比未通过坐标信息,合并到缺陷检测中的 //打标缺陷转为图纸的坐标; public List<List<string>> defectInfor2RestorationDesk, defectInfor2RestorationDeskPage;//对比未通过坐标信息,合并到缺陷检测中的 //打标缺陷转为图纸的坐标;
//MARK点 //MARK点
public double[] MarkPointList = { 0, 0, 0, 0, 0, 0, 0, 0 }; public double[] MarkPointList = { 0, 0, 0, 0, 0, 0, 0, 0 };
public HObject ContoursAffineTrans1_Out;//index=333时输出供后面多个777比对时输入使用 public HObject ContoursAffineTrans1_Out;//index=333时输出供后面多个777比对时输入使用
public double[] posePT;//index=3333 && !isEmpty(sizeTag) 才取此数组值len为0时急停 public double[] posePT;//index=3333 && !isEmpty(sizeTag) 才取此数组值len为0时急停
// //
public double PT1,PT2, Shanxian, Circle_Ymm, Circle_Xmm, offsetX, offsetY; public double PT1,PT2, Shanxian, Circle_Ymm, Circle_Xmm, offsetX, offsetY;
public bool isSucceed;//转换是否成功 public bool isSucceed;//转换是否成功
public string resultInfo = "";//成功或失败信息 public string resultInfo = "";//成功或失败信息
} }
public void add(SizeTask task) public void add(SizeTask task)
{ {
lock (taskList) lock (taskList)
taskList.Add(task); taskList.Add(task);
} }
private SizeTask pop() private SizeTask pop()
{ {
lock (taskList) lock (taskList)
{ {
if (taskList.Count < 1) if (taskList.Count < 1)
return null; return null;
var task = taskList[0]; var task = taskList[0];
taskList.RemoveAt(0); taskList.RemoveAt(0);
return task; return task;
} }
} }
public void Dispose() public void Dispose()
{ {
stop(); stop();
} }
/// <summary> /// <summary>
/// Bitmap转HObject灰度图 /// Bitmap转HObject灰度图
/// </summary> /// </summary>
/// <param name="bmp">Bitmap图像</param> /// <param name="bmp">Bitmap图像</param>
/// <param name="image">HObject图像</param> /// <param name="image">HObject图像</param>
private void Bitmap2HObjectBpp8( out HObject image,Bitmap bmp) private void Bitmap2HObjectBpp8( out HObject image,Bitmap bmp)
{ {
try try
{ {
Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height); Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
BitmapData srcBmpData = bmp.LockBits(rect, ImageLockMode.ReadOnly, PixelFormat.Format8bppIndexed); BitmapData srcBmpData = bmp.LockBits(rect, ImageLockMode.ReadOnly, PixelFormat.Format8bppIndexed);
HOperatorSet.GenImage1(out image, "byte", bmp.Width, bmp.Height, srcBmpData.Scan0); HOperatorSet.GenImage1(out image, "byte", bmp.Width, bmp.Height, srcBmpData.Scan0);
bmp.UnlockBits(srcBmpData); bmp.UnlockBits(srcBmpData);
} }
catch (Exception) catch (Exception)
{ {
image = null; image = null;
} }
} }
public void Bitmap2HObjectBpp24( out HObject image, Bitmap bmp) public void Bitmap2HObjectBpp24( out HObject image, Bitmap bmp)
{ {
try try
{ {
Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height); Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
BitmapData srcBmpData = bmp.LockBits(rect, ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb); BitmapData srcBmpData = bmp.LockBits(rect, ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
HOperatorSet.GenImageInterleaved(out image, srcBmpData.Scan0, "bgr", bmp.Width, bmp.Height, 0, "byte", 0, 0, 0, 0, -1, 0); HOperatorSet.GenImageInterleaved(out image, srcBmpData.Scan0, "bgr", bmp.Width, bmp.Height, 0, "byte", 0, 0, 0, 0, -1, 0);
bmp.UnlockBits(srcBmpData); bmp.UnlockBits(srcBmpData);
} }
catch (Exception ex) catch (Exception ex)
{ {
image = null; image = null;
} }
} }
} }
} }

View File

@ -28,75 +28,80 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.btnOK = new System.Windows.Forms.Button(); this.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button(); this.btnCancel = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox(); this.textBox1 = new System.Windows.Forms.TextBox();
this.cobList = new System.Windows.Forms.ComboBox(); this.cobList = new System.Windows.Forms.ComboBox();
this.SuspendLayout(); this.SuspendLayout();
// //
// btnOK // btnOK
// //
this.btnOK.Location = new System.Drawing.Point(358, 85); this.btnOK.Location = new System.Drawing.Point(239, 57);
this.btnOK.Name = "btnOK"; this.btnOK.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnOK.Size = new System.Drawing.Size(80, 30); this.btnOK.Name = "btnOK";
this.btnOK.TabIndex = 0; this.btnOK.Size = new System.Drawing.Size(53, 20);
this.btnOK.Text = "确认"; this.btnOK.TabIndex = 0;
this.btnOK.UseVisualStyleBackColor = true; this.btnOK.Text = "确认";
this.btnOK.Click += new System.EventHandler(this.btnOK_Click); this.btnOK.UseVisualStyleBackColor = true;
// this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
// btnCancel //
// // btnCancel
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; //
this.btnCancel.Location = new System.Drawing.Point(454, 85); this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Name = "btnCancel"; this.btnCancel.Location = new System.Drawing.Point(303, 57);
this.btnCancel.Size = new System.Drawing.Size(80, 30); this.btnCancel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnCancel.TabIndex = 0; this.btnCancel.Name = "btnCancel";
this.btnCancel.Text = "取消"; this.btnCancel.Size = new System.Drawing.Size(53, 20);
this.btnCancel.UseVisualStyleBackColor = true; this.btnCancel.TabIndex = 0;
// this.btnCancel.Text = "取消";
// textBox1 this.btnCancel.UseVisualStyleBackColor = true;
// //
this.textBox1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; // textBox1
this.textBox1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; //
this.textBox1.ImeMode = System.Windows.Forms.ImeMode.Disable; this.textBox1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.textBox1.Location = new System.Drawing.Point(12, 22); this.textBox1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource;
this.textBox1.Name = "textBox1"; this.textBox1.ImeMode = System.Windows.Forms.ImeMode.Disable;
this.textBox1.Size = new System.Drawing.Size(524, 28); this.textBox1.Location = new System.Drawing.Point(8, 15);
this.textBox1.TabIndex = 1; this.textBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
// this.textBox1.Name = "textBox1";
// cobList this.textBox1.Size = new System.Drawing.Size(351, 21);
// this.textBox1.TabIndex = 1;
this.cobList.FlatStyle = System.Windows.Forms.FlatStyle.Popup; //
this.cobList.FormattingEnabled = true; // cobList
this.cobList.Location = new System.Drawing.Point(12, 22); //
this.cobList.Name = "cobList"; this.cobList.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.cobList.Size = new System.Drawing.Size(522, 26); this.cobList.FormattingEnabled = true;
this.cobList.TabIndex = 2; this.cobList.Location = new System.Drawing.Point(8, 15);
// this.cobList.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
// FrmInput this.cobList.Name = "cobList";
// this.cobList.Size = new System.Drawing.Size(349, 20);
this.AcceptButton = this.btnOK; this.cobList.TabIndex = 2;
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F); //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; // FrmInput
this.CancelButton = this.btnCancel; //
this.ClientSize = new System.Drawing.Size(548, 123); this.AcceptButton = this.btnOK;
this.Controls.Add(this.cobList); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.Controls.Add(this.textBox1); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.btnCancel); this.CancelButton = this.btnCancel;
this.Controls.Add(this.btnOK); this.ClientSize = new System.Drawing.Size(365, 82);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Controls.Add(this.cobList);
this.MaximizeBox = false; this.Controls.Add(this.textBox1);
this.MinimizeBox = false; this.Controls.Add(this.btnCancel);
this.Name = "FrmInput"; this.Controls.Add(this.btnOK);
this.ShowIcon = false; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.Text = "请输入"; this.MaximizeBox = false;
this.TopMost = true; this.MinimizeBox = false;
this.Load += new System.EventHandler(this.FrmInput_Load); this.Name = "FrmInput";
this.Shown += new System.EventHandler(this.FrmInput_Shown); this.ShowIcon = false;
this.ResumeLayout(false); this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.PerformLayout(); this.Text = "请输入";
this.TopMost = true;
this.Load += new System.EventHandler(this.FrmInput_Load);
this.Shown += new System.EventHandler(this.FrmInput_Shown);
this.ResumeLayout(false);
this.PerformLayout();
} }
#endregion #endregion

View File

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

View File

@ -44,7 +44,7 @@
// btnLogin // btnLogin
// //
this.btnLogin.Location = new System.Drawing.Point(131, 181); this.btnLogin.Location = new System.Drawing.Point(131, 181);
this.btnLogin.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.btnLogin.Margin = new System.Windows.Forms.Padding(2);
this.btnLogin.Name = "btnLogin"; this.btnLogin.Name = "btnLogin";
this.btnLogin.Size = new System.Drawing.Size(75, 23); this.btnLogin.Size = new System.Drawing.Size(75, 23);
this.btnLogin.TabIndex = 5; this.btnLogin.TabIndex = 5;
@ -56,7 +56,7 @@
// //
this.chkRememberPw.AutoSize = true; this.chkRememberPw.AutoSize = true;
this.chkRememberPw.Location = new System.Drawing.Point(203, 155); this.chkRememberPw.Location = new System.Drawing.Point(203, 155);
this.chkRememberPw.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.chkRememberPw.Margin = new System.Windows.Forms.Padding(2);
this.chkRememberPw.Name = "chkRememberPw"; this.chkRememberPw.Name = "chkRememberPw";
this.chkRememberPw.Size = new System.Drawing.Size(72, 16); this.chkRememberPw.Size = new System.Drawing.Size(72, 16);
this.chkRememberPw.TabIndex = 3; this.chkRememberPw.TabIndex = 3;
@ -68,7 +68,7 @@
// //
this.chkRememberUserCode.AutoSize = true; this.chkRememberUserCode.AutoSize = true;
this.chkRememberUserCode.Location = new System.Drawing.Point(90, 155); this.chkRememberUserCode.Location = new System.Drawing.Point(90, 155);
this.chkRememberUserCode.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.chkRememberUserCode.Margin = new System.Windows.Forms.Padding(2);
this.chkRememberUserCode.Name = "chkRememberUserCode"; this.chkRememberUserCode.Name = "chkRememberUserCode";
this.chkRememberUserCode.Size = new System.Drawing.Size(84, 16); this.chkRememberUserCode.Size = new System.Drawing.Size(84, 16);
this.chkRememberUserCode.TabIndex = 4; this.chkRememberUserCode.TabIndex = 4;
@ -80,7 +80,7 @@
// //
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(0, 1); this.pictureBox1.Location = new System.Drawing.Point(0, 1);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.pictureBox1.Margin = new System.Windows.Forms.Padding(2);
this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(359, 95); this.pictureBox1.Size = new System.Drawing.Size(359, 95);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@ -90,7 +90,7 @@
// txtUserPw // txtUserPw
// //
this.txtUserPw.Location = new System.Drawing.Point(90, 133); this.txtUserPw.Location = new System.Drawing.Point(90, 133);
this.txtUserPw.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.txtUserPw.Margin = new System.Windows.Forms.Padding(2);
this.txtUserPw.MaxLength = 16; this.txtUserPw.MaxLength = 16;
this.txtUserPw.Name = "txtUserPw"; this.txtUserPw.Name = "txtUserPw";
this.txtUserPw.PasswordChar = '*'; this.txtUserPw.PasswordChar = '*';
@ -110,7 +110,7 @@
// txtUserCode // txtUserCode
// //
this.txtUserCode.Location = new System.Drawing.Point(90, 105); this.txtUserCode.Location = new System.Drawing.Point(90, 105);
this.txtUserCode.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.txtUserCode.Margin = new System.Windows.Forms.Padding(2);
this.txtUserCode.Name = "txtUserCode"; this.txtUserCode.Name = "txtUserCode";
this.txtUserCode.Size = new System.Drawing.Size(185, 21); this.txtUserCode.Size = new System.Drawing.Size(185, 21);
this.txtUserCode.TabIndex = 1; this.txtUserCode.TabIndex = 1;
@ -128,7 +128,7 @@
// button2 // button2
// //
this.button2.Location = new System.Drawing.Point(281, 181); this.button2.Location = new System.Drawing.Point(281, 181);
this.button2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.button2.Margin = new System.Windows.Forms.Padding(2);
this.button2.Name = "button2"; this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(56, 23); this.button2.Size = new System.Drawing.Size(56, 23);
this.button2.TabIndex = 9; this.button2.TabIndex = 9;
@ -153,13 +153,13 @@
this.Controls.Add(this.button2); this.Controls.Add(this.button2);
this.Controls.Add(this.btnLogin); this.Controls.Add(this.btnLogin);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.Margin = new System.Windows.Forms.Padding(2);
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "FrmLogin"; this.Name = "FrmLogin";
this.ShowIcon = false; this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "自动化视觉检测系统 - v1.2"; this.Text = "自动化视觉检测系统 - v1.2.1";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FrmLogin_FormClosed); this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FrmLogin_FormClosed);
this.Load += new System.EventHandler(this.FrmLogin_Load); this.Load += new System.EventHandler(this.FrmLogin_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();

View File

@ -30,11 +30,11 @@
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.HToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.HToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -700,7 +700,7 @@
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 80); this.splitContainer1.Location = new System.Drawing.Point(0, 80);
this.splitContainer1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.splitContainer1.Margin = new System.Windows.Forms.Padding(2);
this.splitContainer1.Name = "splitContainer1"; this.splitContainer1.Name = "splitContainer1";
// //
// splitContainer1.Panel1 // splitContainer1.Panel1
@ -730,9 +730,9 @@
this.gpbProcessList.BackColor = System.Drawing.SystemColors.ActiveCaption; this.gpbProcessList.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.gpbProcessList.Controls.Add(this.dgvProcess); this.gpbProcessList.Controls.Add(this.dgvProcess);
this.gpbProcessList.Location = new System.Drawing.Point(2, 202); this.gpbProcessList.Location = new System.Drawing.Point(2, 202);
this.gpbProcessList.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.gpbProcessList.Margin = new System.Windows.Forms.Padding(2);
this.gpbProcessList.Name = "gpbProcessList"; this.gpbProcessList.Name = "gpbProcessList";
this.gpbProcessList.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); this.gpbProcessList.Padding = new System.Windows.Forms.Padding(2);
this.gpbProcessList.Size = new System.Drawing.Size(504, 159); this.gpbProcessList.Size = new System.Drawing.Size(504, 159);
this.gpbProcessList.TabIndex = 3; this.gpbProcessList.TabIndex = 3;
this.gpbProcessList.TabStop = false; this.gpbProcessList.TabStop = false;
@ -742,37 +742,37 @@
// //
this.dgvProcess.AllowUserToAddRows = false; this.dgvProcess.AllowUserToAddRows = false;
this.dgvProcess.AllowUserToDeleteRows = false; this.dgvProcess.AllowUserToDeleteRows = false;
dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control; dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText; dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True; dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dgvProcess.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11; this.dgvProcess.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dgvProcess.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvProcess.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvProcess.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dgvProcess.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCode, this.colCode,
this.colProcessName, this.colProcessName,
this.colValue}); this.colValue});
dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Window; dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.ControlText; dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.False; dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvProcess.DefaultCellStyle = dataGridViewCellStyle14; this.dgvProcess.DefaultCellStyle = dataGridViewCellStyle4;
this.dgvProcess.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvProcess.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvProcess.Location = new System.Drawing.Point(2, 16); this.dgvProcess.Location = new System.Drawing.Point(2, 16);
this.dgvProcess.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.dgvProcess.Margin = new System.Windows.Forms.Padding(2);
this.dgvProcess.MultiSelect = false; this.dgvProcess.MultiSelect = false;
this.dgvProcess.Name = "dgvProcess"; this.dgvProcess.Name = "dgvProcess";
this.dgvProcess.ReadOnly = true; this.dgvProcess.ReadOnly = true;
this.dgvProcess.RowHeadersVisible = false; this.dgvProcess.RowHeadersVisible = false;
this.dgvProcess.RowHeadersWidth = 62; this.dgvProcess.RowHeadersWidth = 62;
dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvProcess.RowsDefaultCellStyle = dataGridViewCellStyle15; this.dgvProcess.RowsDefaultCellStyle = dataGridViewCellStyle5;
this.dgvProcess.RowTemplate.Height = 30; this.dgvProcess.RowTemplate.Height = 30;
this.dgvProcess.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dgvProcess.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgvProcess.Size = new System.Drawing.Size(500, 141); this.dgvProcess.Size = new System.Drawing.Size(500, 141);
@ -792,9 +792,9 @@
// colProcessName // colProcessName
// //
this.colProcessName.DataPropertyName = "ProcessName"; this.colProcessName.DataPropertyName = "ProcessName";
dataGridViewCellStyle12.BackColor = System.Drawing.Color.White; dataGridViewCellStyle2.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.colProcessName.DefaultCellStyle = dataGridViewCellStyle12; this.colProcessName.DefaultCellStyle = dataGridViewCellStyle2;
this.colProcessName.HeaderText = "工序名称"; this.colProcessName.HeaderText = "工序名称";
this.colProcessName.MinimumWidth = 8; this.colProcessName.MinimumWidth = 8;
this.colProcessName.Name = "colProcessName"; this.colProcessName.Name = "colProcessName";
@ -805,8 +805,8 @@
// colValue // colValue
// //
this.colValue.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.colValue.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold); dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold);
this.colValue.DefaultCellStyle = dataGridViewCellStyle13; this.colValue.DefaultCellStyle = dataGridViewCellStyle3;
this.colValue.HeaderText = "内容"; this.colValue.HeaderText = "内容";
this.colValue.MinimumWidth = 8; this.colValue.MinimumWidth = 8;
this.colValue.Name = "colValue"; this.colValue.Name = "colValue";
@ -822,7 +822,7 @@
this.flpnlResultData.Controls.Add(this.kanban5); this.flpnlResultData.Controls.Add(this.kanban5);
this.flpnlResultData.Controls.Add(this.kanban6); this.flpnlResultData.Controls.Add(this.kanban6);
this.flpnlResultData.Location = new System.Drawing.Point(2, 102); this.flpnlResultData.Location = new System.Drawing.Point(2, 102);
this.flpnlResultData.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.flpnlResultData.Margin = new System.Windows.Forms.Padding(2);
this.flpnlResultData.Name = "flpnlResultData"; this.flpnlResultData.Name = "flpnlResultData";
this.flpnlResultData.Size = new System.Drawing.Size(335, 108); this.flpnlResultData.Size = new System.Drawing.Size(335, 108);
this.flpnlResultData.TabIndex = 5; this.flpnlResultData.TabIndex = 5;
@ -838,7 +838,7 @@
this.kanban1.Controls.Add(this.label4); this.kanban1.Controls.Add(this.label4);
this.kanban1.Controls.Add(this.label6); this.kanban1.Controls.Add(this.label6);
this.kanban1.Location = new System.Drawing.Point(2, 2); this.kanban1.Location = new System.Drawing.Point(2, 2);
this.kanban1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.kanban1.Margin = new System.Windows.Forms.Padding(2);
this.kanban1.Name = "kanban1"; this.kanban1.Name = "kanban1";
this.kanban1.Size = new System.Drawing.Size(53, 94); this.kanban1.Size = new System.Drawing.Size(53, 94);
this.kanban1.TabIndex = 14; this.kanban1.TabIndex = 14;
@ -943,7 +943,7 @@
this.kanban2.Controls.Add(this.label7); this.kanban2.Controls.Add(this.label7);
this.kanban2.Controls.Add(this.label12); this.kanban2.Controls.Add(this.label12);
this.kanban2.Location = new System.Drawing.Point(59, 2); this.kanban2.Location = new System.Drawing.Point(59, 2);
this.kanban2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.kanban2.Margin = new System.Windows.Forms.Padding(2);
this.kanban2.Name = "kanban2"; this.kanban2.Name = "kanban2";
this.kanban2.Size = new System.Drawing.Size(53, 94); this.kanban2.Size = new System.Drawing.Size(53, 94);
this.kanban2.TabIndex = 17; this.kanban2.TabIndex = 17;
@ -1048,7 +1048,7 @@
this.kanban3.Controls.Add(this.label9); this.kanban3.Controls.Add(this.label9);
this.kanban3.Controls.Add(this.label15); this.kanban3.Controls.Add(this.label15);
this.kanban3.Location = new System.Drawing.Point(116, 2); this.kanban3.Location = new System.Drawing.Point(116, 2);
this.kanban3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.kanban3.Margin = new System.Windows.Forms.Padding(2);
this.kanban3.Name = "kanban3"; this.kanban3.Name = "kanban3";
this.kanban3.Size = new System.Drawing.Size(53, 94); this.kanban3.Size = new System.Drawing.Size(53, 94);
this.kanban3.TabIndex = 16; this.kanban3.TabIndex = 16;
@ -1153,7 +1153,7 @@
this.kanban4.Controls.Add(this.lblPT); this.kanban4.Controls.Add(this.lblPT);
this.kanban4.Controls.Add(this.label18); this.kanban4.Controls.Add(this.label18);
this.kanban4.Location = new System.Drawing.Point(173, 2); this.kanban4.Location = new System.Drawing.Point(173, 2);
this.kanban4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.kanban4.Margin = new System.Windows.Forms.Padding(2);
this.kanban4.Name = "kanban4"; this.kanban4.Name = "kanban4";
this.kanban4.Size = new System.Drawing.Size(53, 94); this.kanban4.Size = new System.Drawing.Size(53, 94);
this.kanban4.TabIndex = 15; this.kanban4.TabIndex = 15;
@ -1256,7 +1256,7 @@
this.kanban5.Controls.Add(this.lblCompareResult); this.kanban5.Controls.Add(this.lblCompareResult);
this.kanban5.Controls.Add(this.label8); this.kanban5.Controls.Add(this.label8);
this.kanban5.Location = new System.Drawing.Point(230, 2); this.kanban5.Location = new System.Drawing.Point(230, 2);
this.kanban5.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.kanban5.Margin = new System.Windows.Forms.Padding(2);
this.kanban5.Name = "kanban5"; this.kanban5.Name = "kanban5";
this.kanban5.Size = new System.Drawing.Size(53, 94); this.kanban5.Size = new System.Drawing.Size(53, 94);
this.kanban5.TabIndex = 18; this.kanban5.TabIndex = 18;
@ -1335,7 +1335,7 @@
this.kanban6.Controls.Add(this.lblDefectResult); this.kanban6.Controls.Add(this.lblDefectResult);
this.kanban6.Controls.Add(this.label13); this.kanban6.Controls.Add(this.label13);
this.kanban6.Location = new System.Drawing.Point(287, 2); this.kanban6.Location = new System.Drawing.Point(287, 2);
this.kanban6.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.kanban6.Margin = new System.Windows.Forms.Padding(2);
this.kanban6.Name = "kanban6"; this.kanban6.Name = "kanban6";
this.kanban6.Size = new System.Drawing.Size(40, 94); this.kanban6.Size = new System.Drawing.Size(40, 94);
this.kanban6.TabIndex = 19; this.kanban6.TabIndex = 19;
@ -1392,9 +1392,9 @@
this.gpbLog.BackColor = System.Drawing.SystemColors.ActiveCaption; this.gpbLog.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.gpbLog.Controls.Add(this.lstLog); this.gpbLog.Controls.Add(this.lstLog);
this.gpbLog.Location = new System.Drawing.Point(2, 365); this.gpbLog.Location = new System.Drawing.Point(2, 365);
this.gpbLog.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.gpbLog.Margin = new System.Windows.Forms.Padding(2);
this.gpbLog.Name = "gpbLog"; this.gpbLog.Name = "gpbLog";
this.gpbLog.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); this.gpbLog.Padding = new System.Windows.Forms.Padding(2);
this.gpbLog.Size = new System.Drawing.Size(502, 161); this.gpbLog.Size = new System.Drawing.Size(502, 161);
this.gpbLog.TabIndex = 4; this.gpbLog.TabIndex = 4;
this.gpbLog.TabStop = false; this.gpbLog.TabStop = false;
@ -1421,9 +1421,9 @@
this.gpbProductInfo.Controls.Add(this.panel1); this.gpbProductInfo.Controls.Add(this.panel1);
this.gpbProductInfo.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.gpbProductInfo.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.gpbProductInfo.Location = new System.Drawing.Point(2, 2); this.gpbProductInfo.Location = new System.Drawing.Point(2, 2);
this.gpbProductInfo.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.gpbProductInfo.Margin = new System.Windows.Forms.Padding(2);
this.gpbProductInfo.Name = "gpbProductInfo"; this.gpbProductInfo.Name = "gpbProductInfo";
this.gpbProductInfo.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); this.gpbProductInfo.Padding = new System.Windows.Forms.Padding(2);
this.gpbProductInfo.Size = new System.Drawing.Size(504, 98); this.gpbProductInfo.Size = new System.Drawing.Size(504, 98);
this.gpbProductInfo.TabIndex = 2; this.gpbProductInfo.TabIndex = 2;
this.gpbProductInfo.TabStop = false; this.gpbProductInfo.TabStop = false;
@ -1442,7 +1442,7 @@
this.panel1.Controls.Add(this.label1); this.panel1.Controls.Add(this.label1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(2, 16); this.panel1.Location = new System.Drawing.Point(2, 16);
this.panel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.panel1.Margin = new System.Windows.Forms.Padding(2);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(500, 80); this.panel1.Size = new System.Drawing.Size(500, 80);
this.panel1.TabIndex = 0; this.panel1.TabIndex = 0;
@ -1452,7 +1452,7 @@
this.txtBatchId.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.txtBatchId.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.txtBatchId.Location = new System.Drawing.Point(216, 58); this.txtBatchId.Location = new System.Drawing.Point(216, 58);
this.txtBatchId.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.txtBatchId.Margin = new System.Windows.Forms.Padding(2);
this.txtBatchId.Name = "txtBatchId"; this.txtBatchId.Name = "txtBatchId";
this.txtBatchId.ReadOnly = true; this.txtBatchId.ReadOnly = true;
this.txtBatchId.Size = new System.Drawing.Size(282, 21); this.txtBatchId.Size = new System.Drawing.Size(282, 21);
@ -1473,7 +1473,7 @@
this.txtProductCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.txtProductCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.txtProductCode.Location = new System.Drawing.Point(55, 33); this.txtProductCode.Location = new System.Drawing.Point(55, 33);
this.txtProductCode.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.txtProductCode.Margin = new System.Windows.Forms.Padding(2);
this.txtProductCode.Name = "txtProductCode"; this.txtProductCode.Name = "txtProductCode";
this.txtProductCode.ReadOnly = true; this.txtProductCode.ReadOnly = true;
this.txtProductCode.Size = new System.Drawing.Size(444, 21); this.txtProductCode.Size = new System.Drawing.Size(444, 21);
@ -1495,7 +1495,7 @@
this.txtProductSN.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.txtProductSN.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.txtProductSN.Location = new System.Drawing.Point(55, 58); this.txtProductSN.Location = new System.Drawing.Point(55, 58);
this.txtProductSN.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.txtProductSN.Margin = new System.Windows.Forms.Padding(2);
this.txtProductSN.Name = "txtProductSN"; this.txtProductSN.Name = "txtProductSN";
this.txtProductSN.ReadOnly = true; this.txtProductSN.ReadOnly = true;
this.txtProductSN.Size = new System.Drawing.Size(282, 21); this.txtProductSN.Size = new System.Drawing.Size(282, 21);
@ -1516,7 +1516,7 @@
this.txtProductName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.txtProductName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.txtProductName.Location = new System.Drawing.Point(55, 9); this.txtProductName.Location = new System.Drawing.Point(55, 9);
this.txtProductName.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.txtProductName.Margin = new System.Windows.Forms.Padding(2);
this.txtProductName.Name = "txtProductName"; this.txtProductName.Name = "txtProductName";
this.txtProductName.ReadOnly = true; this.txtProductName.ReadOnly = true;
this.txtProductName.Size = new System.Drawing.Size(444, 21); this.txtProductName.Size = new System.Drawing.Size(444, 21);
@ -1540,7 +1540,7 @@
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.IsSplitterFixed = true; this.splitContainer2.IsSplitterFixed = true;
this.splitContainer2.Location = new System.Drawing.Point(0, 0); this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.splitContainer2.Margin = new System.Windows.Forms.Padding(2);
this.splitContainer2.Name = "splitContainer2"; this.splitContainer2.Name = "splitContainer2";
// //
// splitContainer2.Panel1 // splitContainer2.Panel1
@ -1552,7 +1552,7 @@
this.splitContainer2.Panel2.Controls.Add(this.gboxDefectList); this.splitContainer2.Panel2.Controls.Add(this.gboxDefectList);
this.splitContainer2.Panel2MinSize = 400; this.splitContainer2.Panel2MinSize = 400;
this.splitContainer2.Size = new System.Drawing.Size(463, 523); this.splitContainer2.Size = new System.Drawing.Size(463, 523);
this.splitContainer2.SplitterDistance = 25; this.splitContainer2.SplitterDistance = 26;
this.splitContainer2.SplitterWidth = 3; this.splitContainer2.SplitterWidth = 3;
this.splitContainer2.TabIndex = 10; this.splitContainer2.TabIndex = 10;
// //
@ -1561,7 +1561,7 @@
this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer3.IsSplitterFixed = true; this.splitContainer3.IsSplitterFixed = true;
this.splitContainer3.Location = new System.Drawing.Point(0, 0); this.splitContainer3.Location = new System.Drawing.Point(0, 0);
this.splitContainer3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.splitContainer3.Margin = new System.Windows.Forms.Padding(2);
this.splitContainer3.Name = "splitContainer3"; this.splitContainer3.Name = "splitContainer3";
this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal; this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal;
// //
@ -1572,7 +1572,7 @@
// splitContainer3.Panel2 // splitContainer3.Panel2
// //
this.splitContainer3.Panel2.Controls.Add(this.picScanner2); this.splitContainer3.Panel2.Controls.Add(this.picScanner2);
this.splitContainer3.Size = new System.Drawing.Size(25, 523); this.splitContainer3.Size = new System.Drawing.Size(26, 523);
this.splitContainer3.SplitterDistance = 226; this.splitContainer3.SplitterDistance = 226;
this.splitContainer3.SplitterWidth = 3; this.splitContainer3.SplitterWidth = 3;
this.splitContainer3.TabIndex = 11; this.splitContainer3.TabIndex = 11;
@ -1584,9 +1584,9 @@
this.picScanner1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.picScanner1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.picScanner1.Dock = System.Windows.Forms.DockStyle.Fill; this.picScanner1.Dock = System.Windows.Forms.DockStyle.Fill;
this.picScanner1.Location = new System.Drawing.Point(0, 0); this.picScanner1.Location = new System.Drawing.Point(0, 0);
this.picScanner1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.picScanner1.Margin = new System.Windows.Forms.Padding(2);
this.picScanner1.Name = "picScanner1"; this.picScanner1.Name = "picScanner1";
this.picScanner1.Size = new System.Drawing.Size(25, 226); this.picScanner1.Size = new System.Drawing.Size(26, 226);
this.picScanner1.TabIndex = 7; this.picScanner1.TabIndex = 7;
this.picScanner1.TabStop = false; this.picScanner1.TabStop = false;
// //
@ -1596,9 +1596,9 @@
this.picScanner2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.picScanner2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.picScanner2.Dock = System.Windows.Forms.DockStyle.Fill; this.picScanner2.Dock = System.Windows.Forms.DockStyle.Fill;
this.picScanner2.Location = new System.Drawing.Point(0, 0); this.picScanner2.Location = new System.Drawing.Point(0, 0);
this.picScanner2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.picScanner2.Margin = new System.Windows.Forms.Padding(2);
this.picScanner2.Name = "picScanner2"; this.picScanner2.Name = "picScanner2";
this.picScanner2.Size = new System.Drawing.Size(25, 294); this.picScanner2.Size = new System.Drawing.Size(26, 294);
this.picScanner2.TabIndex = 9; this.picScanner2.TabIndex = 9;
this.picScanner2.TabStop = false; this.picScanner2.TabStop = false;
// //
@ -1609,10 +1609,10 @@
this.gboxDefectList.Controls.Add(this.pnlBmpList); this.gboxDefectList.Controls.Add(this.pnlBmpList);
this.gboxDefectList.Dock = System.Windows.Forms.DockStyle.Fill; this.gboxDefectList.Dock = System.Windows.Forms.DockStyle.Fill;
this.gboxDefectList.Location = new System.Drawing.Point(0, 0); this.gboxDefectList.Location = new System.Drawing.Point(0, 0);
this.gboxDefectList.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.gboxDefectList.Margin = new System.Windows.Forms.Padding(2);
this.gboxDefectList.Name = "gboxDefectList"; this.gboxDefectList.Name = "gboxDefectList";
this.gboxDefectList.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); this.gboxDefectList.Padding = new System.Windows.Forms.Padding(2);
this.gboxDefectList.Size = new System.Drawing.Size(435, 523); this.gboxDefectList.Size = new System.Drawing.Size(434, 523);
this.gboxDefectList.TabIndex = 3; this.gboxDefectList.TabIndex = 3;
this.gboxDefectList.TabStop = false; this.gboxDefectList.TabStop = false;
this.gboxDefectList.Tag = "0"; this.gboxDefectList.Tag = "0";
@ -1624,7 +1624,7 @@
this.lblDefectAddTag.AutoSize = true; this.lblDefectAddTag.AutoSize = true;
this.lblDefectAddTag.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblDefectAddTag.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblDefectAddTag.ForeColor = System.Drawing.Color.Blue; this.lblDefectAddTag.ForeColor = System.Drawing.Color.Blue;
this.lblDefectAddTag.Location = new System.Drawing.Point(284, 2); this.lblDefectAddTag.Location = new System.Drawing.Point(283, 2);
this.lblDefectAddTag.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.lblDefectAddTag.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblDefectAddTag.Name = "lblDefectAddTag"; this.lblDefectAddTag.Name = "lblDefectAddTag";
this.lblDefectAddTag.Size = new System.Drawing.Size(0, 12); this.lblDefectAddTag.Size = new System.Drawing.Size(0, 12);
@ -1637,16 +1637,16 @@
this.pnlBmpList.AutoSize = true; this.pnlBmpList.AutoSize = true;
this.pnlBmpList.Dock = System.Windows.Forms.DockStyle.Fill; this.pnlBmpList.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlBmpList.Location = new System.Drawing.Point(2, 16); this.pnlBmpList.Location = new System.Drawing.Point(2, 16);
this.pnlBmpList.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.pnlBmpList.Margin = new System.Windows.Forms.Padding(2);
this.pnlBmpList.Name = "pnlBmpList"; this.pnlBmpList.Name = "pnlBmpList";
this.pnlBmpList.Size = new System.Drawing.Size(431, 505); this.pnlBmpList.Size = new System.Drawing.Size(430, 505);
this.pnlBmpList.TabIndex = 0; this.pnlBmpList.TabIndex = 0;
// //
// chkBuzzer // chkBuzzer
// //
this.chkBuzzer.AutoSize = true; this.chkBuzzer.AutoSize = true;
this.chkBuzzer.Location = new System.Drawing.Point(677, 27); this.chkBuzzer.Location = new System.Drawing.Point(677, 27);
this.chkBuzzer.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.chkBuzzer.Margin = new System.Windows.Forms.Padding(2);
this.chkBuzzer.Name = "chkBuzzer"; this.chkBuzzer.Name = "chkBuzzer";
this.chkBuzzer.Size = new System.Drawing.Size(84, 16); this.chkBuzzer.Size = new System.Drawing.Size(84, 16);
this.chkBuzzer.TabIndex = 13; this.chkBuzzer.TabIndex = 13;
@ -1658,7 +1658,7 @@
// //
this.chkDoorSensor.AutoSize = true; this.chkDoorSensor.AutoSize = true;
this.chkDoorSensor.Location = new System.Drawing.Point(677, 47); this.chkDoorSensor.Location = new System.Drawing.Point(677, 47);
this.chkDoorSensor.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.chkDoorSensor.Margin = new System.Windows.Forms.Padding(2);
this.chkDoorSensor.Name = "chkDoorSensor"; this.chkDoorSensor.Name = "chkDoorSensor";
this.chkDoorSensor.Size = new System.Drawing.Size(96, 16); this.chkDoorSensor.Size = new System.Drawing.Size(96, 16);
this.chkDoorSensor.TabIndex = 14; this.chkDoorSensor.TabIndex = 14;
@ -1673,7 +1673,7 @@
this.btnMakeTags.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnMakeTags.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMakeTags.ForeColor = System.Drawing.Color.Blue; this.btnMakeTags.ForeColor = System.Drawing.Color.Blue;
this.btnMakeTags.Location = new System.Drawing.Point(881, 29); this.btnMakeTags.Location = new System.Drawing.Point(881, 29);
this.btnMakeTags.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.btnMakeTags.Margin = new System.Windows.Forms.Padding(2);
this.btnMakeTags.Name = "btnMakeTags"; this.btnMakeTags.Name = "btnMakeTags";
this.btnMakeTags.Size = new System.Drawing.Size(65, 34); this.btnMakeTags.Size = new System.Drawing.Size(65, 34);
this.btnMakeTags.TabIndex = 15; this.btnMakeTags.TabIndex = 15;
@ -1685,7 +1685,7 @@
// //
this.chkHttpLog.AutoSize = true; this.chkHttpLog.AutoSize = true;
this.chkHttpLog.Location = new System.Drawing.Point(800, 27); this.chkHttpLog.Location = new System.Drawing.Point(800, 27);
this.chkHttpLog.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.chkHttpLog.Margin = new System.Windows.Forms.Padding(2);
this.chkHttpLog.Name = "chkHttpLog"; this.chkHttpLog.Name = "chkHttpLog";
this.chkHttpLog.Size = new System.Drawing.Size(96, 16); this.chkHttpLog.Size = new System.Drawing.Size(96, 16);
this.chkHttpLog.TabIndex = 16; this.chkHttpLog.TabIndex = 16;
@ -1724,10 +1724,10 @@
this.Controls.Add(this.menuStrip1); this.Controls.Add(this.menuStrip1);
this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.MainMenuStrip = this.menuStrip1; this.MainMenuStrip = this.menuStrip1;
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "FrmMain"; this.Name = "FrmMain";
this.ShowIcon = false; this.ShowIcon = false;
this.Text = "自动化视觉检测系统 - v1.2"; this.Text = "自动化视觉检测系统 - v1.2.1";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmMian_FormClosing); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmMian_FormClosing);
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FrmMian_FormClosed); this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FrmMian_FormClosed);

File diff suppressed because it is too large Load Diff

View File

@ -642,21 +642,21 @@
<data name="toolStripButton3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="toolStripButton3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
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
</value> </value>
</data> </data>
<data name="tsbtnDefectImage.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="tsbtnDefectImage.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@ -665,11 +665,11 @@
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAG9SURBVFhHYxgS4F+GuvqvFGVjKJf24KW9KM+nEJnk3+kq YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAG9SURBVFhHYxgS4F+GuvqvFGVjKJf24KW9KM+nEJnk3+kq
x/7nqf//l632H+iA/1+i5f6/DpC89MJVpOiRhQwnVDl1wbH6wmUPAjT/fwyV+Q90wH90B7wLkPr/wlX0 x/7nqf//l632H+iA/1+i5f6/DpC89MJVpOiRhQwnVDl1wbH6wmUPAjT/fwyV+Q90wH90B7wLkPr/wlX0
/0MbgRv3THjVodqoBx6Y8f1/7iRC0AFPbAT/3zfl+nzflCcQqhUveOkm2gtl4gekOOChOf9/kPpHFgIz /0MbgRv3THjVodqoBx6Y8f1/7iRC0AFPbAT/3zfl+nzflCcQqhUveOkm2gtl4gekOOChOf9/kPpHFgIz
gdEmATUCBfzLUlb5Fiu/EeiA/1Ah/IAsB1gK/L/vwPX5pbvo3vfBUu1f4xXSfqcpN/7NUVv3Nlftz7dY gdEmATUCBfzLUlb5Fiu/EeiA/1Ah/IAsB1gK/L/vwPX5pbvo3vfBUu1f4xXSfqcpN/7NUVv3Jlftz7dY
hf80d8AzB+H/rz3F/38Ilv7/LU4BrPdfrhoYjzpg1AGjDhh1wNB3wM9s1ee/UhSv0s0BT92k/l8uDfkP hf80d8AzB+H/rz3F/38Ilv7/LU4BrPdfrhoYjzpg1AGjDhh1wNB3wM9s1ee/UhSv0s0BT92k/l8uDfkP
LM89/tdrsUGlGP6HarG9CZAxA7YHJgMd8JMmDrgU7/Z/44o1/+es34NXwxMrfoOH5tz3qO6A9QdO/1+x LM89/tdrsUGlGP6HarG9CZAxA7YHJgMd8JMmDrgU7/Z/44o1/+es34NXwxMrfoOH5tz3qO6A9QdO/1+x
8yhBB4DAXWNB/vumvDMJOeBLrDyopoyFasMPSHEADDyyEPR4Ziv8BN0BH5LVvv3NUZ32PUZOEaqUMCDH 8yhBB4DAXWNB/vumvDMJOeBLrDyopoyFasMPSHEADDyyEPR4Ziv8BN0BH5LVvv3NUZ32PUZOEaqUMCDH
ATDwzkdS7l2glB/QwuRfmcrG/wrJaDdS4gCqgFEHjDpg3YFT9WAHrNtTDxUaBcMZMDAAAJbA3z1DE0Zi ATDwzkdS7l2glB/QwuRfmcrG/wrJaDdS4gCqgFEHjDpg3YFT9WAHrNtTDxUaBcMZMDAAAIoH3zw7A9x2
AAAAAElFTkSuQmCC AAAAAElFTkSuQmCC
</value> </value>
</data> </data>
@ -677,61 +677,61 @@
<value> <value>
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
TkSuQmCC TkSuQmCC
</value> </value>
</data> </data>
<data name="tsbtnSizeImage.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="tsbtnSizeImage.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHLSURBVFhH7dY9SAJhGMBxJyEIWpuCIGiNLDOXBhssMmyw YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHLSURBVFhH7dY9SAJhGMBxpyAIWpuCIGiN7NOlwQaLDB1s
ITAHLTTIqEEiB6ulqSkIguaoISUKItM+SE/OtK64vpTLMg/D8vSwAsF6sngbKjixNDDuP9299z4vv+Hg CKxBCw00bJCowWppagoCoTlqyIiCyLSE8uQs64qzD+uyzMPQPE/MQLCeNN6GCk4sDYz7T3fvvc/Lbzi4
TlASRYbY2mtDUoRuix/ZQpaf99BaShfD6IEURAcf4UbPQrD3Fg6UgWOXjBjBJFgZ2l7YVi34AtZNQhYA E5REwZF43Z2WFaLb4ke2kxUXfbSKUocxejgBIV0S7jVxuOp/gCOZ73RfTIxirVg52l7Y1k34ItZLQgYA
IV0cvgIIJQVu2RHYmzzn6w2uWjRWuOxiDLxtpzkBzmYc1hqxlEOCd6FRznyKwDS65C4fwNveLakXsFZi fnUUvgIIGQVO8QlYW1wXm437dWiscFmbMXB3nuUE2Ntw2GjCErZWXI5GOTuU+mbRJXf5ALJ7d0RuwDoI
jlSFKtERnwoPJ2tC2viKXxEAtMTdzwDHgLdTqQs17QwbElPxsUw/O/48ETOlrZTxPhPqY6DoAKKLggt1 M6nwV6EjPhUwsLV+VXTNI/UBWuLuZ4BTwLuoxKWStge0sZnoeHooPvkyFTamLNf6SNo/yEDRAYScgktl
FMKGJDDmDLDjAHemNNDGB+ABPIAH8IDSB0QGH6M3+sTJnwFwxQnsjZ5B9iMiJ1UgRI8EpIoUHiopsVtG CAJaFpiJNMQnASLGFND6J+ABPIAH8IDSBwR1ydC9Jub9MwAu9cLe2DlkPiISUgFl6JGAVJBlxzKq2Skm
zDibd9NFAaxrPLC85IF5m4NzYFuK19nr3ZcFB9h29mFxw50T8NamyFfhkOJzOQEaJuXvCKrRGHf5AD7C 5uxtjlRRAJsDLlhZdsHCqo1zYFeE11sbnDcFB6w6DmBpy5kTkG1beFhpE+HmnIABJuHpvlKiMe7yAXyE
ZIQ8+25EvgPYpyxg9kqXqEZbc/cTwEeUmq661jOd9+aMNjkJovDwS/7/jb8BFCQewAOsO17LO8DqsKAl iQlJ5t0IfgewzxnA/K06VoO25u4ngI8oJV19p2F6HifSKnYahAHDa/7/jb8BFCQewAMsDrfpHWCxmdAS
vv+cQPAK+g31RrDqJzoAAAAASUVORK5CYII= 339OIHgD1J71QoDsMyIAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="tsbtnLight.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="tsbtnLight.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
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
D5G/AFoWc7tnHzTjAAAAAElFTkSuQmCC h8hfV8RzuqW13GsAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="tsbtnLog.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="tsbtnLog.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

View File

@ -102,6 +102,8 @@
this.label6 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label();
this.groupBox22 = new System.Windows.Forms.GroupBox(); this.groupBox22 = new System.Windows.Forms.GroupBox();
this.panel22 = new System.Windows.Forms.Panel(); this.panel22 = new System.Windows.Forms.Panel();
this.numOffset = new System.Windows.Forms.NumericUpDown();
this.label7 = new System.Windows.Forms.Label();
this.label61 = new System.Windows.Forms.Label(); this.label61 = new System.Windows.Forms.Label();
this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage1 = new System.Windows.Forms.TabPage();
this.groupBox14 = new System.Windows.Forms.GroupBox(); this.groupBox14 = new System.Windows.Forms.GroupBox();
@ -235,6 +237,7 @@
this.numHttpPort = new System.Windows.Forms.NumericUpDown(); this.numHttpPort = new System.Windows.Forms.NumericUpDown();
this.label49 = new System.Windows.Forms.Label(); this.label49 = new System.Windows.Forms.Label();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.cbOpenFlawDistribution = new System.Windows.Forms.CheckBox();
this.toolStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
@ -263,6 +266,7 @@
this.panel23.SuspendLayout(); this.panel23.SuspendLayout();
this.groupBox22.SuspendLayout(); this.groupBox22.SuspendLayout();
this.panel22.SuspendLayout(); this.panel22.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numOffset)).BeginInit();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
this.groupBox14.SuspendLayout(); this.groupBox14.SuspendLayout();
this.panel14.SuspendLayout(); this.panel14.SuspendLayout();
@ -1210,6 +1214,8 @@
// panel22 // panel22
// //
this.panel22.BackColor = System.Drawing.Color.White; this.panel22.BackColor = System.Drawing.Color.White;
this.panel22.Controls.Add(this.numOffset);
this.panel22.Controls.Add(this.label7);
this.panel22.Controls.Add(this.label61); this.panel22.Controls.Add(this.label61);
this.panel22.Controls.Add(this.cobTension_PortNum); this.panel22.Controls.Add(this.cobTension_PortNum);
this.panel22.Dock = System.Windows.Forms.DockStyle.Fill; this.panel22.Dock = System.Windows.Forms.DockStyle.Fill;
@ -1219,10 +1225,44 @@
this.panel22.Size = new System.Drawing.Size(462, 37); this.panel22.Size = new System.Drawing.Size(462, 37);
this.panel22.TabIndex = 0; this.panel22.TabIndex = 0;
// //
// numOffset
//
this.numOffset.DecimalPlaces = 2;
this.numOffset.Increment = new decimal(new int[] {
1,
0,
0,
131072});
this.numOffset.Location = new System.Drawing.Point(296, 9);
this.numOffset.Margin = new System.Windows.Forms.Padding(2);
this.numOffset.Maximum = new decimal(new int[] {
10,
0,
0,
0});
this.numOffset.Minimum = new decimal(new int[] {
10,
0,
0,
-2147483648});
this.numOffset.Name = "numOffset";
this.numOffset.Size = new System.Drawing.Size(120, 21);
this.numOffset.TabIndex = 13;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(234, 13);
this.label7.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(53, 12);
this.label7.TabIndex = 12;
this.label7.Text = "补偿值:";
//
// label61 // label61
// //
this.label61.AutoSize = true; this.label61.AutoSize = true;
this.label61.Location = new System.Drawing.Point(5, 12); this.label61.Location = new System.Drawing.Point(5, 13);
this.label61.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.label61.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label61.Name = "label61"; this.label61.Name = "label61";
this.label61.Size = new System.Drawing.Size(41, 12); this.label61.Size = new System.Drawing.Size(41, 12);
@ -2687,6 +2727,7 @@
// //
// tabPage9 // tabPage9
// //
this.tabPage9.Controls.Add(this.cbOpenFlawDistribution);
this.tabPage9.Controls.Add(this.ckSkipSizeFailed); this.tabPage9.Controls.Add(this.ckSkipSizeFailed);
this.tabPage9.Controls.Add(this.chkSkipSmallAxis); this.tabPage9.Controls.Add(this.chkSkipSmallAxis);
this.tabPage9.Controls.Add(this.chkSkipScannerCC); this.tabPage9.Controls.Add(this.chkSkipScannerCC);
@ -2703,7 +2744,7 @@
this.tabPage9.Name = "tabPage9"; this.tabPage9.Name = "tabPage9";
this.tabPage9.Size = new System.Drawing.Size(482, 529); this.tabPage9.Size = new System.Drawing.Size(482, 529);
this.tabPage9.TabIndex = 8; this.tabPage9.TabIndex = 8;
this.tabPage9.Text = "传感器过滤"; this.tabPage9.Text = "功能过滤";
this.tabPage9.UseVisualStyleBackColor = true; this.tabPage9.UseVisualStyleBackColor = true;
// //
// ckSkipSizeFailed // ckSkipSizeFailed
@ -2923,6 +2964,17 @@
this.label49.TabIndex = 4; this.label49.TabIndex = 4;
this.label49.Text = "本机IP"; this.label49.Text = "本机IP";
// //
// cbOpenFlawDistribution
//
this.cbOpenFlawDistribution.AutoSize = true;
this.cbOpenFlawDistribution.Location = new System.Drawing.Point(19, 304);
this.cbOpenFlawDistribution.Margin = new System.Windows.Forms.Padding(2);
this.cbOpenFlawDistribution.Name = "cbOpenFlawDistribution";
this.cbOpenFlawDistribution.Size = new System.Drawing.Size(96, 16);
this.cbOpenFlawDistribution.TabIndex = 12;
this.cbOpenFlawDistribution.Text = "启用缺陷分布";
this.cbOpenFlawDistribution.UseVisualStyleBackColor = true;
//
// FrmSysSetting // FrmSysSetting
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@ -2980,6 +3032,7 @@
this.groupBox22.ResumeLayout(false); this.groupBox22.ResumeLayout(false);
this.panel22.ResumeLayout(false); this.panel22.ResumeLayout(false);
this.panel22.PerformLayout(); this.panel22.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numOffset)).EndInit();
this.tabPage1.ResumeLayout(false); this.tabPage1.ResumeLayout(false);
this.groupBox14.ResumeLayout(false); this.groupBox14.ResumeLayout(false);
this.panel14.ResumeLayout(false); this.panel14.ResumeLayout(false);
@ -3271,5 +3324,8 @@
private System.Windows.Forms.Panel panel22; private System.Windows.Forms.Panel panel22;
private System.Windows.Forms.Label label61; private System.Windows.Forms.Label label61;
private System.Windows.Forms.CheckBox ckSkipSizeFailed; private System.Windows.Forms.CheckBox ckSkipSizeFailed;
private System.Windows.Forms.NumericUpDown numOffset;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.CheckBox cbOpenFlawDistribution;
} }
} }

View File

@ -1,465 +1,474 @@
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using ProductionControl.Utils; using ProductionControl.Utils;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using System.Windows.Forms.VisualStyles; using System.Windows.Forms.VisualStyles;
namespace ProductionControl namespace ProductionControl
{ {
public partial class FrmSysSetting : Form public partial class FrmSysSetting : Form
{ {
public FrmSysSetting() public FrmSysSetting()
{ {
InitializeComponent(); InitializeComponent();
} }
private void FrmSetParams_Load(object sender, EventArgs e) private void FrmSetParams_Load(object sender, EventArgs e)
{ {
initData(); initData();
} }
private void initData() private void initData()
{ {
string configPath = Application.StartupPath + "\\SysConfig.ini"; string configPath = Application.StartupPath + "\\SysConfig.ini";
string lsTmp = ""; string lsTmp = "";
var comNameList = Utils.SSerialPort.getPortNames().ToList(); var comNameList = Utils.SSerialPort.getPortNames().ToList();
comNameList.ForEach(comName => comNameList.ForEach(comName =>
{ {
this.cobLight_PortNum.Items.Add(comName); this.cobLight_PortNum.Items.Add(comName);
this.cobTension_PortNum.Items.Add(comName); this.cobTension_PortNum.Items.Add(comName);
this.cobSmallAxis_ComName.Items.Add(comName); this.cobSmallAxis_ComName.Items.Add(comName);
}); });
//Skip //Skip
this.chkSkipAxis0.Checked = Util.ReadIniValue(configPath, "SKIP", "SkipAxis0") == "1"; this.chkSkipAxis0.Checked = Util.ReadIniValue(configPath, "SKIP", "SkipAxis0") == "1";
this.chkSkipAxis1.Checked = Util.ReadIniValue(configPath, "SKIP", "SkipAxis1") == "1"; this.chkSkipAxis1.Checked = Util.ReadIniValue(configPath, "SKIP", "SkipAxis1") == "1";
this.chkSkipAxis2.Checked = Util.ReadIniValue(configPath, "SKIP", "SkipAxis2") == "1"; this.chkSkipAxis2.Checked = Util.ReadIniValue(configPath, "SKIP", "SkipAxis2") == "1";
this.chkSkipAxis3.Checked = Util.ReadIniValue(configPath, "SKIP", "SkipAxis3") == "1"; this.chkSkipAxis3.Checked = Util.ReadIniValue(configPath, "SKIP", "SkipAxis3") == "1";
this.chkSkipTension.Checked = Util.ReadIniValue(configPath, "SKIP", "SkipTension") == "1"; this.chkSkipTension.Checked = Util.ReadIniValue(configPath, "SKIP", "SkipTension") == "1";
this.chkSkipHeight.Checked = Util.ReadIniValue(configPath, "SKIP", "SkipHeight") == "1"; this.chkSkipHeight.Checked = Util.ReadIniValue(configPath, "SKIP", "SkipHeight") == "1";
this.chkSkipLight.Checked = Util.ReadIniValue(configPath, "SKIP", "SkipLight") == "1"; this.chkSkipLight.Checked = Util.ReadIniValue(configPath, "SKIP", "SkipLight") == "1";
this.chkSkipScannerGL.Checked = Util.ReadIniValue(configPath, "SKIP", "SkipScannerGL") == "1"; this.chkSkipScannerGL.Checked = Util.ReadIniValue(configPath, "SKIP", "SkipScannerGL") == "1";
this.chkSkipScannerCC.Checked = Util.ReadIniValue(configPath, "SKIP", "SkipScannerCC") == "1"; this.chkSkipScannerCC.Checked = Util.ReadIniValue(configPath, "SKIP", "SkipScannerCC") == "1";
this.chkSkipSmallAxis.Checked = Util.ReadIniValue(configPath, "SKIP", "SkipSmallAxis") == "1"; this.chkSkipSmallAxis.Checked = Util.ReadIniValue(configPath, "SKIP", "SkipSmallAxis") == "1";
this.ckSkipSizeFailed.Checked = Util.ReadIniValue(configPath, "SKIP", "MarkErrorStop") == "1"; this.ckSkipSizeFailed.Checked = Util.ReadIniValue(configPath, "SKIP", "MarkErrorStop") == "1";
this.cbOpenFlawDistribution.Checked = Util.ReadIniValue(configPath, "SKIP", "OpenFlawDistribution") == "1";
//DEV //DEV
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis0_PulseOutMode"); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis0_PulseOutMode");
EnumUtil.BindToEnumName<AxisPulseOutMode>(this.cobAxis0PulseOutMode, typeof(AxisPulseOutMode), lsTmp == "" ? AxisPulseOutMode.O_CW_CCW : (AxisPulseOutMode)Convert.ToInt32(lsTmp)); EnumUtil.BindToEnumName<AxisPulseOutMode>(this.cobAxis0PulseOutMode, typeof(AxisPulseOutMode), lsTmp == "" ? AxisPulseOutMode.O_CW_CCW : (AxisPulseOutMode)Convert.ToInt32(lsTmp));
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis1_PulseOutMode"); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis1_PulseOutMode");
EnumUtil.BindToEnumName<AxisPulseOutMode>(this.cobAxis1PulseOutMode, typeof(AxisPulseOutMode), lsTmp == "" ? AxisPulseOutMode.O_CW_CCW : (AxisPulseOutMode)Convert.ToInt32(lsTmp)); EnumUtil.BindToEnumName<AxisPulseOutMode>(this.cobAxis1PulseOutMode, typeof(AxisPulseOutMode), lsTmp == "" ? AxisPulseOutMode.O_CW_CCW : (AxisPulseOutMode)Convert.ToInt32(lsTmp));
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis2_PulseOutMode"); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis2_PulseOutMode");
EnumUtil.BindToEnumName<AxisPulseOutMode>(this.cobAxis2PulseOutMode, typeof(AxisPulseOutMode), lsTmp == "" ? AxisPulseOutMode.O_CW_CCW : (AxisPulseOutMode)Convert.ToInt32(lsTmp)); EnumUtil.BindToEnumName<AxisPulseOutMode>(this.cobAxis2PulseOutMode, typeof(AxisPulseOutMode), lsTmp == "" ? AxisPulseOutMode.O_CW_CCW : (AxisPulseOutMode)Convert.ToInt32(lsTmp));
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis3_PulseOutMode"); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis3_PulseOutMode");
EnumUtil.BindToEnumName<AxisPulseOutMode>(this.cobAxis3PulseOutMode, typeof(AxisPulseOutMode), lsTmp == "" ? AxisPulseOutMode.O_CW_CCW : (AxisPulseOutMode)Convert.ToInt32(lsTmp)); EnumUtil.BindToEnumName<AxisPulseOutMode>(this.cobAxis3PulseOutMode, typeof(AxisPulseOutMode), lsTmp == "" ? AxisPulseOutMode.O_CW_CCW : (AxisPulseOutMode)Convert.ToInt32(lsTmp));
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis0_HomeMode"); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis0_HomeMode");
EnumUtil.BindToEnumName<AxitHomeMode>(this.cobAxis0HomeMode, typeof(AxitHomeMode), lsTmp == "" ? AxitHomeMode.MODE11_LmtSearch_Ref : (AxitHomeMode)Convert.ToInt32(lsTmp)); EnumUtil.BindToEnumName<AxitHomeMode>(this.cobAxis0HomeMode, typeof(AxitHomeMode), lsTmp == "" ? AxitHomeMode.MODE11_LmtSearch_Ref : (AxitHomeMode)Convert.ToInt32(lsTmp));
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis1_HomeMode"); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis1_HomeMode");
EnumUtil.BindToEnumName<AxitHomeMode>(this.cobAxis1HomeMode, typeof(AxitHomeMode), lsTmp == "" ? AxitHomeMode.MODE11_LmtSearch_Ref : (AxitHomeMode)Convert.ToInt32(lsTmp)); EnumUtil.BindToEnumName<AxitHomeMode>(this.cobAxis1HomeMode, typeof(AxitHomeMode), lsTmp == "" ? AxitHomeMode.MODE11_LmtSearch_Ref : (AxitHomeMode)Convert.ToInt32(lsTmp));
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis2_HomeMode"); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis2_HomeMode");
EnumUtil.BindToEnumName<AxitHomeMode>(this.cobAxis2HomeMode, typeof(AxitHomeMode), lsTmp == "" ? AxitHomeMode.MODE11_LmtSearch_Ref : (AxitHomeMode)Convert.ToInt32(lsTmp)); EnumUtil.BindToEnumName<AxitHomeMode>(this.cobAxis2HomeMode, typeof(AxitHomeMode), lsTmp == "" ? AxitHomeMode.MODE11_LmtSearch_Ref : (AxitHomeMode)Convert.ToInt32(lsTmp));
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis3_HomeMode"); lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis3_HomeMode");
EnumUtil.BindToEnumName<AxitHomeMode>(this.cobAxis3HomeMode, typeof(AxitHomeMode), lsTmp == "" ? AxitHomeMode.MODE11_LmtSearch_Ref : (AxitHomeMode)Convert.ToInt32(lsTmp)); EnumUtil.BindToEnumName<AxitHomeMode>(this.cobAxis3HomeMode, typeof(AxitHomeMode), lsTmp == "" ? AxitHomeMode.MODE11_LmtSearch_Ref : (AxitHomeMode)Convert.ToInt32(lsTmp));
var lstLightName = Utils.EnumUtil.GetNamesArr<LightDevNameEnum>(); var lstLightName = Utils.EnumUtil.GetNamesArr<LightDevNameEnum>();
this.cobLight_Name.Items.AddRange(lstLightName); this.cobLight_Name.Items.AddRange(lstLightName);
lsTmp = Util.ReadIniValue(configPath, "DEV", "Light_Name"); lsTmp = Util.ReadIniValue(configPath, "DEV", "Light_Name");
if (string.IsNullOrWhiteSpace(lsTmp)) if (string.IsNullOrWhiteSpace(lsTmp))
this.cobLight_Name.SelectedIndex = 0; this.cobLight_Name.SelectedIndex = 0;
else else
this.cobLight_Name.Text = ((LightDevNameEnum)Convert.ToInt32(lsTmp)).ToString(); this.cobLight_Name.Text = ((LightDevNameEnum)Convert.ToInt32(lsTmp)).ToString();
this.cobLight_PortNum.Text = "COM" + Util.ReadIniValue(configPath, "DEV", "Light_PortNum"); this.cobLight_PortNum.Text = "COM" + Util.ReadIniValue(configPath, "DEV", "Light_PortNum");
this.cobTension_PortNum.Text = "COM" + Util.ReadIniValue(configPath, "DEV", "Tension_PortNum"); this.cobTension_PortNum.Text = "COM" + Util.ReadIniValue(configPath, "DEV", "Tension_PortNum");
this.cobSmallAxis_ComName.Text = Util.ReadIniValue(configPath, "DEV", "SmallAxis_ComName"); lsTmp = Util.ReadIniValue(configPath, "DEV", "Tension_Offset");
if (string.IsNullOrWhiteSpace(lsTmp))
this.cobAxis0HomeDir.SelectedIndex = Convert.ToInt32(Util.ReadIniValue(configPath, "DEV", "Axis0_HomeDir")); this.numOffset.Value = 0;
this.cobAxis1HomeDir.SelectedIndex = Convert.ToInt32(Util.ReadIniValue(configPath, "DEV", "Axis1_HomeDir")); else
this.cobAxis2HomeDir.SelectedIndex = Convert.ToInt32(Util.ReadIniValue(configPath, "DEV", "Axis2_HomeDir")); this.numOffset.Value = (decimal)double.Parse(lsTmp);
this.cobAxis3HomeDir.SelectedIndex = Convert.ToInt32(Util.ReadIniValue(configPath, "DEV", "Axis3_HomeDir")); this.cobSmallAxis_ComName.Text = Util.ReadIniValue(configPath, "DEV", "SmallAxis_ComName");
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis_HomeVelLow"); this.cobAxis0HomeDir.SelectedIndex = Convert.ToInt32(Util.ReadIniValue(configPath, "DEV", "Axis0_HomeDir"));
if (!string.IsNullOrWhiteSpace(lsTmp)) this.cobAxis1HomeDir.SelectedIndex = Convert.ToInt32(Util.ReadIniValue(configPath, "DEV", "Axis1_HomeDir"));
{ this.cobAxis2HomeDir.SelectedIndex = Convert.ToInt32(Util.ReadIniValue(configPath, "DEV", "Axis2_HomeDir"));
JArray Axis_HomeVelLow = JArray.Parse(lsTmp); this.cobAxis3HomeDir.SelectedIndex = Convert.ToInt32(Util.ReadIniValue(configPath, "DEV", "Axis3_HomeDir"));
this.numAxis0HomeVelLow.Value = Axis_HomeVelLow.Count > 0 ? (decimal)Axis_HomeVelLow[0] : 0;
this.numAxis1HomeVelLow.Value = Axis_HomeVelLow.Count > 1 ? (decimal)Axis_HomeVelLow[1] : 0; lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis_HomeVelLow");
this.numAxis2HomeVelLow.Value = Axis_HomeVelLow.Count > 2 ? (decimal)Axis_HomeVelLow[2] : 0; if (!string.IsNullOrWhiteSpace(lsTmp))
this.numAxis3HomeVelLow.Value = Axis_HomeVelLow.Count > 3 ? (decimal)Axis_HomeVelLow[3] : 0; {
} JArray Axis_HomeVelLow = JArray.Parse(lsTmp);
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis_HomeVelHigh"); this.numAxis0HomeVelLow.Value = Axis_HomeVelLow.Count > 0 ? (decimal)Axis_HomeVelLow[0] : 0;
if (!string.IsNullOrWhiteSpace(lsTmp)) this.numAxis1HomeVelLow.Value = Axis_HomeVelLow.Count > 1 ? (decimal)Axis_HomeVelLow[1] : 0;
{ this.numAxis2HomeVelLow.Value = Axis_HomeVelLow.Count > 2 ? (decimal)Axis_HomeVelLow[2] : 0;
JArray Axis_HomeVelHigh = JArray.Parse(lsTmp); this.numAxis3HomeVelLow.Value = Axis_HomeVelLow.Count > 3 ? (decimal)Axis_HomeVelLow[3] : 0;
this.numAxis0HomeVelHigh.Value = Axis_HomeVelHigh.Count > 0 ? (decimal)Axis_HomeVelHigh[0] : 0; }
this.numAxis1HomeVelHigh.Value = Axis_HomeVelHigh.Count > 1 ? (decimal)Axis_HomeVelHigh[1] : 0; lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis_HomeVelHigh");
this.numAxis2HomeVelHigh.Value = Axis_HomeVelHigh.Count > 2 ? (decimal)Axis_HomeVelHigh[2] : 0; if (!string.IsNullOrWhiteSpace(lsTmp))
this.numAxis3HomeVelHigh.Value = Axis_HomeVelHigh.Count > 3 ? (decimal)Axis_HomeVelHigh[3] : 0; {
} JArray Axis_HomeVelHigh = JArray.Parse(lsTmp);
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis_HomeAcc"); this.numAxis0HomeVelHigh.Value = Axis_HomeVelHigh.Count > 0 ? (decimal)Axis_HomeVelHigh[0] : 0;
if (!string.IsNullOrWhiteSpace(lsTmp)) this.numAxis1HomeVelHigh.Value = Axis_HomeVelHigh.Count > 1 ? (decimal)Axis_HomeVelHigh[1] : 0;
{ this.numAxis2HomeVelHigh.Value = Axis_HomeVelHigh.Count > 2 ? (decimal)Axis_HomeVelHigh[2] : 0;
JArray Axis_HomeAcc = JArray.Parse(lsTmp); this.numAxis3HomeVelHigh.Value = Axis_HomeVelHigh.Count > 3 ? (decimal)Axis_HomeVelHigh[3] : 0;
this.numAxis0HomeAcc.Value = Axis_HomeAcc.Count > 0 ? (decimal)Axis_HomeAcc[0] : 0; }
this.numAxis1HomeAcc.Value = Axis_HomeAcc.Count > 1 ? (decimal)Axis_HomeAcc[1] : 0; lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis_HomeAcc");
this.numAxis2HomeAcc.Value = Axis_HomeAcc.Count > 2 ? (decimal)Axis_HomeAcc[2] : 0; if (!string.IsNullOrWhiteSpace(lsTmp))
this.numAxis3HomeAcc.Value = Axis_HomeAcc.Count > 3 ? (decimal)Axis_HomeAcc[3] : 0; {
} JArray Axis_HomeAcc = JArray.Parse(lsTmp);
lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis_HomeDec"); this.numAxis0HomeAcc.Value = Axis_HomeAcc.Count > 0 ? (decimal)Axis_HomeAcc[0] : 0;
if (!string.IsNullOrWhiteSpace(lsTmp)) this.numAxis1HomeAcc.Value = Axis_HomeAcc.Count > 1 ? (decimal)Axis_HomeAcc[1] : 0;
{ this.numAxis2HomeAcc.Value = Axis_HomeAcc.Count > 2 ? (decimal)Axis_HomeAcc[2] : 0;
JArray Axis_HomeDec = JArray.Parse(lsTmp); this.numAxis3HomeAcc.Value = Axis_HomeAcc.Count > 3 ? (decimal)Axis_HomeAcc[3] : 0;
this.numAxis0HomeDec.Value = Axis_HomeDec.Count > 0 ? (decimal)Axis_HomeDec[0] : 0; }
this.numAxis1HomeDec.Value = Axis_HomeDec.Count > 1 ? (decimal)Axis_HomeDec[1] : 0; lsTmp = Util.ReadIniValue(configPath, "DEV", "Axis_HomeDec");
this.numAxis2HomeDec.Value = Axis_HomeDec.Count > 2 ? (decimal)Axis_HomeDec[2] : 0; if (!string.IsNullOrWhiteSpace(lsTmp))
this.numAxis3HomeDec.Value = Axis_HomeDec.Count > 3 ? (decimal)Axis_HomeDec[3] : 0; {
} JArray Axis_HomeDec = JArray.Parse(lsTmp);
this.numAxis0HomeDec.Value = Axis_HomeDec.Count > 0 ? (decimal)Axis_HomeDec[0] : 0;
this.txtHeightDev_IP.Text = Util.ReadIniValue(configPath, "DEV", "HeightDev_IP"); this.numAxis1HomeDec.Value = Axis_HomeDec.Count > 1 ? (decimal)Axis_HomeDec[1] : 0;
this.numHeightDev_Port.Value = Convert.ToInt32(Util.ReadIniValue(configPath, "DEV", "HeightDev_Port")); this.numAxis2HomeDec.Value = Axis_HomeDec.Count > 2 ? (decimal)Axis_HomeDec[2] : 0;
this.numHeightDev_SafeValue.Value = Convert.ToDecimal(Util.ReadIniValue(configPath, "DEV", "HeightDev_SafeValue")); this.numAxis3HomeDec.Value = Axis_HomeDec.Count > 3 ? (decimal)Axis_HomeDec[3] : 0;
}
lsTmp = Util.ReadIniValue(configPath, "DEV", "HeightDev_BaseList");
if (!string.IsNullOrWhiteSpace(lsTmp)) this.txtHeightDev_IP.Text = Util.ReadIniValue(configPath, "DEV", "HeightDev_IP");
{ this.numHeightDev_Port.Value = Convert.ToInt32(Util.ReadIniValue(configPath, "DEV", "HeightDev_Port"));
JArray HeightDev_BaseList = JArray.Parse(lsTmp); this.numHeightDev_SafeValue.Value = Convert.ToDecimal(Util.ReadIniValue(configPath, "DEV", "HeightDev_SafeValue"));
this.numHeightBase0.Value = HeightDev_BaseList.Count > 0 ? (decimal)HeightDev_BaseList[0] : 0;
this.numHeightBase1.Value = HeightDev_BaseList.Count > 1 ? (decimal)HeightDev_BaseList[1] : 0; lsTmp = Util.ReadIniValue(configPath, "DEV", "HeightDev_BaseList");
this.numHeightBase2.Value = HeightDev_BaseList.Count > 2 ? (decimal)HeightDev_BaseList[2] : 0; if (!string.IsNullOrWhiteSpace(lsTmp))
this.numHeightBase3.Value = HeightDev_BaseList.Count > 3 ? (decimal)HeightDev_BaseList[3] : 0; {
this.numHeightBase4.Value = HeightDev_BaseList.Count > 4 ? (decimal)HeightDev_BaseList[4] : 0; JArray HeightDev_BaseList = JArray.Parse(lsTmp);
} this.numHeightBase0.Value = HeightDev_BaseList.Count > 0 ? (decimal)HeightDev_BaseList[0] : 0;
this.numHeightBase1.Value = HeightDev_BaseList.Count > 1 ? (decimal)HeightDev_BaseList[1] : 0;
this.txtIO_DevNum.Text = Util.ReadIniValue(configPath, "DEV", "IOCard_DeviceNum"); this.numHeightBase2.Value = HeightDev_BaseList.Count > 2 ? (decimal)HeightDev_BaseList[2] : 0;
this.txtDefect_Path.Text = Util.ReadIniValue(configPath, "DEV", "Defect_SavePath"); this.numHeightBase3.Value = HeightDev_BaseList.Count > 3 ? (decimal)HeightDev_BaseList[3] : 0;
this.txtDefect_Small_Path.Text = Util.ReadIniValue(configPath, "DEV", "Defect_Small_SavePath"); this.numHeightBase4.Value = HeightDev_BaseList.Count > 4 ? (decimal)HeightDev_BaseList[4] : 0;
this.txtDefect_Compress_SavePath.Text = Util.ReadIniValue(configPath, "DEV", "Defect_Compress_SavePath"); }
//int liTmp = -1; this.txtIO_DevNum.Text = Util.ReadIniValue(configPath, "DEV", "IOCard_DeviceNum");
double ldTmp = -1; this.txtDefect_Path.Text = Util.ReadIniValue(configPath, "DEV", "Defect_SavePath");
lsTmp = Util.ReadIniValue(configPath, "DEV", "Defect_SavePath_AutoClear"); this.txtDefect_Small_Path.Text = Util.ReadIniValue(configPath, "DEV", "Defect_Small_SavePath");
//if (Util.IsNumber(lsTmp)) liTmp = Convert.ToInt32(lsTmp); this.txtDefect_Compress_SavePath.Text = Util.ReadIniValue(configPath, "DEV", "Defect_Compress_SavePath");
ldTmp = Convert.ToDouble(lsTmp);
chkDefect_Path_AutoClear.Checked = (ldTmp > -1); //int liTmp = -1;
if (ldTmp > -1) numDefect_Path_AutoClear.Value = (decimal)ldTmp; double ldTmp = -1;
lsTmp = Util.ReadIniValue(configPath, "DEV", "Defect_SavePath_AutoClear");
//if (Util.IsNumber(lsTmp)) liTmp = Convert.ToInt32(lsTmp);
ldTmp = Convert.ToDouble(lsTmp);
chkDefect_Path_AutoClear.Checked = (ldTmp > -1);
if (ldTmp > -1) numDefect_Path_AutoClear.Value = (decimal)ldTmp;
lsTmp = Util.ReadIniValue(configPath, "DEV", "Defect_Compress_SavePath_AutoClear"); lsTmp = Util.ReadIniValue(configPath, "DEV", "Defect_Compress_SavePath_AutoClear");
//if (Util.IsNumber(lsTmp)) liTmp = Convert.ToInt32(lsTmp); //if (Util.IsNumber(lsTmp)) liTmp = Convert.ToInt32(lsTmp);
ldTmp = Convert.ToDouble(lsTmp); ldTmp = Convert.ToDouble(lsTmp);
chkDefect_Compress_SavePath_AutoClear.Checked = (ldTmp > -1); chkDefect_Compress_SavePath_AutoClear.Checked = (ldTmp > -1);
if (ldTmp > -1) numDefect_Compress_SavePath_AutoClear.Value = (decimal)ldTmp; if (ldTmp > -1) numDefect_Compress_SavePath_AutoClear.Value = (decimal)ldTmp;
lsTmp = Util.ReadIniValue(configPath, "DEV", "Defect_Small_SavePath_AutoClear"); lsTmp = Util.ReadIniValue(configPath, "DEV", "Defect_Small_SavePath_AutoClear");
//if (Util.IsNumber(lsTmp)) liTmp = Convert.ToInt32(lsTmp); //if (Util.IsNumber(lsTmp)) liTmp = Convert.ToInt32(lsTmp);
ldTmp = Convert.ToDouble(lsTmp); ldTmp = Convert.ToDouble(lsTmp);
chkDefect_Small_Path_AutoClear.Checked = (ldTmp > -1); chkDefect_Small_Path_AutoClear.Checked = (ldTmp > -1);
if (ldTmp > -1) numDefect_Small_Path_AutoClear.Value = (decimal)ldTmp; if (ldTmp > -1) numDefect_Small_Path_AutoClear.Value = (decimal)ldTmp;
this.chkSaveAllDefectImg.Checked= (Util.ReadIniValue(configPath, "DEV", "SaveAllDefectImg") == "1"); this.chkSaveAllDefectImg.Checked= (Util.ReadIniValue(configPath, "DEV", "SaveAllDefectImg") == "1");
this.chkMakeTag.Checked= (Util.ReadIniValue(configPath, "DEV", "MakeTag") == "1"); this.chkMakeTag.Checked= (Util.ReadIniValue(configPath, "DEV", "MakeTag") == "1");
this.txtSizeEnginePath.Text= Util.ReadIniValue(configPath, "DEV", "SizeEnginePath"); this.txtSizeEnginePath.Text= Util.ReadIniValue(configPath, "DEV", "SizeEnginePath");
this.txtSizeBmp_SavePath.Text = Util.ReadIniValue(configPath, "DEV", "SizeBmp_SavePath"); this.txtSizeBmp_SavePath.Text = Util.ReadIniValue(configPath, "DEV", "SizeBmp_SavePath");
this.txtSizeBmp_Compare_SavePath.Text = Util.ReadIniValue(configPath, "DEV", "SizeBmp_Compare_SavePath"); this.txtSizeBmp_Compare_SavePath.Text = Util.ReadIniValue(configPath, "DEV", "SizeBmp_Compare_SavePath");
this.txtSizeBmp_Zoom_Image_SavePath.Text = Util.ReadIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath"); this.txtSizeBmp_Zoom_Image_SavePath.Text = Util.ReadIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath");
lsTmp = Util.ReadIniValue(configPath, "DEV", "SizeBmp_SavePath_AutoClear"); lsTmp = Util.ReadIniValue(configPath, "DEV", "SizeBmp_SavePath_AutoClear");
//if (Util.IsNumber(lsTmp)) liTmp = Convert.ToInt32(lsTmp); //if (Util.IsNumber(lsTmp)) liTmp = Convert.ToInt32(lsTmp);
ldTmp = Convert.ToDouble(lsTmp); ldTmp = Convert.ToDouble(lsTmp);
chkSizeBmp_SavePath_AutoClear.Checked = (ldTmp > -1); chkSizeBmp_SavePath_AutoClear.Checked = (ldTmp > -1);
if (ldTmp > -1) numSizeBmp_SavePath_AutoClear.Value = (decimal)ldTmp; if (ldTmp > -1) numSizeBmp_SavePath_AutoClear.Value = (decimal)ldTmp;
lsTmp = Util.ReadIniValue(configPath, "DEV", "SizeBmp_Compare_SavePath_AutoClear"); lsTmp = Util.ReadIniValue(configPath, "DEV", "SizeBmp_Compare_SavePath_AutoClear");
//if (Util.IsNumber(lsTmp)) liTmp = Convert.ToInt32(lsTmp); //if (Util.IsNumber(lsTmp)) liTmp = Convert.ToInt32(lsTmp);
ldTmp = Convert.ToDouble(lsTmp); ldTmp = Convert.ToDouble(lsTmp);
chkSizeBmp_Compare_SavePath_AutoClear.Checked = (ldTmp > -1); chkSizeBmp_Compare_SavePath_AutoClear.Checked = (ldTmp > -1);
if (ldTmp > -1) numSizeBmp_Compare_SavePath_AutoClear.Value = (decimal)ldTmp; if (ldTmp > -1) numSizeBmp_Compare_SavePath_AutoClear.Value = (decimal)ldTmp;
lsTmp = Util.ReadIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath_AutoClear"); lsTmp = Util.ReadIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath_AutoClear");
//if (Util.IsNumber(lsTmp)) liTmp = Convert.ToInt32(lsTmp); //if (Util.IsNumber(lsTmp)) liTmp = Convert.ToInt32(lsTmp);
ldTmp = Convert.ToDouble(lsTmp); ldTmp = Convert.ToDouble(lsTmp);
chkSizeBmp_Zoom_Image_SavePath_AutoClear.Checked = (ldTmp > -1); chkSizeBmp_Zoom_Image_SavePath_AutoClear.Checked = (ldTmp > -1);
if (ldTmp > -1) numSizeBmp_Zoom_Image_SavePath_AutoClear.Value = (decimal)ldTmp; if (ldTmp > -1) numSizeBmp_Zoom_Image_SavePath_AutoClear.Value = (decimal)ldTmp;
//DB //DB
this.txtDBCon.Text = Util.ReadIniValue(configPath, "DB", "DBConStr"); this.txtDBCon.Text = Util.ReadIniValue(configPath, "DB", "DBConStr");
//HTTP //HTTP
this.txtLocalIp.Text = Util.ReadIniValue(configPath, "HTTP", "LocalIp"); this.txtLocalIp.Text = Util.ReadIniValue(configPath, "HTTP", "LocalIp");
lsTmp = Util.ReadIniValue(configPath, "HTTP", "LocalHttpPort"); lsTmp = Util.ReadIniValue(configPath, "HTTP", "LocalHttpPort");
if (Util.IsNumber(lsTmp))this.numHttpPort.Value = Convert.ToInt32(lsTmp); if (Util.IsNumber(lsTmp))this.numHttpPort.Value = Convert.ToInt32(lsTmp);
//lsTmp = Util.ReadIniValue(configPath, "HTTP", "LocalSocketPort"); //lsTmp = Util.ReadIniValue(configPath, "HTTP", "LocalSocketPort");
//if (Util.IsNumber(lsTmp)) this.numSocketPort.Value = Convert.ToInt32(lsTmp); //if (Util.IsNumber(lsTmp)) this.numSocketPort.Value = Convert.ToInt32(lsTmp);
//LOG //LOG
this.txtLogPath.Text = Util.ReadIniValue(configPath, "LOG", "LogPath"); this.txtLogPath.Text = Util.ReadIniValue(configPath, "LOG", "LogPath");
} }
private void tsbtnSave_Click(object sender, EventArgs e) private void tsbtnSave_Click(object sender, EventArgs e)
{ {
try try
{ {
string configPath = Application.StartupPath + "\\SysConfig.ini"; string configPath = Application.StartupPath + "\\SysConfig.ini";
//DEV //DEV
string lsLight_Name = this.cobLight_Name.Text.Trim(); string lsLight_Name = this.cobLight_Name.Text.Trim();
if (lsLight_Name == "") if (lsLight_Name == "")
throw new Exception("请选择光源提供商!"); throw new Exception("请选择光源提供商!");
LightDevNameEnum Light_Name = Utils.EnumUtil.Convert2Enum<LightDevNameEnum>(lsLight_Name); LightDevNameEnum Light_Name = Utils.EnumUtil.Convert2Enum<LightDevNameEnum>(lsLight_Name);
string Light_PortNum = this.cobLight_PortNum.Text.Trim(); string Light_PortNum = this.cobLight_PortNum.Text.Trim();
string Tension_PortNum = this.cobTension_PortNum.Text.Trim(); string Tension_PortNum = this.cobTension_PortNum.Text.Trim();
string SmallAxis_ComName = this.cobSmallAxis_ComName.Text.Trim(); decimal Tension_Offset = this.numOffset.Value;
if (Light_PortNum == "" || Tension_PortNum == "" || SmallAxis_ComName == "") string SmallAxis_ComName = this.cobSmallAxis_ComName.Text.Trim();
throw new Exception("请设置设备COM端口"); if (Light_PortNum == "" || Tension_PortNum == "" || SmallAxis_ComName == "")
throw new Exception("请设置设备COM端口");
string HeightDev_IP = this.txtHeightDev_IP.Text;
int HeightDev_Port = (int)this.numHeightDev_Port.Value; string HeightDev_IP = this.txtHeightDev_IP.Text;
if(HeightDev_IP=="") int HeightDev_Port = (int)this.numHeightDev_Port.Value;
throw new Exception("请设置厚度检测设备IP地址"); if(HeightDev_IP=="")
decimal HeightDev_SafeValue=this.numHeightDev_SafeValue.Value; throw new Exception("请设置厚度检测设备IP地址");
decimal HeightDev_SafeValue=this.numHeightDev_SafeValue.Value;
string IOCard_DeviceNum = this.txtIO_DevNum.Text.Trim();
if (IOCard_DeviceNum == "") string IOCard_DeviceNum = this.txtIO_DevNum.Text.Trim();
throw new Exception("请设置I/O设备编号 "); if (IOCard_DeviceNum == "")
throw new Exception("请设置I/O设备编号 ");
string Defect_SavePath = this.txtDefect_Path.Text.Trim();
if (Defect_SavePath == "") string Defect_SavePath = this.txtDefect_Path.Text.Trim();
throw new Exception("请设置缺陷大图保存路径 "); if (Defect_SavePath == "")
string Defect_Compress_SavePath = this.txtDefect_Compress_SavePath.Text.Trim(); throw new Exception("请设置缺陷大图保存路径 ");
if (Defect_Compress_SavePath == "") string Defect_Compress_SavePath = this.txtDefect_Compress_SavePath.Text.Trim();
throw new Exception("请设置缺陷压缩大图保存路径 "); if (Defect_Compress_SavePath == "")
string Defect_Small_SavePath = this.txtDefect_Small_Path.Text.Trim(); throw new Exception("请设置缺陷压缩大图保存路径 ");
//if (Defect_Small_SavePath == "") string Defect_Small_SavePath = this.txtDefect_Small_Path.Text.Trim();
// throw new Exception("请设置缺陷小图保存路径 "); //if (Defect_Small_SavePath == "")
// throw new Exception("请设置缺陷小图保存路径 ");
//DB
string DBConStr = this.txtDBCon.Text.Trim(); //DB
if (DBConStr == "") string DBConStr = this.txtDBCon.Text.Trim();
throw new Exception("请设置DB连接字符串 "); if (DBConStr == "")
//LOG throw new Exception("请设置DB连接字符串 ");
string LogPath = this.txtLogPath.Text.Trim(); //LOG
if (LogPath == "") string LogPath = this.txtLogPath.Text.Trim();
throw new Exception("请设置日志保存路径 "); if (LogPath == "")
throw new Exception("请设置日志保存路径 ");
//最后统一保存
//Skip //最后统一保存
Util.WriteIniValue(configPath, "SKIP", "SkipAxis0", this.chkSkipAxis0.Checked ? "1" : "0"); //Skip
Util.WriteIniValue(configPath, "SKIP", "SkipAxis1", this.chkSkipAxis1.Checked ? "1" : "0"); Util.WriteIniValue(configPath, "SKIP", "SkipAxis0", this.chkSkipAxis0.Checked ? "1" : "0");
Util.WriteIniValue(configPath, "SKIP", "SkipAxis2", this.chkSkipAxis2.Checked ? "1" : "0"); Util.WriteIniValue(configPath, "SKIP", "SkipAxis1", this.chkSkipAxis1.Checked ? "1" : "0");
Util.WriteIniValue(configPath, "SKIP", "SkipAxis3", this.chkSkipAxis3.Checked ? "1" : "0"); Util.WriteIniValue(configPath, "SKIP", "SkipAxis2", this.chkSkipAxis2.Checked ? "1" : "0");
Util.WriteIniValue(configPath, "SKIP", "SkipTension", this.chkSkipTension.Checked ? "1" : "0"); Util.WriteIniValue(configPath, "SKIP", "SkipAxis3", this.chkSkipAxis3.Checked ? "1" : "0");
Util.WriteIniValue(configPath, "SKIP", "SkipHeight", this.chkSkipHeight.Checked ? "1" : "0"); Util.WriteIniValue(configPath, "SKIP", "SkipTension", this.chkSkipTension.Checked ? "1" : "0");
Util.WriteIniValue(configPath, "SKIP", "SkipLight", this.chkSkipLight.Checked ? "1" : "0"); Util.WriteIniValue(configPath, "SKIP", "SkipHeight", this.chkSkipHeight.Checked ? "1" : "0");
Util.WriteIniValue(configPath, "SKIP", "SkipScannerGL", this.chkSkipScannerGL.Checked ? "1" : "0"); Util.WriteIniValue(configPath, "SKIP", "SkipLight", this.chkSkipLight.Checked ? "1" : "0");
Util.WriteIniValue(configPath, "SKIP", "SkipScannerCC", this.chkSkipScannerCC.Checked ? "1" : "0"); Util.WriteIniValue(configPath, "SKIP", "SkipScannerGL", this.chkSkipScannerGL.Checked ? "1" : "0");
Util.WriteIniValue(configPath, "SKIP", "SkipSmallAxis", this.chkSkipSmallAxis.Checked ? "1" : "0"); Util.WriteIniValue(configPath, "SKIP", "SkipScannerCC", this.chkSkipScannerCC.Checked ? "1" : "0");
Util.WriteIniValue(configPath, "SKIP", "SkipSmallAxis", this.chkSkipSmallAxis.Checked ? "1" : "0");
Util.WriteIniValue(configPath, "SKIP", "MarkErrorStop", this.ckSkipSizeFailed.Checked ? "1" : "0");
Util.WriteIniValue(configPath, "SKIP", "MarkErrorStop", this.ckSkipSizeFailed.Checked ? "1" : "0");
//DEV Util.WriteIniValue(configPath, "SKIP", "OpenFlawDistribution", this.cbOpenFlawDistribution.Checked ? "1" : "0");
Utils.Util.WriteIniValue(configPath, "DEV", "Axis0_PulseOutMode", ((int)EnumUtil.GetSelectedItemToEnum<AxisPulseOutMode>(this.cobAxis0PulseOutMode)).ToString()); //DEV
Utils.Util.WriteIniValue(configPath, "DEV", "Axis1_PulseOutMode", ((int)EnumUtil.GetSelectedItemToEnum<AxisPulseOutMode>(this.cobAxis1PulseOutMode)).ToString()); Utils.Util.WriteIniValue(configPath, "DEV", "Axis0_PulseOutMode", ((int)EnumUtil.GetSelectedItemToEnum<AxisPulseOutMode>(this.cobAxis0PulseOutMode)).ToString());
Utils.Util.WriteIniValue(configPath, "DEV", "Axis2_PulseOutMode", ((int)EnumUtil.GetSelectedItemToEnum<AxisPulseOutMode>(this.cobAxis2PulseOutMode)).ToString()); Utils.Util.WriteIniValue(configPath, "DEV", "Axis1_PulseOutMode", ((int)EnumUtil.GetSelectedItemToEnum<AxisPulseOutMode>(this.cobAxis1PulseOutMode)).ToString());
Utils.Util.WriteIniValue(configPath, "DEV", "Axis3_PulseOutMode", ((int)EnumUtil.GetSelectedItemToEnum<AxisPulseOutMode>(this.cobAxis3PulseOutMode)).ToString()); Utils.Util.WriteIniValue(configPath, "DEV", "Axis2_PulseOutMode", ((int)EnumUtil.GetSelectedItemToEnum<AxisPulseOutMode>(this.cobAxis2PulseOutMode)).ToString());
Utils.Util.WriteIniValue(configPath, "DEV", "Axis3_PulseOutMode", ((int)EnumUtil.GetSelectedItemToEnum<AxisPulseOutMode>(this.cobAxis3PulseOutMode)).ToString());
Utils.Util.WriteIniValue(configPath, "DEV", "Axis0_HomeMode", ((int)EnumUtil.GetSelectedItemToEnum<AxitHomeMode>(this.cobAxis0HomeMode)).ToString());
Utils.Util.WriteIniValue(configPath, "DEV", "Axis1_HomeMode", ((int)EnumUtil.GetSelectedItemToEnum<AxitHomeMode>(this.cobAxis1HomeMode)).ToString()); Utils.Util.WriteIniValue(configPath, "DEV", "Axis0_HomeMode", ((int)EnumUtil.GetSelectedItemToEnum<AxitHomeMode>(this.cobAxis0HomeMode)).ToString());
Utils.Util.WriteIniValue(configPath, "DEV", "Axis2_HomeMode", ((int)EnumUtil.GetSelectedItemToEnum<AxitHomeMode>(this.cobAxis2HomeMode)).ToString()); Utils.Util.WriteIniValue(configPath, "DEV", "Axis1_HomeMode", ((int)EnumUtil.GetSelectedItemToEnum<AxitHomeMode>(this.cobAxis1HomeMode)).ToString());
Utils.Util.WriteIniValue(configPath, "DEV", "Axis3_HomeMode", ((int)EnumUtil.GetSelectedItemToEnum<AxitHomeMode>(this.cobAxis3HomeMode)).ToString()); Utils.Util.WriteIniValue(configPath, "DEV", "Axis2_HomeMode", ((int)EnumUtil.GetSelectedItemToEnum<AxitHomeMode>(this.cobAxis2HomeMode)).ToString());
Utils.Util.WriteIniValue(configPath, "DEV", "Axis3_HomeMode", ((int)EnumUtil.GetSelectedItemToEnum<AxitHomeMode>(this.cobAxis3HomeMode)).ToString());
Utils.Util.WriteIniValue(configPath, "DEV", "Axis0_HomeDir", this.cobAxis0HomeDir.SelectedIndex.ToString());
Utils.Util.WriteIniValue(configPath, "DEV", "Axis1_HomeDir", this.cobAxis1HomeDir.SelectedIndex.ToString()); Utils.Util.WriteIniValue(configPath, "DEV", "Axis0_HomeDir", this.cobAxis0HomeDir.SelectedIndex.ToString());
Utils.Util.WriteIniValue(configPath, "DEV", "Axis2_HomeDir", this.cobAxis2HomeDir.SelectedIndex.ToString()); Utils.Util.WriteIniValue(configPath, "DEV", "Axis1_HomeDir", this.cobAxis1HomeDir.SelectedIndex.ToString());
Utils.Util.WriteIniValue(configPath, "DEV", "Axis3_HomeDir", this.cobAxis3HomeDir.SelectedIndex.ToString()); Utils.Util.WriteIniValue(configPath, "DEV", "Axis2_HomeDir", this.cobAxis2HomeDir.SelectedIndex.ToString());
Utils.Util.WriteIniValue(configPath, "DEV", "Axis3_HomeDir", this.cobAxis3HomeDir.SelectedIndex.ToString());
JArray HeightDev_BaseList = new JArray()
{ JArray HeightDev_BaseList = new JArray()
numHeightBase0.Value,numHeightBase1.Value,numHeightBase2.Value,numHeightBase3.Value,numHeightBase4.Value {
}; numHeightBase0.Value,numHeightBase1.Value,numHeightBase2.Value,numHeightBase3.Value,numHeightBase4.Value
Utils.Util.WriteIniValue(configPath, "DEV", "HeightDev_BaseList", HeightDev_BaseList.ToString().Replace("\r\n", "")); };
Utils.Util.WriteIniValue(configPath, "DEV", "HeightDev_BaseList", HeightDev_BaseList.ToString().Replace("\r\n", ""));
Utils.Util.WriteIniValue(configPath, "DEV", "Light_Name", ""+(int)Light_Name);
Utils.Util.WriteIniValue(configPath, "DEV", "Light_PortNum", Light_PortNum.Substring(3)); Utils.Util.WriteIniValue(configPath, "DEV", "Light_Name", ""+(int)Light_Name);
Utils.Util.WriteIniValue(configPath, "DEV", "Tension_PortNum", Tension_PortNum.Substring(3)); Utils.Util.WriteIniValue(configPath, "DEV", "Light_PortNum", Light_PortNum.Substring(3));
Utils.Util.WriteIniValue(configPath, "DEV", "SmallAxis_ComName", SmallAxis_ComName); Utils.Util.WriteIniValue(configPath, "DEV", "Tension_PortNum", Tension_PortNum.Substring(3));
Utils.Util.WriteIniValue(configPath, "DEV", "Tension_Offset", Tension_Offset.ToString());
Utils.Util.WriteIniValue(configPath, "DEV", "HeightDev_IP", HeightDev_IP);
Utils.Util.WriteIniValue(configPath, "DEV", "HeightDev_Port", HeightDev_Port.ToString()); Utils.Util.WriteIniValue(configPath, "DEV", "SmallAxis_ComName", SmallAxis_ComName);
Utils.Util.WriteIniValue(configPath, "DEV", "HeightDev_SafeValue", HeightDev_SafeValue.ToString());
JArray Axis_HomeVelLow = new JArray() Utils.Util.WriteIniValue(configPath, "DEV", "HeightDev_IP", HeightDev_IP);
{ Utils.Util.WriteIniValue(configPath, "DEV", "HeightDev_Port", HeightDev_Port.ToString());
numAxis0HomeVelLow.Value,numAxis1HomeVelLow.Value,numAxis2HomeVelLow.Value,numAxis3HomeVelLow.Value Utils.Util.WriteIniValue(configPath, "DEV", "HeightDev_SafeValue", HeightDev_SafeValue.ToString());
}; JArray Axis_HomeVelLow = new JArray()
Utils.Util.WriteIniValue(configPath, "DEV", "Axis_HomeVelLow", Axis_HomeVelLow.ToString().Replace("\r\n","")); {
numAxis0HomeVelLow.Value,numAxis1HomeVelLow.Value,numAxis2HomeVelLow.Value,numAxis3HomeVelLow.Value
JArray Axis_HomeVelHigh = new JArray() };
{ Utils.Util.WriteIniValue(configPath, "DEV", "Axis_HomeVelLow", Axis_HomeVelLow.ToString().Replace("\r\n",""));
numAxis0HomeVelHigh.Value,numAxis1HomeVelHigh.Value,numAxis2HomeVelHigh.Value,numAxis3HomeVelHigh.Value
}; JArray Axis_HomeVelHigh = new JArray()
Utils.Util.WriteIniValue(configPath, "DEV", "Axis_HomeVelHigh", Axis_HomeVelHigh.ToString().Replace("\r\n", "")); {
numAxis0HomeVelHigh.Value,numAxis1HomeVelHigh.Value,numAxis2HomeVelHigh.Value,numAxis3HomeVelHigh.Value
JArray Axis_HomeAcc = new JArray() };
{ Utils.Util.WriteIniValue(configPath, "DEV", "Axis_HomeVelHigh", Axis_HomeVelHigh.ToString().Replace("\r\n", ""));
numAxis0HomeAcc.Value,numAxis1HomeAcc.Value,numAxis2HomeAcc.Value,numAxis3HomeAcc.Value
}; JArray Axis_HomeAcc = new JArray()
Utils.Util.WriteIniValue(configPath, "DEV", "Axis_HomeAcc", Axis_HomeAcc.ToString().Replace("\r\n", "")); {
numAxis0HomeAcc.Value,numAxis1HomeAcc.Value,numAxis2HomeAcc.Value,numAxis3HomeAcc.Value
JArray Axis_HomeDec = new JArray() };
{ Utils.Util.WriteIniValue(configPath, "DEV", "Axis_HomeAcc", Axis_HomeAcc.ToString().Replace("\r\n", ""));
numAxis0HomeDec.Value,numAxis1HomeDec.Value,numAxis2HomeDec.Value,numAxis3HomeDec.Value
}; JArray Axis_HomeDec = new JArray()
Utils.Util.WriteIniValue(configPath, "DEV", "Axis_HomeDec", Axis_HomeDec.ToString().Replace("\r\n", "")); {
numAxis0HomeDec.Value,numAxis1HomeDec.Value,numAxis2HomeDec.Value,numAxis3HomeDec.Value
Utils.Util.WriteIniValue(configPath, "DEV", "IOCard_DeviceNum", IOCard_DeviceNum); };
Utils.Util.WriteIniValue(configPath, "DEV", "Axis_HomeDec", Axis_HomeDec.ToString().Replace("\r\n", ""));
Utils.Util.WriteIniValue(configPath, "DEV", "Defect_SavePath", Defect_SavePath);
Utils.Util.WriteIniValue(configPath, "DEV", "Defect_SavePath_AutoClear", (chkDefect_Path_AutoClear.Checked ? (double)numDefect_Path_AutoClear.Value : -1)+""); Utils.Util.WriteIniValue(configPath, "DEV", "IOCard_DeviceNum", IOCard_DeviceNum);
Utils.Util.WriteIniValue(configPath, "DEV", "Defect_Compress_SavePath", Defect_Compress_SavePath);
Utils.Util.WriteIniValue(configPath, "DEV", "Defect_Compress_SavePath_AutoClear", (chkDefect_Compress_SavePath_AutoClear.Checked ? (double)numDefect_Compress_SavePath_AutoClear.Value : -1) + ""); Utils.Util.WriteIniValue(configPath, "DEV", "Defect_SavePath", Defect_SavePath);
Utils.Util.WriteIniValue(configPath, "DEV", "Defect_Small_SavePath", Defect_Small_SavePath); Utils.Util.WriteIniValue(configPath, "DEV", "Defect_SavePath_AutoClear", (chkDefect_Path_AutoClear.Checked ? (double)numDefect_Path_AutoClear.Value : -1)+"");
Utils.Util.WriteIniValue(configPath, "DEV", "Defect_Small_SavePath_AutoClear", (chkDefect_Small_Path_AutoClear.Checked ? (double)numDefect_Small_Path_AutoClear.Value : -1) + ""); Utils.Util.WriteIniValue(configPath, "DEV", "Defect_Compress_SavePath", Defect_Compress_SavePath);
Utils.Util.WriteIniValue(configPath, "DEV", "Defect_Compress_SavePath_AutoClear", (chkDefect_Compress_SavePath_AutoClear.Checked ? (double)numDefect_Compress_SavePath_AutoClear.Value : -1) + "");
Utils.Util.WriteIniValue(configPath, "DEV", "SaveAllDefectImg", this.chkSaveAllDefectImg.Checked ? "1" : "0"); Utils.Util.WriteIniValue(configPath, "DEV", "Defect_Small_SavePath", Defect_Small_SavePath);
Utils.Util.WriteIniValue(configPath, "DEV", "MakeTag", this.chkMakeTag.Checked ? "1" : "0"); Utils.Util.WriteIniValue(configPath, "DEV", "Defect_Small_SavePath_AutoClear", (chkDefect_Small_Path_AutoClear.Checked ? (double)numDefect_Small_Path_AutoClear.Value : -1) + "");
Utils.Util.WriteIniValue(configPath, "DEV", "SizeEnginePath", this.txtSizeEnginePath.Text.Trim());
Utils.Util.WriteIniValue(configPath, "DEV", "SizeBmp_SavePath", this.txtSizeBmp_SavePath.Text.Trim()); Utils.Util.WriteIniValue(configPath, "DEV", "SaveAllDefectImg", this.chkSaveAllDefectImg.Checked ? "1" : "0");
Utils.Util.WriteIniValue(configPath, "DEV", "SizeBmp_SavePath_AutoClear", (chkSizeBmp_SavePath_AutoClear.Checked ? (double)numSizeBmp_SavePath_AutoClear.Value : -1) + ""); Utils.Util.WriteIniValue(configPath, "DEV", "MakeTag", this.chkMakeTag.Checked ? "1" : "0");
Utils.Util.WriteIniValue(configPath, "DEV", "SizeBmp_Compare_SavePath", this.txtSizeBmp_Compare_SavePath.Text.Trim()); Utils.Util.WriteIniValue(configPath, "DEV", "SizeEnginePath", this.txtSizeEnginePath.Text.Trim());
Utils.Util.WriteIniValue(configPath, "DEV", "SizeBmp_Compare_SavePath_AutoClear", (chkSizeBmp_Compare_SavePath_AutoClear.Checked ? (double)numSizeBmp_Compare_SavePath_AutoClear.Value : -1) + ""); Utils.Util.WriteIniValue(configPath, "DEV", "SizeBmp_SavePath", this.txtSizeBmp_SavePath.Text.Trim());
Utils.Util.WriteIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath", this.txtSizeBmp_Zoom_Image_SavePath.Text.Trim()); Utils.Util.WriteIniValue(configPath, "DEV", "SizeBmp_SavePath_AutoClear", (chkSizeBmp_SavePath_AutoClear.Checked ? (double)numSizeBmp_SavePath_AutoClear.Value : -1) + "");
Utils.Util.WriteIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath_AutoClear", (chkSizeBmp_Zoom_Image_SavePath_AutoClear.Checked ? (double)numSizeBmp_Zoom_Image_SavePath_AutoClear.Value : -1) + ""); Utils.Util.WriteIniValue(configPath, "DEV", "SizeBmp_Compare_SavePath", this.txtSizeBmp_Compare_SavePath.Text.Trim());
//DB Utils.Util.WriteIniValue(configPath, "DEV", "SizeBmp_Compare_SavePath_AutoClear", (chkSizeBmp_Compare_SavePath_AutoClear.Checked ? (double)numSizeBmp_Compare_SavePath_AutoClear.Value : -1) + "");
Utils.Util.WriteIniValue(configPath, "DB", "DBConStr", DBConStr); Utils.Util.WriteIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath", this.txtSizeBmp_Zoom_Image_SavePath.Text.Trim());
//HTTP Utils.Util.WriteIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath_AutoClear", (chkSizeBmp_Zoom_Image_SavePath_AutoClear.Checked ? (double)numSizeBmp_Zoom_Image_SavePath_AutoClear.Value : -1) + "");
Utils.Util.WriteIniValue(configPath, "HTTP", "LocalIp",this.txtLocalIp.Text.Trim()); //DB
Utils.Util.WriteIniValue(configPath, "HTTP", "LocalHttpPort", this.numHttpPort.Value.ToString()); Utils.Util.WriteIniValue(configPath, "DB", "DBConStr", DBConStr);
//LOG //HTTP
Utils.Util.WriteIniValue(configPath, "LOG", "LogPath", LogPath); Utils.Util.WriteIniValue(configPath, "HTTP", "LocalIp",this.txtLocalIp.Text.Trim());
Utils.Util.WriteIniValue(configPath, "HTTP", "LocalHttpPort", this.numHttpPort.Value.ToString());
// //LOG
this.Hide(); Utils.Util.WriteIniValue(configPath, "LOG", "LogPath", LogPath);
MessageBox.Show("保存成功,生效需重启程序!");
this.Close();
} //
catch (Exception ex) this.Hide();
{ MessageBox.Show("保存成功,生效需重启程序!");
MessageBox.Show(ex.Message, "失败", MessageBoxButtons.OK, MessageBoxIcon.Error); this.Close();
} }
} catch (Exception ex)
{
private void tsbtnClose_Click(object sender, EventArgs e) MessageBox.Show(ex.Message, "失败", MessageBoxButtons.OK, MessageBoxIcon.Error);
{ }
this.Close(); }
}
private void tsbtnClose_Click(object sender, EventArgs e)
private void txtDefect_Path_Click(object sender, EventArgs e) {
{ this.Close();
string path = FileUtil.selectFolder(Application.StartupPath); }
if (!string.IsNullOrWhiteSpace(path))
this.txtDefect_Path.Text = path; private void txtDefect_Path_Click(object sender, EventArgs e)
} {
string path = FileUtil.selectFolder(Application.StartupPath);
if (!string.IsNullOrWhiteSpace(path))
private void txtLogPath_Click(object sender, EventArgs e) this.txtDefect_Path.Text = path;
{ }
string path = FileUtil.selectFolder(Application.StartupPath);
if (!string.IsNullOrWhiteSpace(path))
this.txtLogPath.Text = path; private void txtLogPath_Click(object sender, EventArgs e)
} {
private void txtSizeEnginePath_Click(object sender, EventArgs e) string path = FileUtil.selectFolder(Application.StartupPath);
{ if (!string.IsNullOrWhiteSpace(path))
string path = FileUtil.selectFolder(Application.StartupPath); this.txtLogPath.Text = path;
if (!string.IsNullOrWhiteSpace(path)) }
this.txtSizeEnginePath.Text = path; private void txtSizeEnginePath_Click(object sender, EventArgs e)
} {
string path = FileUtil.selectFolder(Application.StartupPath);
private void txtSizeBmp_Path_Click(object sender, EventArgs e) if (!string.IsNullOrWhiteSpace(path))
{ this.txtSizeEnginePath.Text = path;
string path = FileUtil.selectFolder(Application.StartupPath); }
if (!string.IsNullOrWhiteSpace(path))
this.txtSizeBmp_SavePath.Text = path; private void txtSizeBmp_Path_Click(object sender, EventArgs e)
} {
private void txtSizeBmp_Compare_SavePath_Click(object sender, EventArgs e) string path = FileUtil.selectFolder(Application.StartupPath);
{ if (!string.IsNullOrWhiteSpace(path))
string path = FileUtil.selectFolder(Application.StartupPath); this.txtSizeBmp_SavePath.Text = path;
if (!string.IsNullOrWhiteSpace(path)) }
this.txtSizeBmp_Compare_SavePath.Text = path; private void txtSizeBmp_Compare_SavePath_Click(object sender, EventArgs e)
} {
private void txtSizeBmp_Zoom_Image_SavePath_Click(object sender, EventArgs e) string path = FileUtil.selectFolder(Application.StartupPath);
{ if (!string.IsNullOrWhiteSpace(path))
string path = FileUtil.selectFolder(Application.StartupPath); this.txtSizeBmp_Compare_SavePath.Text = path;
if (!string.IsNullOrWhiteSpace(path)) }
this.txtSizeBmp_Zoom_Image_SavePath.Text = path; private void txtSizeBmp_Zoom_Image_SavePath_Click(object sender, EventArgs e)
} {
private void txtDefect_Small_Path_Click(object sender, EventArgs e) string path = FileUtil.selectFolder(Application.StartupPath);
{ if (!string.IsNullOrWhiteSpace(path))
string path = FileUtil.selectFolder(Application.StartupPath); this.txtSizeBmp_Zoom_Image_SavePath.Text = path;
if (!string.IsNullOrWhiteSpace(path)) }
this.txtDefect_Small_Path.Text = path; private void txtDefect_Small_Path_Click(object sender, EventArgs e)
} {
private void txtDefect_Compress_SavePath_Click(object sender, EventArgs e) string path = FileUtil.selectFolder(Application.StartupPath);
{ if (!string.IsNullOrWhiteSpace(path))
string path = FileUtil.selectFolder(Application.StartupPath); this.txtDefect_Small_Path.Text = path;
if (!string.IsNullOrWhiteSpace(path)) }
this.txtDefect_Compress_SavePath.Text = path; private void txtDefect_Compress_SavePath_Click(object sender, EventArgs e)
} {
string path = FileUtil.selectFolder(Application.StartupPath);
private void btnClearDefect_Small_Path_Click(object sender, EventArgs e) if (!string.IsNullOrWhiteSpace(path))
{ this.txtDefect_Compress_SavePath.Text = path;
this.txtDefect_Small_Path.Text = ""; }
}
private void btnClearDefect_Small_Path_Click(object sender, EventArgs e)
private void btnClearDefect_Path_Click(object sender, EventArgs e) {
{ this.txtDefect_Small_Path.Text = "";
this.txtDefect_Path.Text = ""; }
}
private void btnClearDefect_Path_Click(object sender, EventArgs e)
private void btnClearDefect_Compress_SavePath_Click(object sender, EventArgs e) {
{ this.txtDefect_Path.Text = "";
txtDefect_Compress_SavePath.Text = ""; }
}
private void btnClearDefect_Compress_SavePath_Click(object sender, EventArgs e)
private void btnClearSizeBmp_Path_Click(object sender, EventArgs e) {
{ txtDefect_Compress_SavePath.Text = "";
txtSizeBmp_SavePath.Text = ""; }
}
private void btnClearSizeBmp_Path_Click(object sender, EventArgs e)
private void btnClearSizeBmp_Compare_SavePath_Click(object sender, EventArgs e) {
{ txtSizeBmp_SavePath.Text = "";
txtSizeBmp_Compare_SavePath.Text = ""; }
}
private void btnSizeBmp_Zoom_Image_SavePath_Click(object sender, EventArgs e) private void btnClearSizeBmp_Compare_SavePath_Click(object sender, EventArgs e)
{ {
txtSizeBmp_Zoom_Image_SavePath.Text = ""; txtSizeBmp_Compare_SavePath.Text = "";
} }
private void btnBackDB_Click(object sender, EventArgs e) private void btnSizeBmp_Zoom_Image_SavePath_Click(object sender, EventArgs e)
{ {
try txtSizeBmp_Zoom_Image_SavePath.Text = "";
{ }
string lsPath=Utils.FileUtil.selectFolder(); private void btnBackDB_Click(object sender, EventArgs e)
if (string.IsNullOrWhiteSpace(lsPath)) {
return; try
{
lsPath += "\\DB" + DateTime.Now.ToString("yyyyMMddHHmm") + ".bak"; string lsPath=Utils.FileUtil.selectFolder();
Service.InitDB.BackupDataBase(lsPath); if (string.IsNullOrWhiteSpace(lsPath))
MessageBox.Show("备份成功!", "成功", MessageBoxButtons.OK, MessageBoxIcon.Information); return;
}
catch (Exception ex) lsPath += "\\DB" + DateTime.Now.ToString("yyyyMMddHHmm") + ".bak";
{ Service.InitDB.BackupDataBase(lsPath);
MessageBox.Show(ex.Message, "失败", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show("备份成功!", "成功", MessageBoxButtons.OK, MessageBoxIcon.Information);
} }
} catch (Exception ex)
{
private void chkMakeTag_CheckedChanged(object sender, EventArgs e) MessageBox.Show(ex.Message, "失败", MessageBoxButtons.OK, MessageBoxIcon.Error);
{ }
}
}
} private void chkMakeTag_CheckedChanged(object sender, EventArgs e)
} {
}
}
}

View File

@ -124,16 +124,16 @@
<data name="tsbtnSave.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="tsbtnSave.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIeSURBVFhH7ZfLShxBFIaPCJKAQcgLhBh0I7hTSYi6CVEX YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIfSURBVFhH7ZdPaxNBGMbfUBCFSsEvILa0l4K3KoptL9JE
Lmchoq1dVd112rgQ3yC7oBslD+CNJBDIC7gTXXoBFy7dSdaRYELI5VRR09Pl1Mx09TQBwR8+eqaqzt// es6hhLpmZ2Z33q09hH4Db6IXpR+gtUULBb+AN6lHW8GDR2/iWZEo4p93hslmp5kkO5ulEOgDPzaZmffZ
VJ/umYF7OdQBUTJGTBaGywngyYDx81Cl0gUs3geBf0uB41vjnFMCh+pM2ueVcc8hLkfTQoaX9Al2QMS7 J7PvbhI4l0MViJIlolYYLqvAk3nj56F6/QKw+A0I/FcKHB8Z55wSuNBjMjp3jXsOcbmYFjL8TJ/gBYh4
/shtCPFC+yzgFURRjzlDC0XJyzQAxy0zWkxcvku9hPxsRlsoG0DID2a0mITcrHlpv8DMNFE2AMOPZjS/ zx+5CyF+0j4P8AtE0ZQ5wxBFyZ00AMcdM1pMXD5OvYQ8NKNDlA0g5EszWkxCPu96ab/AzAxQNgDDV2Y0
GC7SzkX6NccNK8AMfocweaLnGqqdACsrD6nuj65V4rieelUJ4yOa6dDzTrUTIAwfUd034ka/53It9bKQ vxg2aeci/ZrjMyvAGv6AMLmq5/pqlACt1iWq+6trlTg+Tb06hPE7mqnoeadGCRCGl6nuG9HW77l8knpZ
q3reKasHcM+M5lOSdMPU9G9dq2Q1ocUXPe+UHaDJwgbSt61pXoHvM141mu6sHUBt5wsz4yeGg1T7NeNV yC0975TVA7hvRvMpSSahuvpH1ypZTWjxWs87ZQcYsLCP9G1rmlfgdsary8CdtQOo7bxtZvzE8DrVfs14
wyOAQjXVOXFCD5jT1tA6jmcQBL9MfT2eAcrnbgYIgutCVO+KLF4BlImQU8DY40LEcR/5HFqefjtAjdWu dfEIoFBN9ZE4pgfMyXBoHccPEAS/TX0vngHKZzwDBMH3QnTuiixeAZSJkPeAsSuFiONZ8jmyPP12gBpr
BCaWp+cl+EldvQwiGfGGxcPkN5l+LVe5m01YJp4BbugSzANf6tcNpY55Ueuj6DkweWx5/v8mlGh5eu+A VAlMLE/PS/CLunoTRHLTGxbfIL9a+rXcYTybsEw8A7TpEtwHvjGnG0od86LWR9EtYPK95Xn2TSjR8vTe
kHMgxDNYxF59vI0ad8HfPKV6+pGrH9E5A2R/lNqo7wQ/XA8hjfxkzuaQunWcRWXSLEAQPKBFB/VFJTE7 ASHXQYgZaOK0Pp5GjbvgD69RPf3I1Y/onAGyP0pt1HeCH66HkEYemLM5pG4dZ1GZDAoQBBdp0dveopJo
+4N2ecKcrYEqlU5aPE794P7bVRSBr3Vf3MsSwD8RV2WjuxFNUgAAAABJRU5ErkJggg== NH7SLlfN2fqoXp+gxcvUD+6/XUURuKL74lyWAP4DwL5ll9fZEiMAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="tsbtnClose.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="tsbtnClose.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@ -257,9 +257,6 @@
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>166, 17</value> <value>166, 17</value>
</metadata> </metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>166, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>56</value> <value>56</value>
</metadata> </metadata>

View File

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

View File

@ -1,222 +1,224 @@
using SqlSugar; using SqlSugar;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Models namespace Models
{ {
[SugarIndex("index_{table}_sn", nameof(Order.SN), OrderByType.Asc, isUnique: true)] [SugarIndex("index_{table}_sn", nameof(Order.SN), OrderByType.Asc, isUnique: true)]
public class Order : BaseTable public class Order : BaseTable
{ {
/// <summary> /// <summary>
/// 产品 /// 产品
/// </summary> /// </summary>
public int ProductId { get; set; } public int ProductId { get; set; }
[Navigate(NavigateType.ManyToOne, nameof(ProductId))] [Navigate(NavigateType.ManyToOne, nameof(ProductId))]
public Product ProductInfo { get; set; } public Product ProductInfo { get; set; }
public string SN { get; set; } public string SN { get; set; }
public string BatchId { get; set; } public string BatchId { get; set; }
/// <summary> /// <summary>
/// 流程 /// 流程
/// </summary> /// </summary>
public int StepId { get; set; } public int StepId { get; set; }
[Navigate(NavigateType.ManyToOne, nameof(StepId))] [Navigate(NavigateType.ManyToOne, nameof(StepId))]
public Step StepInfo { get; set; } public Step StepInfo { get; set; }
/// <summary> /// <summary>
/// 时长-秒 /// 时长-秒
/// </summary> /// </summary>
public double TimeLen { get; set; } public double TimeLen { get; set; }
/// <summary> /// <summary>
/// 是否合格 /// 是否合格
/// </summary> /// </summary>
[SugarColumn(IsNullable = true)] [SugarColumn(IsNullable = true)]
public bool Qualified { get; set; } = true; public bool Qualified { get; set; } = true;
/// <summary> /// <summary>
/// 比对结果 0-未比对 1-通过 2-不通过 /// 比对结果 0-未比对 1-通过 2-不通过
/// </summary> /// </summary>
public int CompareResult { get; set; } = 0; public int CompareResult { get; set; } = 0;
//平均值 //平均值
public double TensionValue { get; set; } public double TensionValue { get; set; }
public double HeightValue { get; set; } public double HeightValue { get; set; }
public double LineWidthValue { get; set; } public double LineWidthValue { get; set; }
public double PTValue { get; set; } public double PTValue { get; set; }
//N次 //N次
#region 5 #region 5
public double Tension1 { get; set; } public double Tension1 { get; set; }
public double Tension2 { get; set; } public double Tension2 { get; set; }
public double Tension3 { get; set; } public double Tension3 { get; set; }
public double Tension4 { get; set; } public double Tension4 { get; set; }
public double Tension5 { get; set; } public double Tension5 { get; set; }
#endregion #endregion
#region 5 #region 5
public double Height1 { get; set; } public double Height1 { get; set; }
public double Height2 { get; set; } public double Height2 { get; set; }
public double Height3 { get; set; } public double Height3 { get; set; }
public double Height4 { get; set; } public double Height4 { get; set; }
public double Height5 { get; set; } public double Height5 { get; set; }
#endregion #endregion
#region 线9 #region 线9
public double LineWidth1 { get; set; } public double LineWidth1 { get; set; }
public double LineWidth2 { get; set; } public double LineWidth2 { get; set; }
public double LineWidth3 { get; set; } public double LineWidth3 { get; set; }
public double LineWidth4 { get; set; } public double LineWidth4 { get; set; }
public double LineWidth5 { get; set; } public double LineWidth5 { get; set; }
public double LineWidth6 { get; set; } public double LineWidth6 { get; set; }
public double LineWidth7 { get; set; } public double LineWidth7 { get; set; }
public double LineWidth8 { get; set; } public double LineWidth8 { get; set; }
public double LineWidth9 { get; set; } public double LineWidth9 { get; set; }
#endregion #endregion
#region PT6次 #region PT6次
public double PT1 { get; set; } public double PT1 { get; set; }
public double PT2 { get; set; } public double PT2 { get; set; }
public double PT3 { get; set; } public double PT3 { get; set; }
public double PT4 { get; set; } public double PT4 { get; set; }
public double PT5 { get; set; } public double PT5 { get; set; }
public double PT6 { get; set; } public double PT6 { get; set; }
#endregion #endregion
/// <summary> /// <summary>
/// 缺陷数 /// 缺陷数
/// </summary> /// </summary>
public int DefectCount { get; set; } public int DefectCount { get; set; }
#region #region
public int DKCount { get; set; }//堵孔数量 public int DKCount { get; set; }//堵孔数量
public int ZWCount { get; set; }//脏污数量 public int ZWCount { get; set; }//脏污数量
public int GSYCCount { get; set; }//钢丝异常数量 public int GSYCCount { get; set; }//钢丝异常数量
public int XWSCount { get; set; }//纤维丝数量 public int XWSCount { get; set; }//纤维丝数量
public int QKCount { get; set; }//缺口数量 public int QKCount { get; set; }//缺口数量
public int ZKCount { get; set; }//针孔数量 public int ZKCount { get; set; }//针孔数量
public int PPCount { get; set; }//泡泡数量 public int PPCount { get; set; }//泡泡数量
public int HSCount { get; set; }//划伤数量 public int HSCount { get; set; }//划伤数量
public int YXCount { get; set; }//压线数量 public int YXCount { get; set; }//压线数量
public int XBCount { get; set; }//斜边数量 new public int XBCount { get; set; }//斜边数量 new
public int SXCount { get; set; }//栅线数量 new public int SXCount { get; set; }//栅线数量 new
#endregion #endregion
/// <summary> /// <summary>
/// mark点数据:[X1,Y1,X2,Y2,X3,Y3,X4,Y4] /// mark点数据:[X1,Y1,X2,Y2,X3,Y3,X4,Y4]
/// </summary> /// </summary>
[SugarColumn(IsNullable = true)] [SugarColumn(IsNullable = true)]
public string MarkData { get; set; } public string MarkData { get; set; }
// //
public bool Succeed { get; set; } public bool Succeed { get; set; }
/// <summary> /// <summary>
/// 失败分类 /// 失败分类
/// </summary> /// </summary>
public int FailType { get; set; } public int FailType { get; set; }
/// <summary> /// <summary>
/// 失败的工序名称 /// 失败的工序名称
/// </summary> /// </summary>
[SugarColumn(IsNullable = true)] [SugarColumn(IsNullable = true)]
public string FailProcessName { get; set; } public string FailProcessName { get; set; }
[SugarColumn(IsNullable = true, ColumnDataType = "text", Length = 2048)] [SugarColumn(IsNullable = true, ColumnDataType = "text", Length = 2048)]
public string Note { get; set; } public string Note { get; set; }
/// <summary> /// <summary>
/// 0-初始; 5-已检测; 10-出现异常 /// 0-初始; 5-已检测; 10-出现异常
/// </summary> /// </summary>
public int State { get; set; } public int State { get; set; }
//---------- //----------
/// <summary> /// <summary>
/// 修改次数 /// 修改次数
/// </summary> /// </summary>
public int HistoryCount { get; set; } = 0; public int HistoryCount { get; set; } = 0;
/// <summary> /// <summary>
/// 修改历史记录 /// 修改历史记录
/// </summary> /// </summary>
[Navigate(NavigateType.OneToMany, nameof(OrderHistory.Pid))] [Navigate(NavigateType.OneToMany, nameof(OrderHistory.Pid))]
public List<OrderHistory> OrderHistoryList { get; set; } public List<OrderHistory> OrderHistoryList { get; set; }
/// <summary> /// <summary>
/// Defect和Size比对失败的坐标位置 /// Defect和Size比对失败的坐标位置
/// </summary> /// </summary>
[Navigate(NavigateType.OneToMany, nameof(DefectInfo.Pid))] [Navigate(NavigateType.OneToMany, nameof(DefectInfo.Pid))]
public List<DefectInfo> DefectInfoList { get; set; } public List<DefectInfo> DefectInfoList { get; set; }
//-------IsIgnore = true 不保存 //-------IsIgnore = true 不保存
[SugarColumn(IsIgnore = true)] [SugarColumn(IsIgnore = true)]
//[Navigate(NavigateType.OneToMany, nameof(SizeTagData.Pid))] //[Navigate(NavigateType.OneToMany, nameof(SizeTagData.Pid))]
public List<SizeTagData> SizeTagDataList { get; set; } public List<SizeTagData> SizeTagDataList { get; set; }
//2023-10-30 添加异常列 //2023-10-30 添加异常列
/// <summary> /// <summary>
/// 异常情况 /// 异常情况
/// </summary> /// </summary>
public string Abnormalities { get; set; } [SugarColumn(IsNullable = true)]
/// <summary> public string Abnormalities { get; set; }
/// 修复人员 /// <summary>
/// </summary> /// 修复人员
public string RepairCode { get; set; } /// </summary>
} [SugarColumn(IsNullable = true)]
[SugarIndex("index_{table}_pid", nameof(OrderHistory.Pid), OrderByType.Asc, isUnique: false)] public string RepairCode { get; set; }
public class OrderHistory : BaseTable }
{ [SugarIndex("index_{table}_pid", nameof(OrderHistory.Pid), OrderByType.Asc, isUnique: false)]
public int Pid { get; set; } public class OrderHistory : BaseTable
public bool Qualified { get; set; }//合格 {
public int Pid { get; set; }
//比对 public bool Qualified { get; set; }//合格
public int CompareResult { get; set; }
//平均值 //比对
public double TensionValue { get; set; } public int CompareResult { get; set; }
public double HeightValue { get; set; } //平均值
public double LineWidthValue { get; set; } public double TensionValue { get; set; }
public double PTValue { get; set; } public double HeightValue { get; set; }
public double LineWidthValue { get; set; }
//外观 public double PTValue { get; set; }
public int DKCount { get; set; }//堵孔数量
public int ZWCount { get; set; }//脏污数量 //外观
public int GSYCCount { get; set; }//钢丝异常数量 public int DKCount { get; set; }//堵孔数量
public int XWSCount { get; set; }//纤维丝数量 public int ZWCount { get; set; }//脏污数量
public int QKCount { get; set; }//缺口数量 public int GSYCCount { get; set; }//钢丝异常数量
public int ZKCount { get; set; }//针孔数量 public int XWSCount { get; set; }//纤维丝数量
public int PPCount { get; set; }//泡泡数量 public int QKCount { get; set; }//缺口数量
public int HSCount { get; set; }//划伤数量 public int ZKCount { get; set; }//针孔数量
public int YXCount { get; set; }//压线数量 public int PPCount { get; set; }//泡泡数量
public int XBCount { get; set; }//斜边数量 new public int HSCount { get; set; }//划伤数量
public int SXCount { get; set; }//栅线数量 new public int YXCount { get; set; }//压线数量
} public int XBCount { get; set; }//斜边数量 new
public int SXCount { get; set; }//栅线数量 new
[SugarIndex("index_{table}_pid", nameof(SizeTagData.Pid), OrderByType.Asc, isUnique: false)] }
public class SizeTagData : BaseTable
{ [SugarIndex("index_{table}_pid", nameof(SizeTagData.Pid), OrderByType.Asc, isUnique: false)]
public int Pid { get; set; } public class SizeTagData : BaseTable
public string SizeTag { get; set; } {
/// <summary> public int Pid { get; set; }
/// 产生Tag工序索引 public string SizeTag { get; set; }
/// </summary> /// <summary>
public int CreateStepIndex { get; set; } /// 产生Tag工序索引
/// <summary> /// </summary>
/// 消费本数据工序索引和消费值索引5-0,8-2 public int CreateStepIndex { get; set; }
/// </summary> /// <summary>
public string ConsumeStepIndex { get; set; } /// 消费本数据工序索引和消费值索引5-0,8-2
/// </summary>
/// <summary> public string ConsumeStepIndex { get; set; }
/// double[]
/// </summary> /// <summary>
public string posePT { get; set; } /// double[]
} /// </summary>
public string posePT { get; set; }
[SugarIndex("index_{table}_pid", nameof(DefectInfo.Pid), OrderByType.Asc, isUnique: false)] }
public class DefectInfo : BaseTable
{ [SugarIndex("index_{table}_pid", nameof(DefectInfo.Pid), OrderByType.Asc, isUnique: false)]
public int Pid { get; set; } public class DefectInfo : BaseTable
/// <summary> {
/// 0-Defect 1-Size public int Pid { get; set; }
/// </summary> /// <summary>
public int Type { get; set; } /// 0-Defect 1-Size
public string Code { get;set; } /// </summary>
public int Type { get; set; }
public double X { get; set; } public string Code { get;set; }
public double Y { get; set; }
public double ZXD { get; set; } public double X { get; set; }
} public double Y { get; set; }
public double ZXD { get; set; }
}
} }

View File

@ -109,8 +109,10 @@ namespace Models
//mark尺寸 //mark尺寸
public double MarkSize { get; set; } public double MarkSize { get; set; }
//抓点图像 //抓点图像
[SugarColumn(IsNullable = true)]
public string MapPath { get; set; } public string MapPath { get; set; }
//抓取点位 //抓取点位
[SugarColumn(IsNullable = true)]
public string GetPointList { get; set; } public string GetPointList { get; set; }
} }
/// <summary> /// <summary>