From afe210343f0d326b79dcb94621761ba81929e9a9 Mon Sep 17 00:00:00 2001 From: ww-rm Date: Mon, 24 Mar 2025 18:43:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=80=82=E5=90=88=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E6=96=87=E4=BB=B6=E7=9A=84UIEditor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SpineViewer/Spine/UITypeEditor.cs | 39 +++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 SpineViewer/Spine/UITypeEditor.cs diff --git a/SpineViewer/Spine/UITypeEditor.cs b/SpineViewer/Spine/UITypeEditor.cs new file mode 100644 index 0000000..6e75505 --- /dev/null +++ b/SpineViewer/Spine/UITypeEditor.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing.Design; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms.Design; + +namespace SpineViewer.Spine +{ + /// + /// skel 文件路径编辑器 + /// + public class SkelFileNameEditor : FileNameEditor + { + protected override void InitializeDialog(OpenFileDialog openFileDialog) + { + base.InitializeDialog(openFileDialog); + openFileDialog.Title = "选择 skel 文件"; + openFileDialog.AddExtension = false; + openFileDialog.Filter = "skel 文件 (*.skel; *.json)|*.skel;*.json|二进制文件 (*.skel)|*.skel|文本文件 (*.json)|*.json|所有文件 (*.*)|*.*"; + } + } + + /// + /// atlas 文件路径编辑器 + /// + public class AtlasFileNameEditor : FileNameEditor + { + protected override void InitializeDialog(OpenFileDialog openFileDialog) + { + base.InitializeDialog(openFileDialog); + openFileDialog.Title = "选择 atlas 文件"; + openFileDialog.AddExtension = false; + openFileDialog.Filter = "atlas 文件 (*.atlas)|*.atlas|所有文件 (*.*)|*.*"; + } + } +}