mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f66ad3b4e1 | ||
|
|
9d47082f47 | ||
|
|
cd4516d9a7 |
@@ -27,7 +27,6 @@ internal sealed class HotKeyCombination : ObservableObject
|
|||||||
|
|
||||||
private bool registered;
|
private bool registered;
|
||||||
|
|
||||||
private bool modifierHasWindows;
|
|
||||||
private bool modifierHasControl;
|
private bool modifierHasControl;
|
||||||
private bool modifierHasShift;
|
private bool modifierHasShift;
|
||||||
private bool modifierHasAlt;
|
private bool modifierHasAlt;
|
||||||
@@ -52,7 +51,10 @@ internal sealed class HotKeyCombination : ObservableObject
|
|||||||
isEnabled = LocalSetting.Get($"{settingKey}.IsEnabled", true);
|
isEnabled = LocalSetting.Get($"{settingKey}.IsEnabled", true);
|
||||||
|
|
||||||
HotKeyParameter actual = LocalSettingGetHotKeyParameter();
|
HotKeyParameter actual = LocalSettingGetHotKeyParameter();
|
||||||
modifiers = actual.Modifiers;
|
|
||||||
|
// HOT_KEY_MODIFIERS.MOD_WIN is reversed for use by the OS.
|
||||||
|
// It should not be used by the application.
|
||||||
|
modifiers = actual.Modifiers & ~HOT_KEY_MODIFIERS.MOD_WIN;
|
||||||
InitializeModifiersCompositionFields();
|
InitializeModifiersCompositionFields();
|
||||||
key = actual.Key;
|
key = actual.Key;
|
||||||
|
|
||||||
@@ -61,18 +63,6 @@ internal sealed class HotKeyCombination : ObservableObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
#region Binding Property
|
#region Binding Property
|
||||||
public bool ModifierHasWindows
|
|
||||||
{
|
|
||||||
get => modifierHasWindows;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (SetProperty(ref modifierHasWindows, value))
|
|
||||||
{
|
|
||||||
UpdateModifiers();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool ModifierHasControl
|
public bool ModifierHasControl
|
||||||
{
|
{
|
||||||
get => modifierHasControl;
|
get => modifierHasControl;
|
||||||
@@ -218,11 +208,6 @@ internal sealed class HotKeyCombination : ObservableObject
|
|||||||
{
|
{
|
||||||
StringBuilder stringBuilder = new();
|
StringBuilder stringBuilder = new();
|
||||||
|
|
||||||
if (Modifiers.HasFlag(HOT_KEY_MODIFIERS.MOD_WIN))
|
|
||||||
{
|
|
||||||
stringBuilder.Append("Win").Append(" + ");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Modifiers.HasFlag(HOT_KEY_MODIFIERS.MOD_CONTROL))
|
if (Modifiers.HasFlag(HOT_KEY_MODIFIERS.MOD_CONTROL))
|
||||||
{
|
{
|
||||||
stringBuilder.Append("Ctrl").Append(" + ");
|
stringBuilder.Append("Ctrl").Append(" + ");
|
||||||
@@ -247,11 +232,6 @@ internal sealed class HotKeyCombination : ObservableObject
|
|||||||
{
|
{
|
||||||
HOT_KEY_MODIFIERS modifiers = default;
|
HOT_KEY_MODIFIERS modifiers = default;
|
||||||
|
|
||||||
if (ModifierHasWindows)
|
|
||||||
{
|
|
||||||
modifiers |= HOT_KEY_MODIFIERS.MOD_WIN;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ModifierHasControl)
|
if (ModifierHasControl)
|
||||||
{
|
{
|
||||||
modifiers |= HOT_KEY_MODIFIERS.MOD_CONTROL;
|
modifiers |= HOT_KEY_MODIFIERS.MOD_CONTROL;
|
||||||
@@ -272,11 +252,6 @@ internal sealed class HotKeyCombination : ObservableObject
|
|||||||
|
|
||||||
private void InitializeModifiersCompositionFields()
|
private void InitializeModifiersCompositionFields()
|
||||||
{
|
{
|
||||||
if (Modifiers.HasFlag(HOT_KEY_MODIFIERS.MOD_WIN))
|
|
||||||
{
|
|
||||||
modifierHasWindows = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Modifiers.HasFlag(HOT_KEY_MODIFIERS.MOD_CONTROL))
|
if (Modifiers.HasFlag(HOT_KEY_MODIFIERS.MOD_CONTROL))
|
||||||
{
|
{
|
||||||
modifierHasControl = true;
|
modifierHasControl = true;
|
||||||
|
|||||||
@@ -2664,7 +2664,7 @@
|
|||||||
<value>高级功能</value>
|
<value>高级功能</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ViewPageSettingKeyShortcutAutoClickingDescription" xml:space="preserve">
|
<data name="ViewPageSettingKeyShortcutAutoClickingDescription" xml:space="preserve">
|
||||||
<value>更改自动连点功能的快捷键</value>
|
<value>更改自动连点功能的快捷键,仅管理员模式下生效</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ViewPageSettingKeyShortcutAutoClickingHeader" xml:space="preserve">
|
<data name="ViewPageSettingKeyShortcutAutoClickingHeader" xml:space="preserve">
|
||||||
<value>自动连点</value>
|
<value>自动连点</value>
|
||||||
@@ -3257,4 +3257,4 @@
|
|||||||
<data name="WindowIdentifyMonitorHeader" xml:space="preserve">
|
<data name="WindowIdentifyMonitorHeader" xml:space="preserve">
|
||||||
<value>显示器编号</value>
|
<value>显示器编号</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -437,7 +437,7 @@
|
|||||||
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||||
Style="{ThemeResource SettingButtonStyle}">
|
Style="{ThemeResource SettingButtonStyle}">
|
||||||
<Button.Flyout>
|
<Button.Flyout>
|
||||||
<Flyout FlyoutPresenterStyle="{ThemeResource FlyoutPresenterPadding16And10Style}">
|
<Flyout FlyoutPresenterStyle="{ThemeResource FlyoutPresenterPadding16And10Style}" ShouldConstrainToRootBounds="False">
|
||||||
<cwc:UniformGrid
|
<cwc:UniformGrid
|
||||||
ColumnSpacing="16"
|
ColumnSpacing="16"
|
||||||
Columns="2"
|
Columns="2"
|
||||||
@@ -447,7 +447,7 @@
|
|||||||
MinWidth="64"
|
MinWidth="64"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Content="Win"
|
Content="Win"
|
||||||
IsChecked="{Binding HotKeyOptions.MouseClickRepeatForeverKeyCombination.ModifierHasWindows, Mode=TwoWay}"/>
|
IsEnabled="False"/>
|
||||||
<CheckBox
|
<CheckBox
|
||||||
MinWidth="64"
|
MinWidth="64"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
|
|||||||
@@ -104,8 +104,10 @@
|
|||||||
</Border>
|
</Border>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<cwc:SwitchPresenter Grid.Row="1" Value="{Binding ElementName=ItemsPanelSelector, Path=Current}">
|
<cwc:SwitchPresenter
|
||||||
|
Grid.Row="1"
|
||||||
|
ContentTransitions="{ThemeResource EntranceThemeTransitions}"
|
||||||
|
Value="{Binding ElementName=ItemsPanelSelector, Path=Current}">
|
||||||
<cwc:Case Value="List">
|
<cwc:Case Value="List">
|
||||||
<Border Margin="16,0,16,16" cw:Effects.Shadow="{ThemeResource CompatCardShadow}">
|
<Border Margin="16,0,16,16" cw:Effects.Shadow="{ThemeResource CompatCardShadow}">
|
||||||
<Border Style="{ThemeResource AcrylicBorderCardStyle}">
|
<Border Style="{ThemeResource AcrylicBorderCardStyle}">
|
||||||
@@ -113,7 +115,7 @@
|
|||||||
DisplayMode="Inline"
|
DisplayMode="Inline"
|
||||||
IsPaneOpen="True"
|
IsPaneOpen="True"
|
||||||
OpenPaneLength="{StaticResource CompatSplitViewOpenPaneLength2}"
|
OpenPaneLength="{StaticResource CompatSplitViewOpenPaneLength2}"
|
||||||
PaneBackground="{StaticResource CardBackgroundFillColorSecondary}">
|
PaneBackground="{ThemeResource CardBackgroundFillColorSecondaryBrush}">
|
||||||
<SplitView.Pane>
|
<SplitView.Pane>
|
||||||
<ListView
|
<ListView
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
|
|||||||
@@ -218,7 +218,7 @@
|
|||||||
DisplayMode="Inline"
|
DisplayMode="Inline"
|
||||||
IsPaneOpen="True"
|
IsPaneOpen="True"
|
||||||
OpenPaneLength="{StaticResource CompatSplitViewOpenPaneLength}"
|
OpenPaneLength="{StaticResource CompatSplitViewOpenPaneLength}"
|
||||||
PaneBackground="{StaticResource CardBackgroundFillColorSecondary}">
|
PaneBackground="{ThemeResource CardBackgroundFillColorSecondaryBrush}">
|
||||||
<SplitView.Pane>
|
<SplitView.Pane>
|
||||||
<ListView
|
<ListView
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
|
|||||||
@@ -372,8 +372,13 @@ internal sealed partial class AchievementViewModel : Abstraction.ViewModel, INav
|
|||||||
|
|
||||||
private void UpdateAchievementsFinishPercent()
|
private void UpdateAchievementsFinishPercent()
|
||||||
{
|
{
|
||||||
|
// 保存成就状态时,需要保持当前选择的成就分类
|
||||||
|
AchievementGoalView? currentSelectedAchievementGoal = SelectedAchievementGoal;
|
||||||
|
|
||||||
// 仅 读取成就列表 与 保存成就状态 时需要刷新成就进度
|
// 仅 读取成就列表 与 保存成就状态 时需要刷新成就进度
|
||||||
AchievementFinishPercent.Update(this);
|
AchievementFinishPercent.Update(this);
|
||||||
|
|
||||||
|
SelectedAchievementGoal = currentSelectedAchievementGoal;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Command("SaveAchievementCommand")]
|
[Command("SaveAchievementCommand")]
|
||||||
|
|||||||
Reference in New Issue
Block a user