4.11更新

1.添加是否调用mes接口按钮,并只有admin用户可以点击,2.修改螺丝引导页面
3.端子只有一个,端子扫码借用扫码页面
This commit is contained in:
zhougf committed 2025-04-11 15:47:10 +08:00
1 parent 752e1f37b6
commit 69c851c09e
15 files changed
+1006 -387

No files matched your search

@@ -34,7 +34,7 @@ namespace WindowsFormsApp1
// 圆形标记相关参数
private float currentRadius = 20f;
private const float MIN_RADIUS = 20f;
private const float MIN_RADIUS = 25f;
private const float MAX_RADIUS = 50f;
private bool isExpanding = true;
private const float RADIUS_CHANGE_SPEED = 2f;
@@ -44,6 +44,24 @@ namespace WindowsFormsApp1
public SimpleImageDisplayForm()
{
InitializeComponent();
// 添加窗体加载事件
this.Load += ImageDisplayForm_Load;
}
private void ImageDisplayForm_Load(object sender, EventArgs e)
{
// 设置窗体大小为屏幕工作区的80%
Screen screen = Screen.FromControl(this);
this.Size = new Size(
(int)(screen.WorkingArea.Width * 0.8),
(int)(screen.WorkingArea.Height * 0.8)
);
this.CenterToScreen();
// 或者使用以下代码设置为全屏但非最大化
// this.WindowState = FormWindowState.Normal;
// this.FormBorderStyle = FormBorderStyle.None;
// this.Bounds = Screen.FromControl(this).Bounds;
}
#endregion
@@ -53,7 +71,7 @@ namespace WindowsFormsApp1
{
if (originalImage == null)
return;
markedImage.Dispose();
markedImage = new Bitmap(originalImage);
using (Graphics g = Graphics.FromImage(markedImage))
{
@@ -63,9 +81,9 @@ namespace WindowsFormsApp1
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
// 只绘制白色圆
using (Brush whiteBrush = new SolidBrush(Color.White))
using (var brush = new Pen(Color.Yellow))
{
g.FillEllipse(whiteBrush,
g.DrawEllipse(brush,
x - currentRadius,
y - currentRadius,
currentRadius * 2,