分档类型变更

This commit is contained in:
Administrator
2026-07-02 17:22:02 +08:00
parent 66df37b139
commit 3eed43af5d
412 changed files with 1320462 additions and 1620 deletions
+36 -23
View File
@@ -5,14 +5,15 @@ using JinYuan.Models;
using JinYuan.VirtualDataLibrary;
using Microsoft.Win32;
using MiniExcelLibs;
using PLCCommunication;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Windows.Forms;
using System.Linq;
using static Org.BouncyCastle.Math.EC.ECCurve;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using static Org.BouncyCastle.Math.EC.ECCurve;
namespace LargeSquareOne
{
@@ -801,28 +802,40 @@ namespace LargeSquareOne
{
try
{
var row = dgvFdConfigs.Rows[rowIndex];
var config = fdConfigs[rowIndex];
int result = CommonMethods.PlcLink.ReadInt16("D88");//判断是否停机 1为停机,0为正在运行
if (result == 1)
{
var row = dgvFdConfigs.Rows[rowIndex];
var config = fdConfigs[rowIndex];
// 更新配置对象
config.OKLD1Type = row.Cells["OKLD1Type"].Value?.ToString() ?? "";
config.OKLD2Type = row.Cells["OKLD2Type"].Value?.ToString() ?? "";
config.OKLD3Type = row.Cells["OKLD3Type"].Value?.ToString() ?? "";
config.OKLD4Type = row.Cells["OKLD4Type"].Value?.ToString() ?? "";
config.OKLD5Type = row.Cells["OKLD5Type"].Value?.ToString() ?? "";
config.OKLD6Type = row.Cells["OKLD6Type"].Value?.ToString() ?? "";
//config.NGLD5Type = row.Cells["NGLD5Type"].Value?.ToString() ?? "";
//config.NGLD6Type = row.Cells["NGLD6Type"].Value?.ToString() ?? "";
//config.NGLD7Type = row.Cells["NGLD7Type"].Value?.ToString() ?? "";
// 更新配置对象
config.OKLD1Type = row.Cells["OKLD1Type"].Value?.ToString() ?? "";
config.OKLD2Type = row.Cells["OKLD2Type"].Value?.ToString() ?? "";
config.OKLD3Type = row.Cells["OKLD3Type"].Value?.ToString() ?? "";
config.OKLD4Type = row.Cells["OKLD4Type"].Value?.ToString() ?? "";
config.OKLD5Type = row.Cells["OKLD5Type"].Value?.ToString() ?? "";
config.OKLD6Type = row.Cells["OKLD6Type"].Value?.ToString() ?? "";
//config.NGLD5Type = row.Cells["NGLD5Type"].Value?.ToString() ?? "";
//config.NGLD6Type = row.Cells["NGLD6Type"].Value?.ToString() ?? "";
//config.NGLD7Type = row.Cells["NGLD7Type"].Value?.ToString() ?? "";
config.IsFDActive = row.Cells["IsFDActive"].Value != null &&
Convert.ToBoolean(row.Cells["IsFDActive"].Value);
config.IsNGActive = row.Cells["IsNGActive"].Value != null &&
Convert.ToBoolean(row.Cells["IsNGActive"].Value);
config.IsFDActive = row.Cells["IsFDActive"].Value != null &&
Convert.ToBoolean(row.Cells["IsFDActive"].Value);
config.IsNGActive = row.Cells["IsNGActive"].Value != null &&
Convert.ToBoolean(row.Cells["IsNGActive"].Value);
// 保存更改
SaveFDConfig();
MessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
// 保存更改
SaveFDConfig();
//加载
CommonMethods.WriteGrading();
MessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
MessageBox.Show("机器正在运行不能修改", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
catch (Exception ex)
{