This commit is contained in:
he
2023-02-14 15:14:38 +08:00
parent a696b0f1a8
commit 813cc033c6
3 changed files with 27 additions and 24 deletions
@@ -65,7 +65,8 @@ namespace IRaCIS.Core.Application.Service
CtrlKey = isnull ? false : key.CtrlKey,
MetaKey = isnull ? false : key.MetaKey,
ShiftKey = isnull ? false : key.ShiftKey,
KeyboardShow = isnull ? defaultkey.KeyboardShow : key.KeyboardShow,
Text = isnull ? defaultkey.Text : key.Text,
Code = isnull ? defaultkey.Code : key.Code,
});
});
@@ -82,24 +83,24 @@ namespace IRaCIS.Core.Application.Service
private List<ShortcutKey> GetDefaultShortcutKey()
{
List<ShortcutKey> shortcutKeys = new List<ShortcutKey>() {
new ShortcutKey (){ ShortcutKeyEnum=1,Keyboardkey="right",KeyboardShow="right" },
new ShortcutKey (){ ShortcutKeyEnum=2,Keyboardkey="left",KeyboardShow="left"},
new ShortcutKey (){ ShortcutKeyEnum=3,Keyboardkey="PageUp",KeyboardShow="PageUp"},
new ShortcutKey (){ ShortcutKeyEnum=4,Keyboardkey="pageDown",KeyboardShow="pageDown"},
new ShortcutKey (){ ShortcutKeyEnum=5,Keyboardkey="Up",KeyboardShow="Up"},
new ShortcutKey (){ ShortcutKeyEnum=6,Keyboardkey="Down",KeyboardShow="Down"},
new ShortcutKey (){ ShortcutKeyEnum=7,Keyboardkey="L",KeyboardShow="L"},
new ShortcutKey (){ ShortcutKeyEnum=8,Keyboardkey="R",KeyboardShow="R"},
new ShortcutKey (){ ShortcutKeyEnum=9,Keyboardkey="H",KeyboardShow="H"},
new ShortcutKey (){ ShortcutKeyEnum=10,Keyboardkey="V" ,KeyboardShow="V"},
new ShortcutKey (){ ShortcutKeyEnum=11,Keyboardkey="+" ,KeyboardShow="+"},
new ShortcutKey (){ ShortcutKeyEnum=12,Keyboardkey="-" ,KeyboardShow="-"},
new ShortcutKey (){ ShortcutKeyEnum=13,Keyboardkey="=" ,KeyboardShow="="},
new ShortcutKey (){ ShortcutKeyEnum=14,Keyboardkey="F" ,KeyboardShow="F"},
new ShortcutKey (){ ShortcutKeyEnum=15,Keyboardkey="S" ,KeyboardShow="S"},
new ShortcutKey (){ ShortcutKeyEnum=16,Keyboardkey="I" ,KeyboardShow="I"},
new ShortcutKey (){ ShortcutKeyEnum=17,Keyboardkey="C" ,KeyboardShow="C"},
new ShortcutKey (){ ShortcutKeyEnum=18,Keyboardkey="Space" ,KeyboardShow="Space"},
new ShortcutKey (){ ShortcutKeyEnum=1,Keyboardkey="right",Text="right" },
new ShortcutKey (){ ShortcutKeyEnum=2,Keyboardkey="left",Text="left"},
new ShortcutKey (){ ShortcutKeyEnum=3,Keyboardkey="PageUp",Text="PageUp"},
new ShortcutKey (){ ShortcutKeyEnum=4,Keyboardkey="pageDown",Text="pageDown"},
new ShortcutKey (){ ShortcutKeyEnum=5,Keyboardkey="Up",Text="Up"},
new ShortcutKey (){ ShortcutKeyEnum=6,Keyboardkey="Down",Text="Down"},
new ShortcutKey (){ ShortcutKeyEnum=7,Keyboardkey="L",Text="L"},
new ShortcutKey (){ ShortcutKeyEnum=8,Keyboardkey="R",Text="R"},
new ShortcutKey (){ ShortcutKeyEnum=9,Keyboardkey="H",Text="H"},
new ShortcutKey (){ ShortcutKeyEnum=10,Keyboardkey="V" ,Text="V"},
new ShortcutKey (){ ShortcutKeyEnum=11,Keyboardkey="+" ,Text="+"},
new ShortcutKey (){ ShortcutKeyEnum=12,Keyboardkey="-" ,Text="-"},
new ShortcutKey (){ ShortcutKeyEnum=13,Keyboardkey="=" ,Text="="},
new ShortcutKey (){ ShortcutKeyEnum=14,Keyboardkey="F" ,Text="F"},
new ShortcutKey (){ ShortcutKeyEnum=15,Keyboardkey="S" ,Text="S"},
new ShortcutKey (){ ShortcutKeyEnum=16,Keyboardkey="I" ,Text="I"},
new ShortcutKey (){ ShortcutKeyEnum=17,Keyboardkey="C" ,Text="C"},
new ShortcutKey (){ ShortcutKeyEnum=18,Keyboardkey="Space" ,Text="Space"},
};
return shortcutKeys;
@@ -131,7 +132,8 @@ namespace IRaCIS.Core.Application.Service
CtrlKey = x.CtrlKey,
MetaKey = x.MetaKey,
ShiftKey = x.ShiftKey,
KeyboardShow = x.KeyboardShow,
Text = x.Text,
Code=x.Code,
}));
return await _shortcutKeyRepository.SaveChangesAsync();
@@ -157,7 +159,8 @@ namespace IRaCIS.Core.Application.Service
CtrlKey=x.CtrlKey,
MetaKey=x.MetaKey,
ShiftKey=x.ShiftKey,
KeyboardShow=x.KeyboardShow,
Text=x.Text,
Code=x.Code,
}));
return await _shortcutKeyRepository.SaveChangesAsync();