清理无用代码
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
|
||||
using JinYuan.CommunicationLib.Enum;
|
||||
using JinYuan.CommunicationLib.Helper;
|
||||
using JinYuan.DataConvertLib;
|
||||
using JinYuan.Helper;
|
||||
using JinYuan.MES.Enums;
|
||||
using JinYuan.MES.Models;
|
||||
using JinYuan.Models;
|
||||
using JinYuan.VirtualDataLibrary;
|
||||
@@ -11,20 +9,14 @@ using Newtonsoft.Json;
|
||||
using PLCCommunication;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Data.SqlTypes;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using static System.Runtime.CompilerServices.RuntimeHelpers;
|
||||
|
||||
|
||||
namespace JinYuan.ControlCenters
|
||||
@@ -270,7 +262,7 @@ namespace JinYuan.ControlCenters
|
||||
if (resByte == null)
|
||||
{
|
||||
CommonMethods.AddDataMonitorLog(0, $"上料工位:{pf.GroupName},起始地址:{pf.VarList[1].VarAddress},得到空字节数组");
|
||||
LoggerHelp.WriteLog("循环读取PLC上料工位"+$"读取工位:{pf.GroupName},起始地址:{pf.VarList[1].VarAddress},得到空字节数组");
|
||||
LoggerHelp.WriteLog("循环读取PLC上料工位" + $"读取工位:{pf.GroupName},起始地址:{pf.VarList[1].VarAddress},得到空字节数组");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -3,23 +3,14 @@ using JinYuan.CommunicationLib.Enum;
|
||||
using JinYuan.DataConvertLib;
|
||||
using JinYuan.Helper;
|
||||
using JinYuan.MES.Enums;
|
||||
using JinYuan.MES.Models;
|
||||
using JinYuan.Models;
|
||||
using JinYuan.VirtualDataLibrary;
|
||||
using PLCCommunication;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.Eventing.Reader;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.TaskbarClock;
|
||||
|
||||
namespace JinYuan.ControlCenters
|
||||
{
|
||||
@@ -157,37 +148,112 @@ namespace JinYuan.ControlCenters
|
||||
// return Result;
|
||||
//}
|
||||
/// <summary>
|
||||
/// 判断总结果 Code_NG
|
||||
/// 判断总结果
|
||||
/// </summary>
|
||||
private int JudgmentResult(int Code_NG, int[,] CCD_Data,int codeIndex)
|
||||
{
|
||||
private int JudgmentResult(int A, int B, int C, int D, int E, int F, int G, int H, int I, int J, int K, int L, int M, int N)
|
||||
{
|
||||
//条码,芯包重量,芯包侧厚,芯包CCD极性检测,电芯裁切粘连,电芯裁切毛刺,芯包铜焊印位置,
|
||||
//芯包正面极耳撕裂H,芯包背面极耳撕裂,芯包正面极耳翻折J,芯包背面极耳翻折,测厚压力结果,
|
||||
//焊前CCD检测结果,铝焊印位置判定结果
|
||||
|
||||
//目前先判断条码,芯包重量,芯包侧厚,芯包CCD极性检测,芯包正面极耳撕裂,芯包正面极耳翻折
|
||||
int Result = 0;
|
||||
OK_NG = "OK";
|
||||
//是否有条码NG 1 = OK 2 = NG
|
||||
if (Code_NG == 2)
|
||||
if (A == 2 || B == 2 || C == 2 || D == 2 || H == 2 || J == 2)
|
||||
{
|
||||
//ed
|
||||
Result = 2;
|
||||
OK_NG = "NG";
|
||||
}
|
||||
else if (A == 1 && B == 1 && C == 1 && D == 1 && H == 1 && J == 1)
|
||||
{
|
||||
Result = 1;
|
||||
OK_NG = "OK";
|
||||
}
|
||||
else
|
||||
{
|
||||
Result = 1;
|
||||
OK_NG = "OK";
|
||||
}
|
||||
|
||||
if (A == 2)
|
||||
{
|
||||
NG_Type += "无条码_";
|
||||
OK_NG = "NG";
|
||||
Result = 2;
|
||||
}
|
||||
//CCD 判定
|
||||
for (int i = 0; i < 27; i++)
|
||||
if (B == 2)
|
||||
{
|
||||
//CCD 0 = OK 1 = NG 2 缺图NG
|
||||
if (CCD_Data[codeIndex, i] == 1)
|
||||
{
|
||||
NG_Type += $"CCD{i}NG_";
|
||||
OK_NG = "NG";
|
||||
Result = 2;
|
||||
}
|
||||
if (CCD_Data[codeIndex, i] == 2)
|
||||
{
|
||||
NG_Type += $"CCD{i}缺图NG_";
|
||||
OK_NG = "NG";
|
||||
Result = 2;
|
||||
}
|
||||
}
|
||||
NG_Type += "芯包重量1NG_";
|
||||
//return 2;
|
||||
Result = 2;
|
||||
}
|
||||
if (C == 2)
|
||||
{
|
||||
NG_Type += "芯包侧厚NG_";
|
||||
//return 2;
|
||||
Result = 2;
|
||||
}
|
||||
if (D == 2)
|
||||
{
|
||||
NG_Type += "芯包CCD极性检测NG_";
|
||||
//return 2;
|
||||
Result = 2;
|
||||
}
|
||||
|
||||
//if (E == 2)
|
||||
//{
|
||||
// NG_Type += "电芯裁切粘连NG_";
|
||||
// //return 2;
|
||||
//}
|
||||
//if (F == 2)
|
||||
//{
|
||||
// NG_Type += "电芯裁切毛刺NG_";
|
||||
// //return 2;
|
||||
//}
|
||||
//if (G == 2)
|
||||
//{
|
||||
// NG_Type += "芯包铜焊印位置判定NG_";
|
||||
// //return 2;
|
||||
//}
|
||||
if (H == 2)
|
||||
{
|
||||
NG_Type += "芯包正面极耳撕裂NG_";
|
||||
//return 2;
|
||||
}
|
||||
//if (I == 2)
|
||||
//{
|
||||
// NG_Type += "芯包背面极耳撕裂NG_";
|
||||
// //return 2;
|
||||
//}
|
||||
if (J == 2)
|
||||
{
|
||||
NG_Type += "芯包正面极耳翻折NG_";
|
||||
//return 2;
|
||||
}
|
||||
//if (K == 2)
|
||||
//{
|
||||
// NG_Type += "芯包背面极耳翻折NG_";
|
||||
// //return 2;
|
||||
//}
|
||||
if (L == 2)
|
||||
{
|
||||
NG_Type += "测厚压力NG_";
|
||||
//return 2;
|
||||
}
|
||||
if (M == 2)
|
||||
{
|
||||
NG_Type += "焊前CCD检测NG_";
|
||||
//return 2;
|
||||
}
|
||||
if (N == 2)
|
||||
{
|
||||
NG_Type += "铝焊印位置判定NG_";
|
||||
//return 2;
|
||||
}
|
||||
if (Result == 1)
|
||||
{
|
||||
NG_Type += "OK_";
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
#region 上料工位(数据处理)
|
||||
@@ -209,7 +275,7 @@ namespace JinYuan.ControlCenters
|
||||
}
|
||||
if (bArrays.IsSuccess && bArrays.Content != null)
|
||||
{
|
||||
|
||||
|
||||
|
||||
sw2.Restart();
|
||||
//解析数据
|
||||
@@ -233,7 +299,7 @@ namespace JinYuan.ControlCenters
|
||||
listBarCode[0] = StringLib.GetStringFromByteArrayByEncoding(bytes, 0, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
|
||||
listBarCode[1] = StringLib.GetStringFromByteArrayByEncoding(bytes, 40, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
|
||||
listBarCode[2] = StringLib.GetStringFromByteArrayByEncoding(bytes, 80, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
|
||||
|
||||
|
||||
//listBarCode[0] = "TEST";
|
||||
//listBarCode[1] = "TEST";
|
||||
//listBarCode[2] = "TEST";
|
||||
@@ -284,7 +350,7 @@ namespace JinYuan.ControlCenters
|
||||
MesResType mesResType1 = MesResType.A;
|
||||
|
||||
bool Res = CommonMethods.hbgMes.SingleCellInStation(url, siteCode, lineCode, equipNum, materialCode, userName, listBarCode[i], ref MesMessage1, ref mesResType1);
|
||||
|
||||
|
||||
if (MesMessage1.Contains("发生一个或多个错误"))
|
||||
{
|
||||
MesMessage1 = "上传失败";
|
||||
@@ -857,7 +923,7 @@ namespace JinYuan.ControlCenters
|
||||
// m.Flag = 1;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// //m.UpState = "已上传";
|
||||
// if (Res)
|
||||
// {
|
||||
@@ -900,7 +966,7 @@ namespace JinYuan.ControlCenters
|
||||
|
||||
|
||||
// bool Res1 = CommonMethods.hbgMes.ProducResultParam(ur2, siteCode1, lineCode1, equipNum1, materialCode1, userName1, m, unloadType, ref Mesage);
|
||||
|
||||
|
||||
// if (m.Flag == 1)
|
||||
// m.UpState = "已上传";
|
||||
// else
|
||||
@@ -1674,22 +1740,17 @@ namespace JinYuan.ControlCenters
|
||||
AGearEntity TT = new AGearEntity();
|
||||
//极限件标志
|
||||
int ChallengeFlag = 0;
|
||||
//芯包信息1 D3300~D3327
|
||||
//芯包信息2 D3330~D3357
|
||||
//芯包信息3 D3360~D3387
|
||||
for (int j = 0; j < 28; j++)
|
||||
//芯包信息1 D3300~D3326
|
||||
//芯包信息2 D3330~D3356
|
||||
//芯包信息3 D3360~D3386
|
||||
for (int j = 0; j < 27; j++)
|
||||
{
|
||||
m.CCD_Data[i,j] = ShortLib.GetShortFromByteArray(bArrays.Content, 200 + i * 30 * 2 + j * 2, DataFormat.CDAB);
|
||||
m.CCD_Data[i, j] = ShortLib.GetShortFromByteArray(bArrays.Content, 200 + i * 30 * 2 + j * 2, DataFormat.CDAB);
|
||||
}
|
||||
//电芯1缺陷代码 D3400~D3427
|
||||
//电芯2缺陷代码 D3430~D3457
|
||||
//电芯3缺陷代码 D3460~D3487
|
||||
for (int j = 0; j < 28; j++)
|
||||
for (int j = 0; j < 3; j++)
|
||||
{
|
||||
m.list_Data1[i, j] = ShortLib.GetShortFromByteArray(bArrays.Content, 400 + i * 30 * 2 + j * 2, DataFormat.CDAB);
|
||||
m.Thickness_Data[i, j] = FloatLib.GetFloatFromByteArray(bArrays.Content, 400 + i * 30 * 2 + j * 4, DataFormat.CDAB);
|
||||
}
|
||||
//电池厚度 D3500 D3502 D3504
|
||||
m.Thickness_Data[i] = FloatLib.GetFloatFromByteArray(bArrays.Content, 600 + i * 4, DataFormat.CDAB);
|
||||
|
||||
//芯包扫码时间
|
||||
//m.ScanTime[i] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
@@ -1740,56 +1801,67 @@ namespace JinYuan.ControlCenters
|
||||
|
||||
//不良代码判定
|
||||
List<string> NGcodeList = new List<string>();
|
||||
NGcodeList = NGWGcode(m.list_Data1,i);
|
||||
// NGcode(m.list_Data1[i, 10], m.list_Data1[i, 11], m.list_Data1[i, 12], m.list_Data1[i, 15], m.list_Data1[i, 26], m.list_Data1[i, 16]
|
||||
//, m.list_Data1[i, 17], m.list_Data1[i, 18], m.list_Data1[i, 19], m.list_Data1[i, 23], m.list_Data1[i, 24], m.list_Data1[i, 25], m.list_Data1[i, 27]);
|
||||
NGcodeList = NGcode(m.list_Data1[i, 10], m.list_Data1[i, 11], m.list_Data1[i, 12], m.list_Data1[i, 15], m.list_Data1[i, 26], m.list_Data1[i, 16]
|
||||
, m.list_Data1[i, 17], m.list_Data1[i, 18], m.list_Data1[i, 19], m.list_Data1[i, 23], m.list_Data1[i, 24], m.list_Data1[i, 25], m.list_Data1[i, 27]);
|
||||
|
||||
//电芯CCD判定结果
|
||||
#region //电芯CCD判定结果
|
||||
m.CCDResult1 = m.CCD_Data[i, 0] == 1 ? "OK" : (m.CCD_Data[i, 0] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult2 = m.CCD_Data[i, 1] == 1 ? "OK" : (m.CCD_Data[i, 1] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult3 = m.CCD_Data[i, 2] == 1 ? "OK" : (m.CCD_Data[i, 2] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult4 = m.CCD_Data[i, 3] == 1 ? "OK" : (m.CCD_Data[i, 3] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult5 = m.CCD_Data[i, 4] == 1 ? "OK" : (m.CCD_Data[i, 4] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult6 = m.CCD_Data[i, 5] == 1 ? "OK" : (m.CCD_Data[i, 5] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult7 = m.CCD_Data[i, 6] == 1 ? "OK" : (m.CCD_Data[i, 6] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult8 = m.CCD_Data[i, 7] == 1 ? "OK" : (m.CCD_Data[i, 7] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult9 = m.CCD_Data[i, 8] == 1 ? "OK" : (m.CCD_Data[i, 8] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult10 = m.CCD_Data[i, 9] == 1 ? "OK" : (m.CCD_Data[i, 9] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult11 = m.CCD_Data[i, 10] == 1 ? "OK" : (m.CCD_Data[i, 10] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult12 = m.CCD_Data[i, 11] == 1 ? "OK" : (m.CCD_Data[i, 11] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult13 = m.CCD_Data[i, 12] == 1 ? "OK" : (m.CCD_Data[i, 12] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult14 = m.CCD_Data[i, 13] == 1 ? "OK" : (m.CCD_Data[i, 13] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult15 = m.CCD_Data[i, 14] == 1 ? "OK" : (m.CCD_Data[i, 14] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult16 = m.CCD_Data[i, 15] == 1 ? "OK" : (m.CCD_Data[i, 15] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult17 = m.CCD_Data[i, 16] == 1 ? "OK" : (m.CCD_Data[i, 16] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult18 = m.CCD_Data[i, 17] == 1 ? "OK" : (m.CCD_Data[i, 17] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult19 = m.CCD_Data[i, 18] == 1 ? "OK" : (m.CCD_Data[i, 18] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult20 = m.CCD_Data[i, 19] == 1 ? "OK" : (m.CCD_Data[i, 19] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult21 = m.CCD_Data[i, 20] == 1 ? "OK" : (m.CCD_Data[i, 20] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult22 = m.CCD_Data[i, 21] == 1 ? "OK" : (m.CCD_Data[i, 21] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult23 = m.CCD_Data[i, 22] == 1 ? "OK" : (m.CCD_Data[i, 22] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult24 = m.CCD_Data[i, 23] == 1 ? "OK" : (m.CCD_Data[i, 23] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult25 = m.CCD_Data[i, 24] == 1 ? "OK" : (m.CCD_Data[i, 24] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult26 = m.CCD_Data[i, 25] == 1 ? "OK" : (m.CCD_Data[i, 25] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult27 = m.CCD_Data[i, 26] == 1 ? "OK" : (m.CCD_Data[i, 26] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult28 = m.CCD_Data[i, 27] == 1 ? "OK" : (m.CCD_Data[i, 27] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult1 = m.CCD_Data[i, 0] == 0 ? "OK" : (m.CCD_Data[i, 0] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult2 = m.CCD_Data[i, 1] == 0 ? "OK" : (m.CCD_Data[i, 1] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult3 = m.CCD_Data[i, 2] == 0 ? "OK" : (m.CCD_Data[i, 2] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult4 = m.CCD_Data[i, 3] == 0 ? "OK" : (m.CCD_Data[i, 3] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult5 = m.CCD_Data[i, 4] == 0 ? "OK" : (m.CCD_Data[i, 4] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult6 = m.CCD_Data[i, 5] == 0 ? "OK" : (m.CCD_Data[i, 5] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult7 = m.CCD_Data[i, 6] == 0 ? "OK" : (m.CCD_Data[i, 6] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult8 = m.CCD_Data[i, 7] == 0 ? "OK" : (m.CCD_Data[i, 7] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult9 = m.CCD_Data[i, 8] == 0 ? "OK" : (m.CCD_Data[i, 8] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult10 = m.CCD_Data[i, 9] == 0 ? "OK" : (m.CCD_Data[i, 9] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult11 = m.CCD_Data[i, 10] == 0 ? "OK" : (m.CCD_Data[i, 10] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult12 = m.CCD_Data[i, 11] == 0 ? "OK" : (m.CCD_Data[i, 11] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult13 = m.CCD_Data[i, 12] == 0 ? "OK" : (m.CCD_Data[i, 12] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult14 = m.CCD_Data[i, 13] == 0 ? "OK" : (m.CCD_Data[i, 13] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult15 = m.CCD_Data[i, 14] == 0 ? "OK" : (m.CCD_Data[i, 14] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult16 = m.CCD_Data[i, 15] == 0 ? "OK" : (m.CCD_Data[i, 15] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult17 = m.CCD_Data[i, 16] == 0 ? "OK" : (m.CCD_Data[i, 16] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult18 = m.CCD_Data[i, 17] == 0 ? "OK" : (m.CCD_Data[i, 17] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult19 = m.CCD_Data[i, 18] == 0 ? "OK" : (m.CCD_Data[i, 18] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult20 = m.CCD_Data[i, 19] == 0 ? "OK" : (m.CCD_Data[i, 19] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult21 = m.CCD_Data[i, 20] == 0 ? "OK" : (m.CCD_Data[i, 20] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult22 = m.CCD_Data[i, 21] == 0 ? "OK" : (m.CCD_Data[i, 21] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult23 = m.CCD_Data[i, 22] == 0 ? "OK" : (m.CCD_Data[i, 22] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult24 = m.CCD_Data[i, 23] == 0 ? "OK" : (m.CCD_Data[i, 23] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult25 = m.CCD_Data[i, 24] == 0 ? "OK" : (m.CCD_Data[i, 24] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult26 = m.CCD_Data[i, 25] == 0 ? "OK" : (m.CCD_Data[i, 25] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult27 = m.CCD_Data[i, 26] == 0 ? "OK" : (m.CCD_Data[i, 26] == 1 ? "NG" : "缺图");
|
||||
#endregion
|
||||
|
||||
m.CSBYHASCANNINGTIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
m.CSBYHASCANNINGTIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
m.CSBYHPROCESSNAME = "外观检测";
|
||||
m.CSBYHSCHEDULE = CommonMethods.strClass;
|
||||
m.CSBYHINSTATIONTIME = m.ScanTime[0];
|
||||
m.CSBYHOUTSTATIONTIME = m.ScanTime[1];
|
||||
|
||||
//电芯1厚度数据1,2,3 改为 电芯1厚度 ;3字段只需1字段
|
||||
m.Thickness1 = SaveTwoNum(m.Thickness_Data[i]);
|
||||
m.Thickness2 = SaveTwoNum(m.Thickness_Data[i]);
|
||||
m.Thickness3 = SaveTwoNum(m.Thickness_Data[i]);
|
||||
m.Thickness1 = SaveTwoNum(m.Thickness_Data[i, 0]);
|
||||
m.Thickness2 = SaveTwoNum(m.Thickness_Data[i, 1]);
|
||||
m.Thickness3 = SaveTwoNum(m.Thickness_Data[i, 2]);
|
||||
|
||||
|
||||
//芯包OKNG结果值判定
|
||||
MyRes[i] = JudgmentResult(Code_NG, m.CCD_Data,i);
|
||||
//条码,芯包重量,芯包侧厚,芯包CCD极性检测,电芯裁切粘连,电芯裁切毛刺,芯包焊印位置,
|
||||
//芯包正面极耳撕裂,芯包背面极耳撕裂,芯包正面极耳翻折,芯包背面极耳翻折
|
||||
if (Code_NG == 1)
|
||||
{
|
||||
for (int ii = 0; ii < 27; ii++)
|
||||
{
|
||||
if (m.CCD_Data[i, ii] != 0)
|
||||
{
|
||||
MyRes[i] = m.CCD_Data[i, ii];
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
MyRes[i] = 1;
|
||||
//MyRes[i] = JudgmentResult(Code_NG, m.CCD_Data);
|
||||
|
||||
m.Result = MyRes[i];
|
||||
|
||||
@@ -1841,7 +1913,12 @@ namespace JinYuan.ControlCenters
|
||||
{
|
||||
//MES出站判定结果
|
||||
m.Result = MyRes[i];
|
||||
|
||||
////芯包重量1判定结果
|
||||
//if (m.list_Data1[i, 10] == 2) { m.Remark += "芯包重量NG,"; }
|
||||
////芯包侧厚判定结果
|
||||
//if (m.list_Data1[i, 11] == 2) { m.Remark += "芯包侧厚NG,"; }
|
||||
////芯包CCD极性检测结果
|
||||
//if (m.list_Data1[i, 12] == 2) { m.Remark += "芯包CCD极性检测NG,"; }
|
||||
m.Remark += MesMessage;
|
||||
}
|
||||
else
|
||||
@@ -1867,7 +1944,12 @@ namespace JinYuan.ControlCenters
|
||||
m.Result = MyRes[i] = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
////芯包重量1判定结果
|
||||
//if (m.list_Data1[i, 10] == 2) { m.Remark += "芯包重量NG,"; }
|
||||
////芯包侧厚判定结果
|
||||
//if (m.list_Data1[i, 11] == 2) { m.Remark += "芯包侧厚NG,"; }
|
||||
////芯包CCD极性检测结果
|
||||
//if (m.list_Data1[i, 12] == 2) { m.Remark += "芯包CCD极性检测NG,"; }
|
||||
m.Remark += MesMessage;
|
||||
}
|
||||
//发送产品结果参数给MES
|
||||
@@ -1895,7 +1977,13 @@ namespace JinYuan.ControlCenters
|
||||
else
|
||||
{
|
||||
m.Result = MyRes[i] = 2;
|
||||
m.Remark += "本地存储";
|
||||
m.Remark += "本地存储";
|
||||
//芯包重量1判定结果
|
||||
if (m.list_Data1[i, 10] == 2) { m.Remark += ",芯包重量NG"; }
|
||||
//芯包侧厚判定结果
|
||||
if (m.list_Data1[i, 11] == 2) { m.Remark += ",芯包侧厚NG"; }
|
||||
//芯包CCD极性检测结果
|
||||
if (m.list_Data1[i, 12] == 2) { m.Remark += ",芯包CCD极性检测NG"; }
|
||||
m.UpState = "未上传";
|
||||
}
|
||||
//极限件发3给PLC
|
||||
@@ -2124,31 +2212,9 @@ namespace JinYuan.ControlCenters
|
||||
|
||||
return NGcodelist;
|
||||
}
|
||||
/// <summary>
|
||||
/// 下料外观检不良代码
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<string> NGWGcode(short[,] serialNum,int index)
|
||||
{
|
||||
|
||||
List<string> NGcodelist = new List<string>();
|
||||
var ngType = "A";
|
||||
for (int i = 0; i < 28; i++)
|
||||
{
|
||||
if (serialNum[index,i] == 4 || serialNum[index,i] == 150 || serialNum[index, i] == 151)
|
||||
ngType = "P";
|
||||
if (serialNum[index, i] > 0)
|
||||
{
|
||||
var strserialNum = serialNum[index, i].ToString().PadLeft(3, '0');
|
||||
NGcodelist.Add($"PFV{ngType}{strserialNum}");
|
||||
}
|
||||
}
|
||||
|
||||
return NGcodelist;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region NG下料不良代码
|
||||
#region NG下料不良代码
|
||||
public List<string> NGCarcode(int a, int b, int c)
|
||||
{
|
||||
//芯包重量、测厚位移、极性
|
||||
|
||||
@@ -1,19 +1,15 @@
|
||||
using JinYuan.CommunicationLib.Enum;
|
||||
using HslCommunication.ModBus;
|
||||
using JinYuan.CommunicationLib.Enum;
|
||||
using JinYuan.DataConvertLib;
|
||||
using JinYuan.Helper;
|
||||
using JinYuan.MES.Enums;
|
||||
using JinYuan.MES.Models;
|
||||
using JinYuan.Models;
|
||||
using JinYuan.VirtualDataLibrary;
|
||||
using PLCCommunication;
|
||||
using PLCCommunication.Language;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using HslCommunication.ModBus;
|
||||
|
||||
namespace JinYuan.ControlCenters
|
||||
{
|
||||
@@ -195,10 +191,10 @@ namespace JinYuan.ControlCenters
|
||||
//CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "称重不良", DataCount = 0 });
|
||||
//CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "铜极耳剪切不良", DataCount = 0 });
|
||||
//CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "铝极耳剪切不良", DataCount = 0 });
|
||||
|
||||
CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "扫码不良", DataCount = 0 });
|
||||
|
||||
CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "扫码不良", DataCount = 0 });
|
||||
CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "MES不良", DataCount = 0 });
|
||||
CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "其他不良" , DataCount = 0 });
|
||||
CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "其他不良", DataCount = 0 });
|
||||
|
||||
}
|
||||
else //读取PLC数据
|
||||
@@ -423,14 +419,14 @@ namespace JinYuan.ControlCenters
|
||||
string _anemometerAddress = "D15000";//风速仪起始地址
|
||||
if (CommonMethods.mesConfig.isUpMes)
|
||||
{
|
||||
JYResult<byte[]> jYResult = CommonMethods.PlcLink.ReadValue<JYResult<byte[]>>(_anemometerAddress, Data_Type.ArrByte,150);
|
||||
JYResult<byte[]> jYResult = CommonMethods.PlcLink.ReadValue<JYResult<byte[]>>(_anemometerAddress, Data_Type.ArrByte, 150);
|
||||
List<float> _anemograph = GetList<float>(_anemometerNumber, 0);//初始化列表
|
||||
List<string> _anemometerName=new List<string>();
|
||||
List<string> _anemometerName = new List<string>();
|
||||
string _mesage = "";
|
||||
for (int i=0;i< _anemometerNumber;i++)
|
||||
for (int i = 0; i < _anemometerNumber; i++)
|
||||
{
|
||||
//初始化风速仪名称
|
||||
int _temple = i+1;
|
||||
int _temple = i + 1;
|
||||
string _name = "风速仪" + _temple.ToString();
|
||||
_anemometerName.Add(_name);
|
||||
|
||||
@@ -440,22 +436,22 @@ namespace JinYuan.ControlCenters
|
||||
//
|
||||
// 写csv文件
|
||||
string productName = string.Empty;
|
||||
string fileName=string.Empty;
|
||||
string filePath=string.Empty;
|
||||
string fileName = string.Empty;
|
||||
string filePath = string.Empty;
|
||||
DateTime nowDate = DateTime.Now;
|
||||
string fileTitle= "工序名称,生产机台编号,拉线,型号,物料编号,操作人员,班次,采集时间,";
|
||||
string fileContent= $"预焊工序,{CommonMethods.mesConfig.equipNum},{CommonMethods.mesConfig.lineCode},{productName},{CommonMethods.mesConfig.MaterialCode},{CommonMethods.mesConfig.mesUserName},{CommonMethods.strClass},{nowDate.ToString("yyyy-MM-dd HH:mm:ss")},";
|
||||
string fileTitle = "工序名称,生产机台编号,拉线,型号,物料编号,操作人员,班次,采集时间,";
|
||||
string fileContent = $"预焊工序,{CommonMethods.mesConfig.equipNum},{CommonMethods.mesConfig.lineCode},{productName},{CommonMethods.mesConfig.MaterialCode},{CommonMethods.mesConfig.mesUserName},{CommonMethods.strClass},{nowDate.ToString("yyyy-MM-dd HH:mm:ss")},";
|
||||
filePath = $@"{CommonMethods.strAnemographpath}\{nowDate.Year}\{nowDate.Month}";
|
||||
fileName = $@"{nowDate.Day}.csv";
|
||||
|
||||
for (int j = 0; j < _anemometerNumber; j++)
|
||||
{
|
||||
fileTitle = fileTitle +","+ _anemometerName[j];
|
||||
{
|
||||
fileTitle = fileTitle + "," + _anemometerName[j];
|
||||
fileContent = fileContent + "," + _anemograph[j];
|
||||
}
|
||||
CSVHelper<object>.WriterCSV(filePath, fileName, fileTitle, fileContent);
|
||||
|
||||
|
||||
|
||||
|
||||
if (false)//待确认接口
|
||||
{
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
using JinYuan.VirtualDataLibrary;
|
||||
using JinYuan.Helper;
|
||||
using JinYuan.MES;
|
||||
using JinYuan.MES.Models;
|
||||
using JinYuan.Models;
|
||||
using JinYuan.VirtualDataLibrary;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using JinYuan.Helper;
|
||||
using JinYuan.MES;
|
||||
using JinYuan.MES.Models;
|
||||
using JinYuan.MES.Enums;
|
||||
using JinYuan.Models;
|
||||
using SqlSugar;
|
||||
|
||||
namespace JinYuan.ControlCenters
|
||||
{
|
||||
@@ -54,7 +51,7 @@ namespace JinYuan.ControlCenters
|
||||
alarmParam.alarmLineList = alarmLineList;
|
||||
string SendJosn = JsonConvert.SerializeObject(alarmParam);
|
||||
var sw = new Stopwatch();
|
||||
sw.Start();
|
||||
sw.Start();
|
||||
resJson = MESApiHelper.HttpPostJsonAPI(CommonMethods.mesConfig.AlarmCurrencyMesUrl, SendJosn);
|
||||
sw.Stop();
|
||||
josnTxtMsg = $"{nowTime.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用MES设备报警接口:{CommonMethods.mesConfig.AlarmCurrencyMesUrl},请求数据为:{SendJosn},\n{nowTime.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resJson}";
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.DAL.Enums
|
||||
namespace JinYuan.DAL.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询条件枚举
|
||||
|
||||
@@ -3,14 +3,12 @@ using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.DAL
|
||||
{
|
||||
public interface ISugarHepler: IDisposable
|
||||
public interface ISugarHepler : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// 初始化数据库连接
|
||||
@@ -177,7 +175,7 @@ namespace JinYuan.DAL
|
||||
|
||||
#region 查询
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询所有
|
||||
/// </summary>
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using JinYuan.DAL.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.DAL.Models
|
||||
{
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using JinYuan.DAL.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.DAL.Models
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.DAL.Models
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
|
||||
@@ -3,11 +3,7 @@ using JinYuan.Helper;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Linq;
|
||||
using System.Runtime.Remoting.Contexts;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.DAL
|
||||
{
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
using JinYuan.DAL;
|
||||
using JinYuan.DAL.Enums;
|
||||
using JinYuan.DAL.Enums;
|
||||
using JinYuan.DAL.Models;
|
||||
using NLog;
|
||||
using Org.BouncyCastle.Asn1;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -10,18 +7,16 @@ using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Runtime.Remoting.Contexts;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.DAL
|
||||
{
|
||||
|
||||
|
||||
public class SQLSugarService : ISugarHepler
|
||||
{
|
||||
|
||||
|
||||
public void SetConnectionStr(string connectionStr, SqlSugar.DbType dbType= SqlSugar.DbType.SqlServer)
|
||||
|
||||
public void SetConnectionStr(string connectionStr, SqlSugar.DbType dbType = SqlSugar.DbType.SqlServer)
|
||||
{
|
||||
SQLSugarHelper.connString = connectionStr;
|
||||
SqlSugarDb = SQLSugarHelper.SqlSugarClient;
|
||||
@@ -891,7 +886,7 @@ namespace JinYuan.DAL
|
||||
#endregion
|
||||
|
||||
#region 修改
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 修改(主键是更新条件)
|
||||
/// </summary>
|
||||
@@ -1629,6 +1624,6 @@ namespace JinYuan.DAL
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -6,7 +6,6 @@ using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Text;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms.DataVisualization.Charting;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
public static class ConvertHelper
|
||||
public static class ConvertHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 字节数组高低位转换
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
@@ -41,7 +37,7 @@ namespace JinYuan.Helper
|
||||
/// </summary>
|
||||
/// <param name="dgv"></param>
|
||||
/// <param name="e"></param>
|
||||
public static void DgvRowPrePaint(DataGridView dgv,string Column, object sender, DataGridViewRowPrePaintEventArgs e)
|
||||
public static void DgvRowPrePaint(DataGridView dgv, string Column, object sender, DataGridViewRowPrePaintEventArgs e)
|
||||
{
|
||||
|
||||
if (e.RowIndex >= dgv.Rows.Count - 1)
|
||||
@@ -50,7 +46,7 @@ namespace JinYuan.Helper
|
||||
|
||||
try
|
||||
{
|
||||
if(dr.Cells[Column].Value != null)
|
||||
if (dr.Cells[Column].Value != null)
|
||||
{
|
||||
if (dr.Cells[Column].Value.Equals("OK"))
|
||||
{
|
||||
@@ -66,7 +62,7 @@ namespace JinYuan.Helper
|
||||
dr.Cells[Column].Style.ForeColor = Color.Red;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -117,7 +113,7 @@ namespace JinYuan.Helper
|
||||
public static void DoubleBufferedDataGirdView(this DataGridView dgv, bool flag)
|
||||
{
|
||||
Type dgvType = dgv.GetType();
|
||||
PropertyInfo pi = dgvType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
PropertyInfo pi = dgvType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
pi.SetValue(dgv, flag, null);
|
||||
}
|
||||
|
||||
@@ -130,7 +126,7 @@ namespace JinYuan.Helper
|
||||
public static void DoubleBufferedListView(this ListView lv, bool flag)
|
||||
{
|
||||
Type lvType = lv.GetType();
|
||||
PropertyInfo pi = lvType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
PropertyInfo pi = lvType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
pi.SetValue(lv, flag, null);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
using System;
|
||||
using NPOI.HSSF.UserModel;
|
||||
using NPOI.SS.Formula.Eval;
|
||||
using NPOI.SS.UserModel;
|
||||
using NPOI.SS.Util;
|
||||
using NPOI.XSSF.UserModel;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -8,11 +13,6 @@ using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
using NPOI.SS.UserModel;
|
||||
using NPOI.HSSF.UserModel;
|
||||
using NPOI.SS.Formula.Eval;
|
||||
using NPOI.SS.Util;
|
||||
using NPOI.XSSF.UserModel;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,79 +1,75 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
public class IniFileHelper
|
||||
{
|
||||
private static string iniFilePath = "Configure.ini";
|
||||
private static string iniFilePath = "Configure.ini";
|
||||
|
||||
[DllImport("kernel32")]
|
||||
private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);
|
||||
[DllImport("kernel32")]
|
||||
private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);
|
||||
|
||||
[DllImport("kernel32")]
|
||||
private static extern long GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath);
|
||||
[DllImport("kernel32")]
|
||||
private static extern long GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath);
|
||||
|
||||
public static string ReadIniData(string Section, string Key)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (File.Exists(iniFilePath))
|
||||
{
|
||||
StringBuilder temp = new StringBuilder(1024);
|
||||
GetPrivateProfileString(Section, Key, "", temp, 1024, iniFilePath);
|
||||
return temp.ToString();
|
||||
}
|
||||
MessageBox.Show("节点:" + Section + ",键名:" + Key + ":读取配置文件错误!");
|
||||
return null;
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
public static string ReadIniData(string Section, string Key)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (File.Exists(iniFilePath))
|
||||
{
|
||||
StringBuilder temp = new StringBuilder(1024);
|
||||
GetPrivateProfileString(Section, Key, "", temp, 1024, iniFilePath);
|
||||
return temp.ToString();
|
||||
}
|
||||
MessageBox.Show("节点:" + Section + ",键名:" + Key + ":读取配置文件错误!");
|
||||
return null;
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool WriteIniData(string Section, string Key, string Value)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (File.Exists(iniFilePath))
|
||||
{
|
||||
if (WritePrivateProfileString(Section, Key, Value, iniFilePath) == 0L)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
File.Create(iniFilePath).Close();
|
||||
if (WritePrivateProfileString(Section, Key, Value, iniFilePath) == 0L)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
public static bool WriteIniData(string Section, string Key, string Value)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (File.Exists(iniFilePath))
|
||||
{
|
||||
if (WritePrivateProfileString(Section, Key, Value, iniFilePath) == 0L)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
File.Create(iniFilePath).Close();
|
||||
if (WritePrivateProfileString(Section, Key, Value, iniFilePath) == 0L)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public static void CreateIniFile(string StartupPath, string AppName)
|
||||
{
|
||||
iniFilePath = StartupPath + AppName;
|
||||
if (!Directory.Exists(StartupPath))
|
||||
{
|
||||
Directory.CreateDirectory(StartupPath);
|
||||
}
|
||||
if (!File.Exists(iniFilePath))
|
||||
{
|
||||
File.Create(iniFilePath).Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void CreateIniFile(string StartupPath, string AppName)
|
||||
{
|
||||
iniFilePath = StartupPath + AppName;
|
||||
if (!Directory.Exists(StartupPath))
|
||||
{
|
||||
Directory.CreateDirectory(StartupPath);
|
||||
}
|
||||
if (!File.Exists(iniFilePath))
|
||||
{
|
||||
File.Create(iniFilePath).Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization.Json;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
using NLog;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
public class LoggerHelp
|
||||
{
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
using HslCommunication.MQTT;
|
||||
using HslCommunication;
|
||||
using HslCommunication;
|
||||
using HslCommunication.MQTT;
|
||||
using JinYuan.Models;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using System.Security.Policy;
|
||||
using JinYuan.Models;
|
||||
using System.Text;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
@@ -86,9 +82,9 @@ namespace JinYuan.Helper
|
||||
public string Device_name = "602VIW01";
|
||||
public string Action_time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 发送进出站数据
|
||||
/// </summary>
|
||||
@@ -96,7 +92,7 @@ namespace JinYuan.Helper
|
||||
/// <param name="IP"></param>
|
||||
/// <param name="Port"></param>
|
||||
/// <param name="cPQCPTDate"></param>
|
||||
public void EnterandExitSendMessge(int Station = 3)
|
||||
public void EnterandExitSendMessge(int Station = 3)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -113,7 +109,7 @@ namespace JinYuan.Helper
|
||||
PublishMessage(Topic, EnterandExitMessge("0"));
|
||||
}
|
||||
//出站
|
||||
else if (Station == 1)
|
||||
else if (Station == 1)
|
||||
{
|
||||
|
||||
PublishMessage(Topic, EnterandExitMessge("1"));
|
||||
@@ -121,7 +117,7 @@ namespace JinYuan.Helper
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
LoggerHelp.WriteError($"发送进出站数据错误,{err.Message}",err);
|
||||
LoggerHelp.WriteError($"发送进出站数据错误,{err.Message}", err);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -144,7 +140,7 @@ namespace JinYuan.Helper
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
LoggerHelp.WriteError($"发送采集项数据错误,{err.Message}",err);
|
||||
LoggerHelp.WriteError($"发送采集项数据错误,{err.Message}", err);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Serialization;
|
||||
using System.Xml;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace JinYuan.MES.Enums
|
||||
{
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace JinYuan.MES.Enums
|
||||
{
|
||||
@@ -27,7 +22,7 @@ namespace JinYuan.MES.Enums
|
||||
/// </summary>
|
||||
[Description("DD")]
|
||||
DD = 3,
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-6
@@ -1,11 +1,7 @@
|
||||
using JinYuan.MES.Enums;
|
||||
using JinYuan.MES.Models;
|
||||
using JinYuan.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.MES
|
||||
{
|
||||
@@ -25,7 +21,7 @@ namespace JinYuan.MES
|
||||
/// <param name="passWord"></param>
|
||||
/// <param name="msg"></param>
|
||||
/// <returns></returns>
|
||||
bool LoginEnyity(string url, string siteCode, string lineCode, string equipNum, string userName, string passWord,string UserCardID, ref string resJson);
|
||||
bool LoginEnyity(string url, string siteCode, string lineCode, string equipNum, string userName, string passWord, string UserCardID, ref string resJson);
|
||||
/// <summary>
|
||||
/// 设备参数设定值请求接口
|
||||
/// </summary>
|
||||
@@ -69,7 +65,7 @@ namespace JinYuan.MES
|
||||
bool SingleCellInStation(string url, string siteCode, string lineCode, string equipNum, string materialCode, string userName, string BarCode, ref string MesMessage, ref MesResType mesResType);
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 复投单个上传(只上传条码,不上传卷芯码)
|
||||
/// </summary>
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
using Newtonsoft.Json;
|
||||
using JinYuan.MES.Models;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Net.Http;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using JinYuan.MES.Models;
|
||||
|
||||
namespace JinYuan.MES
|
||||
{
|
||||
@@ -32,7 +29,7 @@ namespace JinYuan.MES
|
||||
try
|
||||
{
|
||||
StringContent stringContent = new StringContent(strJosnData, Encoding.UTF8, "application/json");
|
||||
string ResponseMessage= new HttpClient()
|
||||
string ResponseMessage = new HttpClient()
|
||||
{
|
||||
Timeout = TimeSpan.FromSeconds(3.0)
|
||||
}.PostAsync(url, (HttpContent)stringContent).Result.Content.ReadAsStringAsync().Result;
|
||||
@@ -97,7 +94,7 @@ namespace JinYuan.MES
|
||||
/// <param name="url"></param>
|
||||
/// <param name="json"></param>
|
||||
/// <returns></returns>
|
||||
public static string WebApiPostTranafer(string url,string json)
|
||||
public static string WebApiPostTranafer(string url, string json)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -7,11 +7,6 @@ using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Reflection.Emit;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.MES
|
||||
{
|
||||
@@ -45,7 +40,7 @@ namespace JinYuan.MES
|
||||
equipNum = equipNum,
|
||||
userName = userName,
|
||||
passWord = passWord,
|
||||
userCardID =null// UserCardID
|
||||
userCardID = null// UserCardID
|
||||
};
|
||||
|
||||
var nowDate = DateTime.Now;
|
||||
@@ -149,7 +144,7 @@ namespace JinYuan.MES
|
||||
resJson = $"设备参数设定值请求接口发生异常:{ex.Message}";
|
||||
LoggerHelp.WriteEX("设备参数设定值请求接口", ex);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 登录
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 多个电池进站
|
||||
/// </summary>
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
@@ -49,7 +45,7 @@ namespace JinYuan.MES.Models
|
||||
/// </summary>
|
||||
public int type { get; set; }
|
||||
|
||||
// public List<identiftyList> identiftyList { get; set; }
|
||||
// public List<identiftyList> identiftyList { get; set; }
|
||||
public List<assembleLineList> assembleLineList { get; set; }
|
||||
}
|
||||
|
||||
@@ -93,7 +89,7 @@ namespace JinYuan.MES.Models
|
||||
}
|
||||
public class identiftyList
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 产品条码
|
||||
/// </summary>
|
||||
@@ -101,7 +97,7 @@ namespace JinYuan.MES.Models
|
||||
/// <summary>
|
||||
/// 原材料信息
|
||||
/// </summary>
|
||||
public List<string> materialLotList=new List<string>();
|
||||
public List<string> materialLotList = new List<string>();
|
||||
/// <summary>
|
||||
/// 原材料条码
|
||||
/// </summary>
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 产品过程加工参数
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
@@ -22,7 +18,7 @@ namespace JinYuan.MES.Models
|
||||
/// <summary>
|
||||
/// 设备数据
|
||||
/// </summary>
|
||||
public string payload { get; set; }
|
||||
public string payload { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -30,8 +26,8 @@ namespace JinYuan.MES.Models
|
||||
/// </summary>
|
||||
public class Payload1
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 工厂代码
|
||||
/// </summary>
|
||||
@@ -71,7 +67,7 @@ namespace JinYuan.MES.Models
|
||||
/// <summary>
|
||||
/// 条码数组
|
||||
/// </summary>
|
||||
|
||||
|
||||
public IdentificationListItem identification { get; set; }
|
||||
public List<TagDataVOListItem> tagDataVOList { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 单个电池进站
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
|
||||
|
||||
|
||||
public class MaterialLotListItem
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
public class WattrMeter
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using PLCCommunication;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SqlSugar;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using CsvHelper.Configuration.Attributes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
public class AlarmStatus
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using CsvHelper.Configuration.Attributes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
+610
-613
File diff suppressed because it is too large
Load Diff
@@ -1,14 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace JinYuan.Models
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
//子组大小:这个与计算内的CPK值又非常打的关系,即是分组的样本个数,数据的分组在此处需要说明的是,必须
|
||||
//是根据实际情况来填写,比如每次抽样为5个,那么子组大小为5个,我们不能随心所欲的任意填写这个值,否则
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
@@ -14,19 +10,19 @@ namespace JinYuan.Models
|
||||
/// <summary>
|
||||
/// 注液前重量
|
||||
/// </summary>
|
||||
public string CTP_PreWeighing_Value { get; set; }
|
||||
public string CTP_PreWeighing_Value { get; set; }
|
||||
/// <summary>
|
||||
/// 保液量
|
||||
/// </summary>
|
||||
public string CTP_Liquid_Retention_Value { get; set; }
|
||||
public string CTP_Liquid_Retention_Value { get; set; }
|
||||
/// <summary>
|
||||
/// 注液量
|
||||
/// </summary>
|
||||
public string CTP_Filling_Value { get; set; }
|
||||
public string CTP_Filling_Value { get; set; }
|
||||
/// <summary>
|
||||
/// 失液量
|
||||
/// </summary>
|
||||
public string CTP_Liquid_Loss_Value { get; set; }
|
||||
public string CTP_Liquid_Loss_Value { get; set; }
|
||||
/// <summary>
|
||||
/// 充氦值
|
||||
/// </summary>
|
||||
@@ -34,19 +30,19 @@ namespace JinYuan.Models
|
||||
/// <summary>
|
||||
/// 钟罩真空值
|
||||
/// </summary>
|
||||
public string CTP_Belljar_Vacuum_Value { get; set; }
|
||||
public string CTP_Belljar_Vacuum_Value { get; set; }
|
||||
/// <summary>
|
||||
/// 钟罩真空时间
|
||||
/// </summary>
|
||||
public string CTP_Belljar_Vacuum_Time { get; set; }
|
||||
public string CTP_Belljar_Vacuum_Time { get; set; }
|
||||
/// <summary>
|
||||
/// 钟罩高压值
|
||||
/// </summary>
|
||||
public string CTP_Belljar_HighPressure_Value { get; set; }
|
||||
public string CTP_Belljar_HighPressure_Value { get; set; }
|
||||
/// <summary>
|
||||
/// 钟罩高压时间
|
||||
/// </summary>
|
||||
public string CTP_Belljar_HighPressure_Time { get; set; }
|
||||
public string CTP_Belljar_HighPressure_Time { get; set; }
|
||||
/// <summary>
|
||||
/// 钟罩循环次数
|
||||
/// </summary>
|
||||
@@ -54,7 +50,7 @@ namespace JinYuan.Models
|
||||
/// <summary>
|
||||
/// 回氦前真空值
|
||||
/// </summary>
|
||||
public string CTP_Pre_Helium_Value { get; set; }
|
||||
public string CTP_Pre_Helium_Value { get; set; }
|
||||
/// <summary>
|
||||
/// 回氦后真空值
|
||||
/// </summary>
|
||||
@@ -62,23 +58,23 @@ namespace JinYuan.Models
|
||||
/// <summary>
|
||||
/// 平压压力
|
||||
/// </summary>
|
||||
public string CTP_Flat_Pressure { get; set; }
|
||||
public string CTP_Flat_Pressure { get; set; }
|
||||
/// <summary>
|
||||
/// 电芯测厚压力
|
||||
/// </summary>
|
||||
public string CTP_Cell_Thickness_Pressure { get; set; }
|
||||
public string CTP_Cell_Thickness_Pressure { get; set; }
|
||||
/// <summary>
|
||||
/// 注液后重量
|
||||
/// </summary>
|
||||
public string CTQ_PostWeighing_Value { get; set; }
|
||||
public string CTQ_PostWeighing_Value { get; set; }
|
||||
/// <summary>
|
||||
/// 电芯厚度
|
||||
/// </summary>
|
||||
public string CTQ_Cell_Thickness { get; set; }
|
||||
public string CTQ_Cell_Thickness { get; set; }
|
||||
/// <summary>
|
||||
/// 终压胶粒高度
|
||||
/// </summary>
|
||||
public string CTQ_Finalpress_Rubber_Height { get; set; }
|
||||
public string CTQ_Finalpress_Rubber_Height { get; set; }
|
||||
/// <summary>
|
||||
/// 注液前负压压力
|
||||
/// </summary>
|
||||
@@ -104,9 +100,9 @@ namespace JinYuan.Models
|
||||
/// </summary>
|
||||
public string CTQ_Finalpress_Rubber_Thickness { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 进出站上传数据
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// 进出站上传数据
|
||||
/// </summary>
|
||||
public class EnterandExit
|
||||
{
|
||||
/// <summary>
|
||||
@@ -188,7 +184,7 @@ namespace JinYuan.Models
|
||||
/// <summary>
|
||||
/// 采集项数据列表
|
||||
/// </summary>
|
||||
public List<Collection> taglist { get; set; }
|
||||
public List<Collection> taglist { get; set; }
|
||||
|
||||
}
|
||||
|
||||
@@ -197,7 +193,7 @@ namespace JinYuan.Models
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
public string device_time { get; set; }
|
||||
public string device_time { get; set; }
|
||||
/// <summary>
|
||||
/// 采集项键值对
|
||||
/// </summary>
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 24小时统计表数据
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 不良統計
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 智能电表
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -2,11 +2,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Security.Policy;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
@@ -27,7 +23,7 @@ namespace JinYuan.Models
|
||||
/// <summary>
|
||||
/// PLC类型
|
||||
/// </summary>
|
||||
public string PLCType { get; set; }
|
||||
public string PLCType { get; set; }
|
||||
/// <summary>
|
||||
/// 当前设备的连接状态
|
||||
/// </summary>
|
||||
@@ -37,19 +33,19 @@ namespace JinYuan.Models
|
||||
/// <summary>
|
||||
/// 是否是首次连接
|
||||
/// </summary>
|
||||
|
||||
|
||||
public bool IsFirstConnect { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 重连周期
|
||||
/// </summary>
|
||||
|
||||
|
||||
public int ReConnectTime { get; set; } = 2000;
|
||||
|
||||
/// <summary>
|
||||
/// 休眠时间
|
||||
/// </summary>
|
||||
|
||||
|
||||
public int SleepTime { get; set; } = 10;
|
||||
|
||||
/// <summary>
|
||||
@@ -75,19 +71,19 @@ namespace JinYuan.Models
|
||||
/// <summary>
|
||||
/// 计时器
|
||||
/// </summary>
|
||||
|
||||
|
||||
public Stopwatch Stopwatch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所有归档变量的集合
|
||||
/// </summary>
|
||||
|
||||
|
||||
public List<Variable> StoreVarList { get; set; } = new List<Variable>();
|
||||
|
||||
/// <summary>
|
||||
/// 按工位读取
|
||||
/// </summary>
|
||||
|
||||
|
||||
public List<Group> WorkVarList { get; set; } = new List<Group>();
|
||||
/// <summary>
|
||||
/// 通信组集合
|
||||
@@ -106,7 +102,7 @@ namespace JinYuan.Models
|
||||
/// <summary>
|
||||
/// 定义报警触发和消除事件
|
||||
/// </summary>
|
||||
public event Action<bool,Variable> AlarmTrigEvent;
|
||||
public event Action<bool, Variable> AlarmTrigEvent;
|
||||
|
||||
/// <summary>
|
||||
/// 变量初始化
|
||||
@@ -142,7 +138,7 @@ namespace JinYuan.Models
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 索引器,通过键名获取到数据
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 所有窗体枚举,小于临界窗体的为固定窗体,不执行关闭
|
||||
@@ -19,6 +13,6 @@ namespace JinYuan.Models
|
||||
数据追溯,
|
||||
参数设置,
|
||||
系统设置,
|
||||
用户管理
|
||||
用户管理
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
using MiniExcelLibs.Attributes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
@@ -19,7 +15,7 @@ namespace JinYuan.Models
|
||||
/// <summary>
|
||||
/// 起始地址
|
||||
/// </summary>
|
||||
public string Start { get; set; }
|
||||
public string Start { get; set; }
|
||||
/// <summary>
|
||||
/// 长度
|
||||
/// </summary>
|
||||
@@ -33,7 +29,7 @@ namespace JinYuan.Models
|
||||
/// 是否需要反馈结果到PLC
|
||||
/// </summary>
|
||||
public bool IsFeedbackPlc { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 产品型号参数范围
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
@@ -12,7 +7,7 @@ namespace JinYuan.Models
|
||||
/// </summary>
|
||||
public class SysAdmin
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true,IsIgnore =true)]
|
||||
[SugarColumn(IsPrimaryKey = true, IsIgnore = true)]
|
||||
public int LoginId { get; set; }
|
||||
public string LoginName { get; set; }
|
||||
public string LoginPwd { get; set; }
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
public class SysConfig
|
||||
{
|
||||
@@ -46,7 +40,7 @@ namespace JinYuan.Models
|
||||
/// <summary>
|
||||
/// MES/非MES模式切换
|
||||
/// </summary>
|
||||
public bool MesModeSwitching { get; set;}
|
||||
public bool MesModeSwitching { get; set; }
|
||||
/// <summary>
|
||||
/// 切屏
|
||||
/// </summary>
|
||||
@@ -64,6 +58,6 @@ namespace JinYuan.Models
|
||||
/// </summary>
|
||||
public bool SaveThreadTime { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
public class SysLog
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using MiniExcelLibs.Attributes;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
@@ -17,7 +11,7 @@ namespace JinYuan.Models
|
||||
/// 变量名称
|
||||
/// </summary>
|
||||
public string VarName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 变量地址
|
||||
/// </summary>
|
||||
@@ -29,7 +23,7 @@ namespace JinYuan.Models
|
||||
/// <summary>
|
||||
/// 数据类型
|
||||
/// </summary>
|
||||
public string DataType { get; set; }
|
||||
public string DataType { get; set; }
|
||||
/// <summary>
|
||||
/// 偏移或长度
|
||||
/// </summary>
|
||||
@@ -37,7 +31,7 @@ namespace JinYuan.Models
|
||||
/// <summary>
|
||||
/// 所属通信组名称
|
||||
/// </summary>
|
||||
public string GroupName { get; set; }
|
||||
public string GroupName { get; set; }
|
||||
/// <summary>
|
||||
/// 备注说明
|
||||
/// </summary>
|
||||
@@ -45,11 +39,11 @@ namespace JinYuan.Models
|
||||
/// <summary>
|
||||
/// 是否上升沿报警
|
||||
/// </summary>
|
||||
public bool PosAlarm { get; set; }
|
||||
public bool PosAlarm { get; set; }
|
||||
/// <summary>
|
||||
/// 是否下降沿报警
|
||||
/// </summary>
|
||||
public bool NegAlarm { get; set;}
|
||||
public bool NegAlarm { get; set; }
|
||||
/// <summary>
|
||||
/// 转换系数
|
||||
/// </summary>
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
using JinYuan.DAL;
|
||||
using JinYuan.CommunicationLib.Library;
|
||||
using JinYuan.DataConvertLib;
|
||||
using JinYuan.CommunicationLib;
|
||||
using JinYuan.CommunicationLib.Base;
|
||||
using JinYuan.CommunicationLib.Enum;
|
||||
using JinYuan.DAL;
|
||||
using JinYuan.Helper;
|
||||
using JinYuan.MES;
|
||||
using JinYuan.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using JinYuan.Helper;
|
||||
using JinYuan.MES;
|
||||
using JinYuan.CommunicationLib.Enum;
|
||||
using JinYuan.CommunicationLib;
|
||||
using JinYuan.CommunicationLib.Base;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JinYuan.VirtualDataLibrary
|
||||
{
|
||||
@@ -71,7 +68,7 @@ namespace JinYuan.VirtualDataLibrary
|
||||
public static SysConfig sysConfig = new SysConfig();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static int InvadTime;
|
||||
|
||||
@@ -83,7 +80,7 @@ namespace JinYuan.VirtualDataLibrary
|
||||
/// <summary>
|
||||
///是否开启刷新
|
||||
/// </summary>
|
||||
public static bool isRefreshTimerWeeding=false;
|
||||
public static bool isRefreshTimerWeeding = false;
|
||||
|
||||
/// <summary>
|
||||
/// SQL语句
|
||||
@@ -230,7 +227,7 @@ namespace JinYuan.VirtualDataLibrary
|
||||
/// <summary>
|
||||
/// PLC开机/运行时间地址
|
||||
/// </summary>
|
||||
public static List<string> PlcOpenAndRunTimeAdress = new List<string> { "D50", "D52" , "D54" , "D56" , "D58" , "D60"};
|
||||
public static List<string> PlcOpenAndRunTimeAdress = new List<string> { "D50", "D52", "D54", "D56", "D58", "D60" };
|
||||
public static int ProdDRFIDNgQty = 0;//低托杯
|
||||
public static int ProdDXNgQty = 0;//卷心码
|
||||
public static int ProdGRFIDNgQty = 0;//高托杯
|
||||
@@ -435,7 +432,7 @@ namespace JinYuan.VirtualDataLibrary
|
||||
sysConfig.GetMesParam = Convert.ToBoolean(IniConfigHelper.ReadIniData("配置信息", "获取MES参数", "false"));
|
||||
sysConfig.OKSwitching = Convert.ToBoolean(IniConfigHelper.ReadIniData("配置信息", "强制OK/正常NG模式切换", "false"));
|
||||
sysConfig.SaveThreadTime = Convert.ToBoolean(IniConfigHelper.ReadIniData("配置信息", "线程耗时日志保存", "false"));
|
||||
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
@@ -600,7 +597,7 @@ namespace JinYuan.VirtualDataLibrary
|
||||
/// 显示下料数据
|
||||
/// </summary>
|
||||
public static Action<List<BGearEntity>> ShowBlankingDelegate;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 数据监视委托
|
||||
/// </summary>
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.VirtualDataLibrary
|
||||
{
|
||||
@@ -166,7 +162,7 @@ namespace JinYuan.VirtualDataLibrary
|
||||
{
|
||||
CommonMethods.AddLog(true, ex.Message);
|
||||
}
|
||||
|
||||
|
||||
return strSql;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
using JinYuan.DataConvertLib;
|
||||
using JinYuan.Models;
|
||||
using JinYuan.Models;
|
||||
using PLCCommunication;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.VirtualDataLibrary
|
||||
{
|
||||
|
||||
|
||||
public delegate void dgStationFunction(JYResult<byte[]> bArrays, object plcModel);
|
||||
|
||||
/// <summary>
|
||||
@@ -43,5 +38,5 @@ namespace JinYuan.VirtualDataLibrary
|
||||
/// <param name="DataList"></param>
|
||||
public delegate void DGShowWeldingPowerData(List<double> DataList);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.VirtualDataLibrary
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
|
||||
@@ -9,11 +9,11 @@ namespace LargeSquareOne
|
||||
{
|
||||
DataTable dataTable = new DataTable();
|
||||
string strLblMessage = "";
|
||||
|
||||
|
||||
public CustomMessageBox(DataTable _dataTable, string _strLblMessage)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
|
||||
|
||||
dataTable = _dataTable;
|
||||
strLblMessage = _strLblMessage;
|
||||
@@ -34,7 +34,7 @@ namespace LargeSquareOne
|
||||
private void btnOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DialogResult = DialogResult.OK;
|
||||
|
||||
|
||||
}
|
||||
private void btnNo_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace LargeSquareOne
|
||||
Operater = CommonMethods.currentAdmin.LoginName
|
||||
};
|
||||
//存储到数据库
|
||||
var b = CommonMethods.db.AddReturnBool(model);
|
||||
var b = CommonMethods.db.AddReturnBool(model);
|
||||
if (!b)
|
||||
{
|
||||
LoggerHelp.WriteError($"数据库记录失败. 表:SysLog,内容:{model.ToJsonString()}");
|
||||
|
||||
@@ -1,16 +1,8 @@
|
||||
using JinYuan.Models;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.DataVisualization.Charting;
|
||||
using System.Windows.Markup;
|
||||
|
||||
namespace LargeSquareOne
|
||||
{
|
||||
@@ -42,7 +34,7 @@ namespace LargeSquareOne
|
||||
private void btn_Add_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
List<double> data= GetSPCData();
|
||||
List<double> data = GetSPCData();
|
||||
// 计算Xbar和R
|
||||
double xbar = CalculateXbar(data);
|
||||
double r = CalculateR(data);
|
||||
@@ -53,7 +45,7 @@ namespace LargeSquareOne
|
||||
double uclR = CalculateUCLR(data.Count);
|
||||
double lclR = CalculateLCLR(data.Count);
|
||||
|
||||
|
||||
|
||||
// 清空图表
|
||||
chartControl.Series.Clear();
|
||||
double xmaxValue = Math.Max(xbar, Math.Max(uclXbar, uclR));
|
||||
@@ -89,7 +81,7 @@ namespace LargeSquareOne
|
||||
seriesR.Points.AddXY(i + 1, r);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +90,7 @@ namespace LargeSquareOne
|
||||
{
|
||||
// 返回样本数据的List<double>
|
||||
// 根据需要修改为实际的获取方法
|
||||
return new List<double>{1.2, 1.3, 1.0, 2.5, 2.2, 2.8, 0.8, 0.9, 1.1};
|
||||
return new List<double> { 1.2, 1.3, 1.0, 2.5, 2.2, 2.8, 0.8, 0.9, 1.1 };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -414,7 +406,7 @@ namespace LargeSquareOne
|
||||
double D3 = 0; // 控制系数
|
||||
|
||||
// 根据样本大小确定控制系数D3
|
||||
D3=GetD3(sampleSize);
|
||||
D3 = GetD3(sampleSize);
|
||||
|
||||
//对样本进行分组
|
||||
List<double> data = GetSPCData();
|
||||
|
||||
@@ -11,9 +11,7 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LargeSquareOne
|
||||
@@ -120,12 +118,12 @@ namespace LargeSquareOne
|
||||
CommonMethods.mesConfig.ModelName = gg.Text.ToString();
|
||||
CommonMethods.mesConfig.MaterialCode = gg.Tag.ToString();
|
||||
txtMaterialCode.Text = CommonMethods.mesConfig.MaterialCode;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
catch (Exception ex)
|
||||
{
|
||||
//LogHelper.Instance.WriteEx("获取数据库型号异常", ex);
|
||||
@@ -135,7 +133,7 @@ namespace LargeSquareOne
|
||||
|
||||
public bool IsNoOrg = false;
|
||||
public bool IsSetParam = false;
|
||||
|
||||
|
||||
|
||||
private void cmbModelType_SelectedItemsChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -370,7 +368,7 @@ namespace LargeSquareOne
|
||||
{
|
||||
listTA.Add(m);
|
||||
}
|
||||
if (listTA.Count >=500)
|
||||
if (listTA.Count >= 500)
|
||||
{
|
||||
listTA.Clear();
|
||||
GC.Collect();
|
||||
@@ -566,7 +564,7 @@ namespace LargeSquareOne
|
||||
|
||||
btSatrt.Enabled = !b;
|
||||
btStop.Enabled = b;
|
||||
cmbModelType.Enabled =true;
|
||||
cmbModelType.Enabled = true;
|
||||
txtMaterialCode.Enabled = !b;
|
||||
|
||||
}
|
||||
@@ -615,7 +613,7 @@ namespace LargeSquareOne
|
||||
StringFormat sf = new StringFormat { Alignment = StringAlignment.Near, LineAlignment = StringAlignment.Center };//字体水平位置居左,垂直居中
|
||||
private void lVConfigRange_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
|
||||
{
|
||||
|
||||
|
||||
e.Graphics.FillRectangle(Brushes.RoyalBlue, e.Bounds); //设置背景颜色
|
||||
Font font = new Font("微软雅黑", 12, FontStyle.Bold); //设置字体大小
|
||||
e.Graphics.DrawString(e.Header.Text, font, Brushes.White, e.Bounds, sf); //设置字体颜色
|
||||
|
||||
@@ -3,15 +3,9 @@ using JinYuan.Models;
|
||||
using MiniExcelLibs;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml.Schema;
|
||||
|
||||
namespace LargeSquareOne
|
||||
{
|
||||
@@ -62,7 +56,7 @@ namespace LargeSquareOne
|
||||
|
||||
return new List<Group>();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -112,10 +106,10 @@ namespace LargeSquareOne
|
||||
/// <param name="e"></param>
|
||||
private void btn_Add_Click(object sender, EventArgs e)
|
||||
{
|
||||
string groupName =this.txt_GroupName.Text.Trim();
|
||||
if (groupName.Length==0)
|
||||
string groupName = this.txt_GroupName.Text.Trim();
|
||||
if (groupName.Length == 0)
|
||||
{
|
||||
new FrmMsgBoxOutWithAck(2,"通信组名称不能为空!", "添加通信组").Show();
|
||||
new FrmMsgBoxOutWithAck(2, "通信组名称不能为空!", "添加通信组").Show();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -127,28 +121,28 @@ namespace LargeSquareOne
|
||||
|
||||
TotalGroups.Add(new Group()
|
||||
{
|
||||
GroupName=this.txt_GroupName.Text,
|
||||
Start=this.txtStart.Text,
|
||||
GroupName = this.txt_GroupName.Text,
|
||||
Start = this.txtStart.Text,
|
||||
Length = Convert.ToUInt16(this.num_Length.Value),
|
||||
IsTiggerRead = this.ckb_IsTiggerRead.Checked ?true : false,
|
||||
IsFeedbackPlc= this.chk_IsFeedbackPlc.Checked ? true : false,
|
||||
IsTiggerRead = this.ckb_IsTiggerRead.Checked ? true : false,
|
||||
IsFeedbackPlc = this.chk_IsFeedbackPlc.Checked ? true : false,
|
||||
IsActive = this.ckb_IsEnable.Checked ? true : false,
|
||||
Remark =this.txt_Remark.Text.Trim()
|
||||
Remark = this.txt_Remark.Text.Trim()
|
||||
});
|
||||
|
||||
try
|
||||
{
|
||||
MiniExcel.SaveAs(groupPath, TotalGroups, overwriteFile: true);
|
||||
new FrmMsgBoxOutWithAck(1,"添加通信组成功", "添加通信组").Show();
|
||||
new FrmMsgBoxOutWithAck(1, "添加通信组成功", "添加通信组").Show();
|
||||
|
||||
//刷新数据
|
||||
RefreshGroup();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
new FrmMsgBoxOutWithAck(3,"添加通信组失败:"+ex.Message, "添加通信组").Show();
|
||||
new FrmMsgBoxOutWithAck(3, "添加通信组失败:" + ex.Message, "添加通信组").Show();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -159,7 +153,7 @@ namespace LargeSquareOne
|
||||
private void btn_Delete_Click(object sender, EventArgs e)
|
||||
{
|
||||
string groupName = this.txt_GroupName.Text.Trim();
|
||||
|
||||
|
||||
if (IsGroupNameExits(groupName))
|
||||
{
|
||||
new FrmMsgBoxOutWithAck(2, "通信组名称不存在!", "删除通信组").Show();
|
||||
@@ -196,11 +190,11 @@ namespace LargeSquareOne
|
||||
return;
|
||||
}
|
||||
|
||||
var group =TotalGroups.Find(c=>c.GroupName == groupName);
|
||||
var group = TotalGroups.Find(c => c.GroupName == groupName);
|
||||
|
||||
group.Start = this.txtStart.Text;
|
||||
group.Length = Convert.ToUInt16(this.num_Length.Value);
|
||||
group.IsTiggerRead = this.ckb_IsTiggerRead.Checked ? true: false;
|
||||
group.IsTiggerRead = this.ckb_IsTiggerRead.Checked ? true : false;
|
||||
group.IsFeedbackPlc = this.chk_IsFeedbackPlc.Checked ? true : false;
|
||||
group.IsActive = this.ckb_IsEnable.Checked ? true : false;
|
||||
group.Remark = this.txt_Remark.Text.Trim();
|
||||
@@ -247,14 +241,15 @@ namespace LargeSquareOne
|
||||
/// <param name="e"></param>
|
||||
private void dgv_Main_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
|
||||
{
|
||||
if (e.ColumnIndex >= 0&&e.RowIndex>=0)
|
||||
if (e.ColumnIndex >= 0 && e.RowIndex >= 0)
|
||||
{
|
||||
object value = this.dgv_Main.Rows[e.RowIndex].Cells[e.ColumnIndex].Value;
|
||||
|
||||
if (value == null||value.ToString().Length==0)
|
||||
{
|
||||
e.Value = "---";
|
||||
};
|
||||
if (value == null || value.ToString().Length == 0)
|
||||
{
|
||||
e.Value = "---";
|
||||
}
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -266,7 +261,7 @@ namespace LargeSquareOne
|
||||
/// <param name="e"></param>
|
||||
private void dgv_Main_CellClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
if (e.RowIndex>=0)
|
||||
if (e.RowIndex >= 0)
|
||||
{
|
||||
UpdateGroup(TotalGroups[e.RowIndex]);
|
||||
}
|
||||
@@ -274,7 +269,7 @@ namespace LargeSquareOne
|
||||
|
||||
private void UpdateGroup(Group group)
|
||||
{
|
||||
if (group!=null)
|
||||
if (group != null)
|
||||
{
|
||||
this.txt_GroupName.Text = group.GroupName;
|
||||
this.txtStart.Text = group.Start;
|
||||
@@ -282,7 +277,7 @@ namespace LargeSquareOne
|
||||
this.ckb_IsTiggerRead.Checked = group.IsTiggerRead;
|
||||
this.chk_IsFeedbackPlc.Checked = group.IsFeedbackPlc;
|
||||
this.ckb_IsEnable.Checked = group.IsActive;
|
||||
this.txt_Remark.Text = group.Remark;
|
||||
this.txt_Remark.Text = group.Remark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LargeSquareOne
|
||||
|
||||
@@ -2,14 +2,8 @@
|
||||
using JinYuan.Models;
|
||||
using JinYuan.VirtualDataLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LargeSquareOne
|
||||
@@ -21,7 +15,7 @@ namespace LargeSquareOne
|
||||
InitializeComponent();
|
||||
this.Load += FrmLogin_Load;
|
||||
}
|
||||
|
||||
|
||||
private void FrmLogin_Load(object sender, EventArgs e)
|
||||
{
|
||||
CommonMethods.GetSysConfig();
|
||||
@@ -44,13 +38,13 @@ namespace LargeSquareOne
|
||||
//数据验证
|
||||
if (this.txt_LoginName.Text.Trim().Length == 0)
|
||||
{
|
||||
new FrmMsgBoxOutWithAck(2,"请填写登录用户名", "登录提示").ShowDialog();
|
||||
new FrmMsgBoxOutWithAck(2, "请填写登录用户名", "登录提示").ShowDialog();
|
||||
this.txt_LoginName.Focus();
|
||||
return;
|
||||
}
|
||||
if (this.txt_LoginPwd.Text.Trim().Length == 0)
|
||||
{
|
||||
new FrmMsgBoxOutWithAck(2,"请填写登录用密码", "登录提示").ShowDialog();
|
||||
new FrmMsgBoxOutWithAck(2, "请填写登录用密码", "登录提示").ShowDialog();
|
||||
this.txt_LoginPwd.Focus();
|
||||
return;
|
||||
}
|
||||
@@ -66,7 +60,7 @@ namespace LargeSquareOne
|
||||
sysAdmin = CommonMethods.db.Query<SysAdmin>(it => it.LoginName == sysAdmin.LoginName && it.LoginPwd == sysAdmin.LoginPwd);
|
||||
if (sysAdmin == null)
|
||||
{
|
||||
new FrmMsgBoxOutWithAck(3,"登录用户或密码错误!!!", "登录提示").ShowDialog();
|
||||
new FrmMsgBoxOutWithAck(3, "登录用户或密码错误!!!", "登录提示").ShowDialog();
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -75,7 +69,7 @@ namespace LargeSquareOne
|
||||
CommonMethods.LoginOut = false;
|
||||
//存储用户对象
|
||||
CommonMethods.currentAdmin = sysAdmin;
|
||||
CommonMethods.IsLoginOk = true;
|
||||
CommonMethods.IsLoginOk = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,6 +238,6 @@ namespace LargeSquareOne
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
using JinYuan.Models;
|
||||
using JinYuan.VirtualDataLibrary;
|
||||
using JinYuan.VirtualDataLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LargeSquareOne
|
||||
@@ -57,7 +50,7 @@ namespace LargeSquareOne
|
||||
CommonMethods.mesConfig.mesPwd = this.txt_LoginMesPwd.Text.Trim();
|
||||
string Mesage = "";
|
||||
string UserCardID = CommonMethods.currentAdmin.LoginUid;
|
||||
bool Res = CommonMethods.hbgMes.LoginEnyity(CommonMethods.mesConfig.LoginMesUrl, CommonMethods.mesConfig.siteCode, CommonMethods.mesConfig.lineCode, CommonMethods.mesConfig.equipNum, CommonMethods.mesConfig.mesUserName, CommonMethods.mesConfig.mesPwd, UserCardID, ref Mesage);
|
||||
bool Res = CommonMethods.hbgMes.LoginEnyity(CommonMethods.mesConfig.LoginMesUrl, CommonMethods.mesConfig.siteCode, CommonMethods.mesConfig.lineCode, CommonMethods.mesConfig.equipNum, CommonMethods.mesConfig.mesUserName, CommonMethods.mesConfig.mesPwd, UserCardID, ref Mesage);
|
||||
if (!Res)
|
||||
{
|
||||
new FrmMsgBoxOutWithAck(3, Mesage, "登录提示").ShowDialog();
|
||||
@@ -73,7 +66,7 @@ namespace LargeSquareOne
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void txt_LoginMesName_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
|
||||
+16
-16
@@ -1,17 +1,17 @@
|
||||
using JinYuan.ControlLib;
|
||||
using JinYuan.ControlCenters;
|
||||
using JinYuan.ControlLib;
|
||||
using JinYuan.Helper;
|
||||
using JinYuan.Models;
|
||||
using JinYuan.VirtualDataLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Text;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using JinYuan.VirtualDataLibrary;
|
||||
using JinYuan.ControlCenters;
|
||||
using JinYuan.Helper;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LargeSquareOne
|
||||
{
|
||||
@@ -68,7 +68,7 @@ namespace LargeSquareOne
|
||||
CommonMethods.listener.ScanerEvent += Listener_ScanerEvent;
|
||||
CommonMethods.listener.Start();
|
||||
|
||||
|
||||
|
||||
|
||||
this.Load += FrmMain_Load;
|
||||
this.FormClosing += FrmMain_FormClosing;
|
||||
@@ -99,10 +99,10 @@ namespace LargeSquareOne
|
||||
|
||||
private void FrmMain_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
InitReadInI();
|
||||
UserTimeOut(30);
|
||||
|
||||
|
||||
ControlCenter controlCenter = ControlCenter.Instance;
|
||||
|
||||
//1.设置登录用户
|
||||
@@ -169,7 +169,7 @@ namespace LargeSquareOne
|
||||
{
|
||||
CommonMethods.mesConfig.electricMeterNum.Add(strArray[i]);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
CommonMethods.mesConfig.listAntiDustAirSpeedNum.Clear();
|
||||
@@ -208,7 +208,7 @@ namespace LargeSquareOne
|
||||
//CommonMethods.ProdDXNgQty = Convert.ToInt32(IniConfigHelper.ReadIniData("统计计数", "ProdDXNgQty", "0"));
|
||||
//CommonMethods.ProdGRFIDNgQty = Convert.ToInt32(IniConfigHelper.ReadIniData("统计计数", "ProdGRFIDNgQty", "0"));
|
||||
//CommonMethods.ProdYLZNgQty = Convert.ToInt32(IniConfigHelper.ReadIniData("统计计数", "ProdYLZNgQty", "0"));
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -222,7 +222,7 @@ namespace LargeSquareOne
|
||||
CommonMethods.tickCount++;
|
||||
if (CommonMethods.tickCount == CommonMethods.sysConfig.LockPeriod * 60 * 1000 / this.updateTimer.Interval)
|
||||
{
|
||||
|
||||
|
||||
//锁屏
|
||||
LockWorkStation();
|
||||
}
|
||||
@@ -236,7 +236,7 @@ namespace LargeSquareOne
|
||||
CommonNaviButton_Click(this.nav_Monitor, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@ namespace LargeSquareOne
|
||||
sysAdmin = CommonMethods.db.Query<SysAdmin>(it => it.LoginUid == sysAdmin.LoginUid);
|
||||
if (sysAdmin == null)
|
||||
{
|
||||
|
||||
|
||||
new FrmMsgBoxOutWithAck(3, "登录用户或密码错误!!!", "登录提示").ShowDialog();
|
||||
return;
|
||||
}
|
||||
@@ -280,7 +280,7 @@ namespace LargeSquareOne
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void StoreTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
||||
@@ -336,7 +336,7 @@ namespace LargeSquareOne
|
||||
CommonNaviButton_Click(this.nav_DataMonitor, null);
|
||||
CommonMethods.sysConfig.ScreenCutting = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (CommonMethods.Statues != null && CommonMethods.Statues.Count > 0)
|
||||
{
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LargeSquareOne
|
||||
@@ -47,14 +42,14 @@ namespace LargeSquareOne
|
||||
private Point mPoint;
|
||||
private void Panel_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
mPoint=new Point(e.X, e.Y);
|
||||
mPoint = new Point(e.X, e.Y);
|
||||
}
|
||||
|
||||
private void Panel_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
this.Location=new Point(this.Location.X+e.X-mPoint.X,this.Location.Y+e.Y-mPoint.Y);
|
||||
this.Location = new Point(this.Location.X + e.X - mPoint.X, this.Location.Y + e.Y - mPoint.Y);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LargeSquareOne
|
||||
{
|
||||
public partial class FrmMsgBoxOutWithAck : Form
|
||||
{
|
||||
public FrmMsgBoxOutWithAck(int type,string content, string title)
|
||||
public FrmMsgBoxOutWithAck(int type, string content, string title)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
@@ -21,7 +15,7 @@ namespace LargeSquareOne
|
||||
this.lbl_Content.Text = content;
|
||||
this.lbl_Title.Text = title;
|
||||
|
||||
switch(type)
|
||||
switch (type)
|
||||
{
|
||||
case 1:
|
||||
this.pic_TitleImage.Image = LargeSquareOne.Properties.Resources.info;
|
||||
@@ -33,7 +27,7 @@ namespace LargeSquareOne
|
||||
this.pic_TitleImage.Image = LargeSquareOne.Properties.Resources.error;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -42,14 +36,14 @@ namespace LargeSquareOne
|
||||
private Point mPoint;
|
||||
private void Panel_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
mPoint=new Point(e.X, e.Y);
|
||||
mPoint = new Point(e.X, e.Y);
|
||||
}
|
||||
|
||||
private void Panel_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
this.Location=new Point(this.Location.X+e.X-mPoint.X,this.Location.Y+e.Y-mPoint.Y);
|
||||
this.Location = new Point(this.Location.X + e.X - mPoint.X, this.Location.Y + e.Y - mPoint.Y);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LargeSquareOne
|
||||
@@ -41,14 +35,14 @@ namespace LargeSquareOne
|
||||
private Point mPoint;
|
||||
private void Panel_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
mPoint=new Point(e.X, e.Y);
|
||||
mPoint = new Point(e.X, e.Y);
|
||||
}
|
||||
|
||||
private void Panel_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
this.Location=new Point(this.Location.X+e.X-mPoint.X,this.Location.Y+e.Y-mPoint.Y);
|
||||
this.Location = new Point(this.Location.X + e.X - mPoint.X, this.Location.Y + e.Y - mPoint.Y);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -4,7 +4,6 @@ using JinYuan.VirtualDataLibrary;
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Management.Instrumentation;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LargeSquareOne
|
||||
@@ -364,7 +363,7 @@ namespace LargeSquareOne
|
||||
|
||||
private void tog_OKSwitching_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
if (CommonMethods.plcDevice.IsConnected && CommonMethods.sysConfig.OKSwitching)
|
||||
{
|
||||
CommonMethods.sysConfig.OKSwitching = true;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user