From b544d5cccd76735e034c8055918a50927b437474 Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期二, 10 十一月 2026 08:29:04 +0800
Subject: [PATCH] fix: 维护模式重复进入失败与按钮灰死 + Broker 并发验证用例
---
Plugin.TsExecution/ScreenTouch.xaml.cs | 27 +++++++++++++++++++++++++--
1 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/Plugin.TsExecution/ScreenTouch.xaml.cs b/Plugin.TsExecution/ScreenTouch.xaml.cs
index 4145554..4cf1f19 100644
--- a/Plugin.TsExecution/ScreenTouch.xaml.cs
+++ b/Plugin.TsExecution/ScreenTouch.xaml.cs
@@ -1,4 +1,5 @@
锘縰sing HMI.Base;
+using HMI.UI.DpUtil;
using System;
using System.Collections.ObjectModel;
using System.Globalization;
@@ -108,6 +109,7 @@
children[i] = border;
uniform.Children.Add(border);
}
+ UniformGridHelper.RefreshGridInnerBorder(uniform);
}
public void Refresh(int rows, int columns)
@@ -130,10 +132,31 @@
public void DrawPoints(int[][] points)
{
var temp = new ObservableCollection<bool>(new bool[rows * columns]);
- foreach (int[] point in points)
+ for (int i = 0; i < points.Length; i++)
{
+ int[] point = points[i];
+ int index = point[1] * columns + point[0];
//children[point[0]][point[1]].Background = Brushes.Green;
- temp[point[1] * columns + point[0]] = true;
+ temp[index] = true;
+ }
+ Values = temp;
+ }
+
+ public void DrawNewPoints(int[][] points)
+ {
+ var temp = Values == null ?
+ new ObservableCollection<bool>(new bool[rows * columns]) :
+ new ObservableCollection<bool>(Values);
+ for (int i = 0; i < points.Length; i++)
+ {
+ int[] point = points[i];
+ if (point == null)
+ {
+ continue;
+ }
+ int index = point[1] * columns + point[0];
+ //children[point[0]][point[1]].Background = Brushes.Green;
+ temp[index] = true;
}
Values = temp;
}
--
Gitblit v1.9.1