feat: 新增时间输入和Alt按钮快捷键
This commit is contained in:
@@ -30,6 +30,9 @@ namespace Lskj.PubSpec
|
||||
{
|
||||
public partial class FrmMain : BaseForm
|
||||
{
|
||||
private readonly AltButtonShortcutManager mAltButtonShortcuts =
|
||||
new AltButtonShortcutManager();
|
||||
|
||||
private bool _existsPid = false;
|
||||
/// <summary>
|
||||
/// 主键
|
||||
@@ -59,6 +62,23 @@ namespace Lskj.PubSpec
|
||||
public FrmMain()
|
||||
{
|
||||
InitializeComponent();
|
||||
InitializeAltButtonShortcuts();
|
||||
}
|
||||
|
||||
private void InitializeAltButtonShortcuts()
|
||||
{
|
||||
mAltButtonShortcuts.Register(btnExport, Keys.E);
|
||||
mAltButtonShortcuts.Register(btnSave, Keys.S);
|
||||
mAltButtonShortcuts.Register(btnDelete, Keys.D);
|
||||
mAltButtonShortcuts.Register(btnAdd, Keys.A);
|
||||
mAltButtonShortcuts.Register(btnRefresh, Keys.R);
|
||||
}
|
||||
|
||||
protected override bool ProcessCmdKey(
|
||||
ref System.Windows.Forms.Message msg, Keys keyData)
|
||||
{
|
||||
return mAltButtonShortcuts.ProcessKey(keyData) ||
|
||||
base.ProcessCmdKey(ref msg, keyData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user