编辑通信组有问题
This commit is contained in:
@@ -84,6 +84,7 @@ namespace JinYuan.Helper
|
|||||||
{
|
{
|
||||||
EventMsg msg = (EventMsg)Marshal.PtrToStructure(lParam, typeof(EventMsg));
|
EventMsg msg = (EventMsg)Marshal.PtrToStructure(lParam, typeof(EventMsg));
|
||||||
codes.Add(msg);
|
codes.Add(msg);
|
||||||
|
Debug.WriteLine($"scanerEvent: {codes.Result}, msg.message: {msg.message}, msg.paramH: {msg.paramH}");
|
||||||
if (ScanerEvent != null && msg.message == 13 && msg.paramH > 0 && !string.IsNullOrEmpty(codes.Result))
|
if (ScanerEvent != null && msg.message == 13 && msg.paramH > 0 && !string.IsNullOrEmpty(codes.Result))
|
||||||
{
|
{
|
||||||
ScanerEvent(codes);
|
ScanerEvent(codes);
|
||||||
|
|||||||
@@ -177,7 +177,13 @@ namespace LargeSquareOne
|
|||||||
{
|
{
|
||||||
if (e.RowIndex < 0) return;
|
if (e.RowIndex < 0) return;
|
||||||
|
|
||||||
editingConfig = TotalGroups[e.RowIndex];
|
// 获取当前行显示的数据
|
||||||
|
var currentRow = groupTable.Rows[e.RowIndex];
|
||||||
|
var config = (PlcGroupConfig)currentRow.DataBoundItem;
|
||||||
|
editingConfig = TotalGroups.First(g =>
|
||||||
|
g.PlcNum == config.PlcNum &&
|
||||||
|
g.GroupName == config.GroupName &&
|
||||||
|
g.Start == config.Start);
|
||||||
|
|
||||||
// 禁止编辑PLC编号和组名列
|
// 禁止编辑PLC编号和组名列
|
||||||
if (groupTable.Columns[e.ColumnIndex].Name == "PlcNum")
|
if (groupTable.Columns[e.ColumnIndex].Name == "PlcNum")
|
||||||
@@ -193,7 +199,13 @@ namespace LargeSquareOne
|
|||||||
{
|
{
|
||||||
if (e.RowIndex < 0 || e.RowIndex >= TotalGroups.Count) return;
|
if (e.RowIndex < 0 || e.RowIndex >= TotalGroups.Count) return;
|
||||||
|
|
||||||
var config = TotalGroups[e.RowIndex];
|
// 获取当前行显示的数据
|
||||||
|
var currentRow = groupTable.Rows[e.RowIndex];
|
||||||
|
var curConfig = (PlcGroupConfig)currentRow.DataBoundItem;
|
||||||
|
var config = TotalGroups.First(g =>
|
||||||
|
g.PlcNum == curConfig.PlcNum &&
|
||||||
|
g.GroupName == curConfig.GroupName &&
|
||||||
|
g.Start == curConfig.Start);
|
||||||
var value = groupTable[e.ColumnIndex, e.RowIndex].Value;
|
var value = groupTable[e.ColumnIndex, e.RowIndex].Value;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|||||||
Reference in New Issue
Block a user