清理无用代码

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
+3 -3
View File
@@ -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)
{
+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()}");
+6 -14
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);
@@ -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();
+7 -9
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
@@ -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); //设置字体颜色
+24 -29
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
{
@@ -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;
}
}
}
-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
+6 -12
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
@@ -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
}
}
+3 -10
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();
@@ -73,7 +66,7 @@ namespace LargeSquareOne
}
}
private void txt_LoginMesName_KeyDown(object sender, KeyEventArgs e)
{
+16 -16
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
{
@@ -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)
{
+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
+5 -11
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;
@@ -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
+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 -2
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
@@ -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;
+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
-5
View File
@@ -1,13 +1,8 @@
using JinYuan.Helper;
using JinYuan.VirtualDataLibrary;
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
+7 -8
View File
@@ -1,5 +1,4 @@
using HML;
using JinYuan.Helper;
using JinYuan.Helper;
using JinYuan.Models;
using JinYuan.VirtualDataLibrary;
using System;
@@ -52,7 +51,7 @@ namespace LargeSquareOne
this.txtICCard.Text = sysAdmin.LoginUid;
this.txt_LoginPwd.Text = sysAdmin.LoginPwd;
this.txt_LoginPwd2.Text = sysAdmin.LoginPwd;
this.cmbUserLevel.Text= sysAdmin.LoginLevel;
this.cmbUserLevel.Text = sysAdmin.LoginLevel;
this.chk_SystemLog.Checked = sysAdmin.SystemLog;
this.chk_CPK.Checked = sysAdmin.CpkData;
this.chk_HistorySelect.Checked = sysAdmin.HistoryData;
@@ -202,7 +201,7 @@ namespace LargeSquareOne
LoginId = sysAdmins[this.dgv_Main.SelectedRows[0].Index].LoginId,
LoginName = this.txt_LoginName.Text.Trim(),
LoginPwd = StringSecurityHelper.DESEncrypt(this.txt_LoginPwd.Text.Trim()),
LoginUid=this.txtICCard.Text.Trim(),
LoginUid = this.txtICCard.Text.Trim(),
LoginLevel = CommonMethods.mesConfig.userLevel,
SystemLog = this.chk_SystemLog.Checked,
CpkData = this.chk_CPK.Checked,
@@ -306,14 +305,14 @@ namespace LargeSquareOne
}
}
DateTime dt1;
DateTime dt1;
DateTime dt2;
private void txtICCard_KeyUp(object sender, KeyEventArgs e)
{
string Item= txtICCard.Text.Trim();
if (txtICCard.TextLength==1)
string Item = txtICCard.Text.Trim();
if (txtICCard.TextLength == 1)
{
dt1 =System.DateTime.Now;
dt1 = System.DateTime.Now;
}
if (txtICCard.TextLength == 2)
{
+3 -2
View File
@@ -335,7 +335,8 @@ namespace LargeSquareOne
if (value == null || value.ToString().Length == 0)
{
e.Value = "---";
};
}
;
}
}
@@ -352,7 +353,7 @@ namespace LargeSquareOne
int index = e.RowIndex;
UpdateVariable(SignelVariables[e.RowIndex]); //Variable variable
}
}
+1 -7
View File
@@ -1,18 +1,12 @@
using JinYuan.ControlCenters;
using JinYuan.Helper;
using JinYuan.Models;
using JinYuan.Helper;
using JinYuan.VirtualDataLibrary;
using NLog;
using NLog.Config;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LargeSquareOne
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
+17 -17
View File
@@ -27,7 +27,7 @@ namespace LargeSquareOne
#endregion
private int subgroupSize =5;
private int subgroupSize = 5;
[Browsable(true)]
[Category("自定义属性")]
[Description("设置或获取子组大小值")]
@@ -86,9 +86,9 @@ namespace LargeSquareOne
this.Invalidate();
}
}
private CPKModel _cPKData=new CPKModel();
private CPKModel _cPKData = new CPKModel();
[Browsable(true)]
[Category("自定义属性")]
[Description("获取目标值")]
@@ -97,7 +97,7 @@ namespace LargeSquareOne
get { return _cPKData; }
set
{
if (value!=null)
if (value != null)
{
_cPKData = value;
//总样本数
@@ -114,7 +114,7 @@ namespace LargeSquareOne
listView1.Items[3].SubItems[3].Text = _cPKData.Neg3Sigma.ToString();
// 组内标准差值
listView2.Items[0].SubItems[1].Text= _cPKData.GroupSTDEV.ToString();
listView2.Items[0].SubItems[1].Text = _cPKData.GroupSTDEV.ToString();
// 整体标准差值
listView2.Items[0].SubItems[2].Text = _cPKData.WholeSTDEV.ToString();
@@ -151,10 +151,10 @@ namespace LargeSquareOne
// 整体PPMN Total值
listView2.Items[7].SubItems[2].Text = _cPKData.WholePPM_Total.ToString();
lbl_Ca.Text= _cPKData.CA.ToString();
lbl_Ca.Text = _cPKData.CA.ToString();
this.Invalidate();
}
}
}
@@ -172,15 +172,15 @@ namespace LargeSquareOne
// 假设ListView控件的名称为listView1
// 添加列头
listView1.Columns.Add("项目1",80);
listView1.Columns.Add("数值1",90);
listView1.Columns.Add("项目2",80);
listView1.Columns.Add("项目1", 80);
listView1.Columns.Add("数值1", 90);
listView1.Columns.Add("项目2", 80);
listView1.Columns.Add("数值2", 90);
listView1.Columns.Add("项目3", 80);
listView1.Columns.Add("数值3", 95);
// 创建一个ListViewItem对象,并将数据添加到指定单元格 0
ListViewItem item1_1 = new ListViewItem("总样本数");
ListViewItem item1_1 = new ListViewItem("总样本数");
item1_1.SubItems.Add("0");
item1_1.SubItems.Add("子组大小");
item1_1.SubItems.Add("0");
@@ -233,32 +233,32 @@ namespace LargeSquareOne
item2_2.SubItems.Add("0");
item2_2.SubItems.Add("0");
item2_2.SubItems.Add("");
listView2.Items.Add(item2_2);
listView2.Items.Add(item2_2);
ListViewItem item2_3 = new ListViewItem("CP");//2
item2_3.SubItems.Add("0");
item2_3.SubItems.Add("0");
item2_3.SubItems.Add("");
listView2.Items.Add(item2_3);
listView2.Items.Add(item2_3);
ListViewItem item2_4 = new ListViewItem("CPL");//3
item2_4.SubItems.Add("0");
item2_4.SubItems.Add("0");
item2_4.SubItems.Add("");
listView2.Items.Add(item2_4);
listView2.Items.Add(item2_4);
ListViewItem item2_5 = new ListViewItem("CPU");//4
item2_5.SubItems.Add("0");
item2_5.SubItems.Add("0");
item2_5.SubItems.Add("");
listView2.Items.Add(item2_5);
listView2.Items.Add(item2_5);
ListViewItem item2_6 = new ListViewItem("PPM<LSL");//5
item2_6.SubItems.Add("0");
item2_6.SubItems.Add("0");
item2_6.SubItems.Add("0");
listView2.Items.Add(item2_6);
listView2.Items.Add(item2_6);
ListViewItem item2_7 = new ListViewItem("PPM>USL");//6
item2_7.SubItems.Add("0");
item2_7.SubItems.Add("0");
item2_7.SubItems.Add("0");
listView2.Items.Add(item2_7);
listView2.Items.Add(item2_7);
ListViewItem item2_8 = new ListViewItem("PPM Total");//7
item2_8.SubItems.Add("0");
item2_8.SubItems.Add("0");