From ef52fd6fd07508883dce4eb002acda59f0169e59 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期四, 23 四月 2026 10:19:33 +0800
Subject: [PATCH] 优化;
---
Plugin.TsExecution/ScreenTouch.xaml.cs | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Plugin.TsExecution/ScreenTouch.xaml.cs b/Plugin.TsExecution/ScreenTouch.xaml.cs
index 4145554..431f740 100644
--- a/Plugin.TsExecution/ScreenTouch.xaml.cs
+++ b/Plugin.TsExecution/ScreenTouch.xaml.cs
@@ -130,10 +130,12 @@
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;
}
--
Gitblit v1.9.1