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/Tool/CalendarSelector.cs | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 55 insertions(+), 0 deletions(-)
diff --git a/HotelPms.Share.Windows/Tool/CalendarSelector.cs b/HotelPms.Share.Windows/Tool/CalendarSelector.cs
new file mode 100644
index 0000000..4e89f02
--- /dev/null
+++ b/HotelPms.Share.Windows/Tool/CalendarSelector.cs
@@ -0,0 +1,55 @@
+using HotelPms.Share.Util;
+using HotelPms.Share.Windows.Component;
+using HotelPms.Share.Windows.Util;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace HotelPms.Share.Windows.Tool
+{
+ public partial class CalendarSelector : FormBase
+ {
+ public DateTime SelDate { get; set; } = DateTime.Now;
+ public Control OwnerControl { get; set; } = null;
+
+ public CalendarSelector(Control obj)
+ {
+ InitializeComponent();
+ OwnerControl = obj;
+ }
+
+ private void Calendar1_DateSelect(object sender, CalendarEventArgs e)
+ {
+ SelDate = calendar1.Value;
+ OwnerControl.Text = calendar1.Text;
+ this.DialogResult = DialogResult.OK;
+ }
+
+ private void CalendarSelector_Load(object sender, EventArgs e)
+ {
+ calendar1.Value = CConvert.ToDateTime(OwnerControl.Text);
+ //Point location = this.Location;
+ //GeneralSub.GetLocationToScreen(OwnerControl, ref location);
+ //this.Location = location;
+ }
+
+ public static DialogResult Execute(Control obj)
+ {
+ using (CalendarSelector form = new CalendarSelector(obj))
+ {
+ return form.ShowDialog();
+ }
+ }
+
+ private void Calendar1_DayCellFormat(object sender, CalendarEventArgs e)
+ {
+ if (e.DateValue.ToString("MMdd") == "0101") { e.Holiday = "元旦"; }
+ }
+ }
+}
--
Gitblit v1.10.0