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/RoundButton.cs |   77 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 77 insertions(+), 0 deletions(-)

diff --git a/HotelPms.Share.Windows/Component/RoundButton.cs b/HotelPms.Share.Windows/Component/RoundButton.cs
new file mode 100644
index 0000000..1d7f067
--- /dev/null
+++ b/HotelPms.Share.Windows/Component/RoundButton.cs
@@ -0,0 +1,77 @@
+using HotelPms.Share.Windows.Util;
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace HotelPms.Share.Windows.Component
+{
+    public class RoundButton : System.Windows.Forms.Control
+    {
+        private StringFormat m_StringFormat = new StringFormat(StringFormatFlags.NoWrap);
+
+        public RoundButton()
+        {
+            //base.BackColor = Color.Transparent;
+            //BackColor = Color.Black;
+            //ForeColor = Color.White;
+            SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.SupportsTransparentBackColor | ControlStyles.UserPaint, true);
+            SetStyle(ControlStyles.Opaque, false);
+            m_StringFormat.Alignment = StringAlignment.Center;
+            m_StringFormat.LineAlignment = StringAlignment.Center;
+        }
+
+
+        protected override void Dispose(bool disposing)
+        {
+            //img.Dispose();
+            m_StringFormat.Dispose();
+            base.Dispose(disposing);
+        }
+
+        protected override void OnPaint(PaintEventArgs e)
+        {
+            base.OnPaint(e);
+
+            //if (img == null)
+            //{
+            //    img = Image.FromFile(Application.StartupPath + @"\avatar5.png");
+            //    imgEllipse = GdiPlus.CutEllipse(img, new Rectangle(0, 0, img.Size.Width, img.Size.Height), img.Size);
+            //}
+
+
+            //GdiPlus.FillRoundRectangle(e.Graphics, Brushes.DarkBlue, (RectangleF)ClientRectangle, 24);
+            //e.Graphics.DrawImage(imgEllipse, new Rectangle(5, 5, ClientRectangle.Size.Height - 10, ClientRectangle.Size.Height - 10));
+            //GdiPlus.DrawRoundRectangle(e.Graphics, Pens.Red, (RectangleF)ClientRectangle, 15);                        
+
+
+            //TextRenderer.DrawText();
+            //TextRenderer.MeasureText()
+        }
+
+        private static GraphicsPath CreateRoundRectangle(Rectangle rectangle, int radius)
+        {
+            radius += 10;
+            GraphicsPath path = new GraphicsPath();
+            int l = rectangle.Left;
+            int t = rectangle.Top;
+            int w = rectangle.Width;
+            int h = rectangle.Height;
+            int d = radius << 1;
+            path.AddArc(l, t, d, d, 180, 90); // topleft
+            path.AddLine(l + radius, t, l + w - radius, t); // top
+            path.AddArc(l + w - d, t, d, d, 270, 90); // topright
+            path.AddLine(l + w, t + radius, l + w, t + h - radius); // right
+            path.AddArc(l + w - d, t + h - d, d, d, 0, 90); // bottomright
+            path.AddLine(l + w - radius, t + h, l + radius, t + h); // bottom
+            path.AddArc(l, t + h - d, d, d, 90, 90); // bottomleft
+            path.AddLine(l, t + h - radius, l, t + radius); // left
+            path.CloseFigure();
+            return path;
+        }
+    }
+}

--
Gitblit v1.10.0