From 9d1660270272180cd71147d6ddd53d1382643d2e Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 02 十一月 2026 18:00:14 +0800
Subject: [PATCH] merge: 并入远程 Initial commit 作为历史根节点

---
 Plugin.StandardTest/ScreenTouchWin.xaml.cs |   67 +++++++++++++++++++++++++++++++++
 1 files changed, 67 insertions(+), 0 deletions(-)

diff --git a/Plugin.StandardTest/ScreenTouchWin.xaml.cs b/Plugin.StandardTest/ScreenTouchWin.xaml.cs
new file mode 100644
index 0000000..ff5d892
--- /dev/null
+++ b/Plugin.StandardTest/ScreenTouchWin.xaml.cs
@@ -0,0 +1,67 @@
+锘縰sing Panuon.WPF.UI;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace Plugin.StandardTest
+{
+    /// <summary>
+    /// ScreenTouchWin.xaml 鐨勪氦浜掗�昏緫
+    /// </summary>
+    public partial class ScreenTouchWin : WindowX
+    {
+        private ScreenGrid screenGrid;
+        private ScreenTouch[] screens;
+
+        public ScreenTouchWin(ScreenTouch[] configs)
+        {
+            screenGrid = new ScreenGrid(1, configs.Length);
+            screens = new ScreenTouch[configs.Length];
+            InitializeComponent();
+
+            int space = 2 * (screens.Length + 1);
+            for (int i = 0; i < screens.Length; i++)
+            {
+                var screen = new ScreenTouch(configs[i].rows, configs[i].columns)
+                {
+                    Width = Math.Max(Math.Floor((this.ActualHeight / 9 * 16 - space) / screens.Length), 0),
+                    Height = Math.Max(Math.Floor((this.ActualHeight / 9 * 16 - space) / screens.Length / 16 * 9), 0)
+                };
+
+                screen.SetBinding(ScreenTouch.ValuesProperty, new Binding(nameof(ScreenTouch.Values)) { Source = configs[i], Mode = BindingMode.OneWay });
+
+                screens[i] = screen;
+                screenGrid.AddScreen(screen, 0, i);
+            }
+
+            grid.Children.Add(screenGrid);
+        }
+
+        private void Window_SizeChanged(object sender, SizeChangedEventArgs e)
+        {
+            if (screenGrid == null)
+            {
+                return;
+            }
+            int space = 2 * (screens.Length + 1);
+
+            for (int i = 0; i < screens.Length; i++)
+            {
+                var screen = screens[i];
+                screen.Width = Math.Max(Math.Floor((this.ActualHeight / 9 * 16 - space) / screens.Length), 0);
+                screen.Height = Math.Max(Math.Floor((this.ActualHeight / 9 * 16 - space) / screens.Length / 16 * 9), 0);
+            }
+        }
+    }
+}

--
Gitblit v1.9.1