From 1a1c8e71fcd14858f595029f089b2d4a00202b32 Mon Sep 17 00:00:00 2001
From: ogi <Administrator@S-OGI-PC>
Date: Fri, 05 Dec 2025 09:24:16 +0900
Subject: [PATCH] プロジェクトファイルを追加。
---
HotelPms.Share.Windows/Component/PropertyEditor/InputTypeEditor.cs | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 48 insertions(+), 0 deletions(-)
diff --git a/HotelPms.Share.Windows/Component/PropertyEditor/InputTypeEditor.cs b/HotelPms.Share.Windows/Component/PropertyEditor/InputTypeEditor.cs
new file mode 100644
index 0000000..50f70ac
--- /dev/null
+++ b/HotelPms.Share.Windows/Component/PropertyEditor/InputTypeEditor.cs
@@ -0,0 +1,48 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Drawing.Design;
+using System.ComponentModel;
+using System.Windows.Forms.Design;
+using HotelPms.Share.Windows.Component.PropertyDialog;
+using System.Windows.Forms;
+
+namespace HotelPms.Share.Windows.Component.PropertyEditor
+{
+ public class InputTypeEditor : UITypeEditor
+ {
+ public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
+ {
+ if (context != null && context.Instance != null)
+ {
+ return UITypeEditorEditStyle.Modal;
+ }
+
+ return base.GetEditStyle(context);
+ }
+
+ public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
+ {
+ IWindowsFormsEditorService editorService = null;
+
+ if (context != null && context.Instance != null && provider != null)
+ {
+ editorService = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
+ if (editorService != null)
+ {
+ CTextBox control = (CTextBox)context.Instance;
+ using (FormInputType dlg = new FormInputType(control.InputType))
+ {
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ value = dlg.InputType;
+ return value;
+ }
+ }
+ }
+ }
+
+ return value;
+ }
+ }
+}
--
Gitblit v1.10.0