feat: 新增时间输入和Alt按钮快捷键

This commit is contained in:
cyf
2026-08-15 22:26:11 +08:00
parent a65dfab897
commit 57dedb5e9d
23 changed files with 818 additions and 233 deletions
+26 -2
View File
@@ -29,11 +29,35 @@ namespace Lskj.Control
{
public partial class AuditPanel2 : UserControl
{
private readonly AltButtonShortcutManager mAltButtonShortcuts =
new AltButtonShortcutManager();
public AuditPanel2()
{
InitializeComponent();
InitializeAltButtonShortcuts();
SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.Selectable | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.SupportsTransparentBackColor, true);
}
private void InitializeAltButtonShortcuts()
{
mAltButtonShortcuts.Register(btnClose, Keys.Q);
mAltButtonShortcuts.Register(btnBack, Keys.N);
mAltButtonShortcuts.Register(btnSave, Keys.S);
mAltButtonShortcuts.Register(btnAccradit, Keys.Y);
mAltButtonShortcuts.Register(btnSpare, Keys.P);
mAltButtonShortcuts.Register(btnReflash, Keys.R);
mAltButtonShortcuts.Register(btnSearch, Keys.Q);
mAltButtonShortcuts.Register(btnBackTop, Keys.W);
}
protected override bool ProcessCmdKey(
ref System.Windows.Forms.Message msg, Keys keyData)
{
return mAltButtonShortcuts.ProcessKey(keyData) ||
base.ProcessCmdKey(ref msg, keyData);
}
#region
public string modelkeyName = "";
/// <summary>
@@ -1601,7 +1625,7 @@ namespace Lskj.Control
this.btnClose.Enabled = this.btnSave.Enabled = this.btnAccradit.Enabled = this.btnBack.Enabled = this.btnSpare.Enabled = false;
this.btnSave.Visible = this.btnClose.Visible = this.btnBack.Visible = this.pcTool.Visible = true;
this.btnAccradit.Text = "确认(&Y)";
this.btnAccradit.Text = "确认(Y)";
return;
}
@@ -3624,4 +3648,4 @@ namespace Lskj.Control
}
}
}
}