feat: 新增时间输入和Alt按钮快捷键
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user