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 作为历史根节点

---
 HMI.MenuManage/Modal/IconSelector.xaml.cs |   72 ++++++++++++++++++++++++++++++++++++
 1 files changed, 72 insertions(+), 0 deletions(-)

diff --git a/HMI.MenuManage/Modal/IconSelector.xaml.cs b/HMI.MenuManage/Modal/IconSelector.xaml.cs
new file mode 100644
index 0000000..f1e5609
--- /dev/null
+++ b/HMI.MenuManage/Modal/IconSelector.xaml.cs
@@ -0,0 +1,72 @@
+锘縰sing HMI.MenuManage.Entity;
+using Newtonsoft.Json;
+using Panuon.WPF.UI;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+
+namespace HMI.MenuManage
+{
+    /// <summary>
+    /// ModalWindow.xaml 鐨勪氦浜掗�昏緫
+    /// </summary>
+    public partial class IconSelector : WindowX
+    {
+
+        private static readonly List<IconMeta> icons;
+
+        private string data;
+        public string Data
+        {
+            get => data;
+            set { Set(ref data, value); }
+        }
+
+        static IconSelector()
+        {
+            try
+            {
+                Assembly assembly = Assembly.Load("HMI.UI");
+                var serializer = new JsonSerializer();
+                var sb = assembly.GetManifestResourceNames();
+                using (Stream stream = assembly.GetManifestResourceStream("HMI.UI.Resources.Font.iconfont.json"))
+                using (StreamReader streamReader = new StreamReader(stream))
+                using (JsonTextReader jsonTextReader = new JsonTextReader(streamReader))
+                {
+                    IconHolder holder = serializer.Deserialize<IconHolder>(jsonTextReader);
+                    icons = holder?.glyphs;
+                }
+            }
+            catch (Exception ex)
+            {
+
+            }
+        }
+
+        public IconSelector()
+        {
+            DataContext = this;
+            InitializeComponent();
+        }
+        private bool _isProcessing;
+
+
+        protected override void OnClosing(CancelEventArgs e)
+        {
+            base.OnClosing(e);
+        }
+
+        public bool? Open(string currentValue)
+        {
+            list.ItemsSource = icons?.Select(i => i.Code).ToList();
+            Data = currentValue;
+            return this.ShowDialog();
+        }
+
+
+    }
+}

--
Gitblit v1.9.1