alielie
2026-06-04 771a0e7b6b1276087515bbe94de28358cb92963b
Plugin.TsExecution/ScreenTouch.xaml.cs
@@ -1,4 +1,5 @@
using 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)
@@ -140,6 +142,25 @@
            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;
        }
        private void PaintPoints()
        {
            for (int i = 0; i < Values.Count; i++)