chore: 热键改为全局配置

This commit is contained in:
uye
2024-12-28 16:07:23 +08:00
parent 8b4dd70b48
commit 24542bc4fc
2 changed files with 8 additions and 2 deletions

View File

@@ -115,7 +115,7 @@ namespace MaaWpfGui.Services.HotKeys
private static Dictionary<MaaHotKeyAction, MaaHotKey> GetPersistentHotKeys()
{
var hotKeysString = ConfigurationHelper.GetValue(HotKeyConfigName, null);
var hotKeysString = ConfigurationHelper.GetGlobalValue(HotKeyConfigName, null);
return hotKeysString is null
? CreateInitialHotKeys()
@@ -139,7 +139,7 @@ namespace MaaWpfGui.Services.HotKeys
private void PersistHotKeys()
{
ConfigurationHelper.SetValue(HotKeyConfigName, JsonConvert.SerializeObject(_actionHotKeyMapping));
ConfigurationHelper.SetGlobalValue(HotKeyConfigName, JsonConvert.SerializeObject(_actionHotKeyMapping));
}
}
}

View File

@@ -21,6 +21,12 @@
Margin="10"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<controls:TextBlock
Grid.Row="0"
HorizontalAlignment="Center"
FontWeight="Bold"
Text="{DynamicResource GlobalConfigTip}"
TextAlignment="Center" />
<StackPanel
HorizontalAlignment="Right"
VerticalAlignment="Center"