清理无用代码

This commit is contained in:
a88359121
2025-07-31 11:18:43 +08:00
parent 03087c0483
commit 2c4be8993c
107 changed files with 1119 additions and 1477 deletions
+1 -9
View File
@@ -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
{
+170 -104
View File
@@ -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)
{
NG_Type += "无条码_";
OK_NG = "NG";
//ed
Result = 2;
OK_NG = "NG";
}
//CCD 判定
for (int i = 0; i < 27; i++)
else if (A == 1 && B == 1 && C == 1 && D == 1 && H == 1 && J == 1)
{
//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;
}
Result = 1;
OK_NG = "OK";
}
else
{
Result = 1;
OK_NG = "OK";
}
if (A == 2)
{
NG_Type += "无条码_";
Result = 2;
}
if (B == 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 上料工位(数据处理)
@@ -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,40 +1801,38 @@ 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");
@@ -1782,14 +1841,27 @@ namespace JinYuan.ControlCenters
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]);
//条码,芯包重量,芯包侧厚,芯包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;
}
//芯包OKNG结果值判定
MyRes[i] = JudgmentResult(Code_NG, m.CCD_Data,i);
}
}
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
@@ -1896,6 +1978,12 @@ namespace JinYuan.ControlCenters
{
m.Result = MyRes[i] = 2;
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)
{
//芯包重量、测厚位移、极性
+13 -17
View File
@@ -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
{
@@ -196,9 +192,9 @@ 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 = "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,17 +436,17 @@ 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);
+5 -8
View File
@@ -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
{
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
+1 -7
View File
@@ -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>
/// 查询条件枚举
+1 -3
View File
@@ -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>
/// 初始化数据库连接
-5
View File
@@ -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
{
-5
View File
@@ -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 -5
View File
@@ -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
View File
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
-4
View File
@@ -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
{
+2 -7
View File
@@ -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,8 +7,6 @@ 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
@@ -21,7 +16,7 @@ namespace JinYuan.DAL
{
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;
-1
View File
@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Helper
{
-1
View File
@@ -6,7 +6,6 @@ using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Helper
{
-4
View File
@@ -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
+2 -6
View File
@@ -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>
/// 字节数组高低位转换
+2 -6
View File
@@ -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"))
{
-3
View File
@@ -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
{
-3
View File
@@ -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;
+6 -6
View File
@@ -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 -5
View File
@@ -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
{
-2
View File
@@ -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
{
+61 -65
View File
@@ -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();
}
}
}
}
-3
View File
@@ -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
{
-2
View File
@@ -1,7 +1,5 @@
using NLog;
using System;
using System.IO;
using System.Linq;
public class LoggerHelp
{
-2
View File
@@ -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;
// 有关程序集的一般信息由以下
-2
View File
@@ -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
{
+7 -11
View File
@@ -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
{
@@ -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
{
@@ -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);
}
}
-4
View File
@@ -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
{
-3
View File
@@ -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
{
-4
View File
@@ -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
{
-3
View File
@@ -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
{
+2 -6
View File
@@ -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 -6
View File
@@ -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 -6
View File
@@ -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 -5
View File
@@ -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>
+6 -9
View File
@@ -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
{
+1 -6
View File
@@ -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;
+1 -5
View File
@@ -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 -7
View File
@@ -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 -5
View File
@@ -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
{
+3 -7
View File
@@ -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; }
}
@@ -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 -5
View File
@@ -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 -5
View File
@@ -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 -5
View File
@@ -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 -7
View File
@@ -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>
+1 -7
View File
@@ -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 -5
View File
@@ -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 -5
View File
@@ -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 -7
View File
@@ -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
View File
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
+1 -7
View File
@@ -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
{
-5
View File
@@ -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 -7
View File
@@ -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
{
-4
View File
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models
{
-5
View File
@@ -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
{
File diff suppressed because it is too large Load Diff
+1 -11
View File
@@ -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个,我们不能随心所欲的任意填写这个值,否则
+20 -24
View File
@@ -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 -7
View File
@@ -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 -7
View File
@@ -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>
/// 不良統計
-5
View File
@@ -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
View File
@@ -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 -7
View File
@@ -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>
/// 智能电表
-5
View File
@@ -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 -6
View File
@@ -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 -6
View File
@@ -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>
@@ -106,7 +102,7 @@ namespace JinYuan.Models
/// <summary>
/// 定义报警触发和消除事件
/// </summary>
public event Action<bool,Variable> AlarmTrigEvent;
public event Action<bool, Variable> AlarmTrigEvent;
/// <summary>
/// 变量初始化
+1 -7
View File
@@ -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>
/// 所有窗体枚举,小于临界窗体的为固定窗体,不执行关闭
-4
View File
@@ -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
{
-5
View File
@@ -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
{
-5
View File
@@ -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
{
-5
View File
@@ -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 -6
View File
@@ -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; }
+2 -8
View File
@@ -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>
+1 -7
View File
@@ -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
{
+3 -9
View File
@@ -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
{
@@ -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>
@@ -49,7 +43,7 @@ namespace JinYuan.Models
/// <summary>
/// 是否下降沿报警
/// </summary>
public bool NegAlarm { get; set;}
public bool NegAlarm { get; set; }
/// <summary>
/// 转换系数
/// </summary>
+9 -12
View File
@@ -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
{
@@ -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;//高托杯
-4
View File
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.VirtualDataLibrary
{
+1 -6
View File
@@ -1,11 +1,6 @@
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
{
+1 -5
View File
@@ -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;
// 有关程序集的一般信息由以下
+1 -1
View File
@@ -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()}");
+4 -12
View File
@@ -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);
@@ -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();
+2 -4
View File
@@ -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
@@ -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;
}
+18 -23
View File
@@ -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
{
@@ -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,26 +121,26 @@ 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();
}
}
@@ -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)
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;
-7
View File
@@ -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
+3 -9
View File
@@ -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
@@ -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
+2 -9
View File
@@ -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();
+6 -6
View File
@@ -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
{
+2 -7
View File
@@ -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
+4 -10
View File
@@ -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;
@@ -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
+2 -8
View File
@@ -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
-1
View File
@@ -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
+1 -7
View File
@@ -1,18 +1,12 @@
using JinYuan.CommunicationLib.Enum;
using JinYuan.CommunicationLib.Interface;
using PLCCommunication;
using JinYuan.Helper;
using JinYuan.Models;
using JinYuan.VirtualDataLibrary;
using SqlSugar;
using PLCCommunication;
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

Some files were not shown because too many files have changed in this diff Show More