휴가 승인자 정보 추적

This commit is contained in:
chi
2024-05-08 14:53:55 +09:00
parent 7eb2dbd2cd
commit e4f8981491
201 changed files with 1355 additions and 3219 deletions

View File

@@ -4,6 +4,7 @@ using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.ServiceModel.Security;
using System.Text;
using System.Windows.Forms;
@@ -41,12 +42,28 @@ namespace FCOMMON
{
var form = this as Form;
FCOMMON.Util.SetFormStatus(ref form, this.Name, true);
}
if (this.WindowState == FormWindowState.Minimized) this.WindowState = FormWindowState.Normal;
if (this.RestoreBounds.X + this.RestoreBounds.Width < 300 && this.RestoreBounds.X < 0)
this.Location = new Point(0, 0);
EnsureVisibleAndUsableSize();
}
protected void EnsureVisibleAndUsableSize()
{
var visibleBounds = Screen.GetWorkingArea(this);
var isOutOfView = (Left > visibleBounds.Right) || (Top > visibleBounds.Bottom) ||
(Right < visibleBounds.Left) || (Bottom < visibleBounds.Top);
if (isOutOfView)
{
CenterToScreen();
}
var minW = Math.Max(320, this.MinimumSize.Width);
var minH = Math.Max(240, this.MinimumSize.Height);
if (Width < minW || Height < minH)
{
this.Size = new Size(minW, minH);
}
}
}
}