VPet.Solution 修复一些bug

This commit is contained in:
Hakoyu 2024-01-13 22:05:28 +08:00
parent 47395ec6a8
commit 83d902e635
4 changed files with 17 additions and 17 deletions

View File

@ -36,6 +36,20 @@ public class InteractiveSettingModel : ObservableClass<InteractiveSettingModel>
} }
#endregion #endregion
#region EnableFunction
private bool _enableFunction;
/// <summary>
/// 启用计算等数据功能
/// </summary>
[ReflectionProperty(nameof(VPet_Simulator.Windows.Interface.Setting.EnableFunction))]
public bool EnableFunction
{
get => _enableFunction;
set => SetProperty(ref _enableFunction, value);
}
#endregion
#region CalFunState #region CalFunState
private GameSave.ModeType _calFunState; private GameSave.ModeType _calFunState;
@ -151,20 +165,6 @@ public class InteractiveSettingModel : ObservableClass<InteractiveSettingModel>
} }
#endregion #endregion
#region EnableFunction
private bool _enableFunction;
/// <summary>
/// 启用计算等数据功能
/// </summary>
[ReflectionProperty(nameof(VPet_Simulator.Windows.Interface.Setting.EnableFunction))]
public bool EnableFunction
{
get => _enableFunction;
set => SetProperty(ref _enableFunction, value);
}
#endregion
#region SmartMoveInterval #region SmartMoveInterval
private int _smartMoveInterval = 0; private int _smartMoveInterval = 0;

View File

@ -49,7 +49,7 @@
<Setter.Value> <Setter.Value>
<ContextMenu DataContext="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Mode=Self}}"> <ContextMenu DataContext="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Mode=Self}}">
<MenuItem <MenuItem
Command="{Binding PlacementTarget.Tag.OpenFileDommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}" Command="{Binding PlacementTarget.Tag.OpenFileCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
CommandParameter="{Binding}" CommandParameter="{Binding}"
Header="{ll:Str 打开文件}" /> Header="{ll:Str 打开文件}" />
<MenuItem <MenuItem

View File

@ -48,7 +48,7 @@
x:Name="Switch_EnablePetState" x:Name="Switch_EnablePetState"
Grid.Column="1" Grid.Column="1"
Content="{ll:Str '启用桌宠状态'}" Content="{ll:Str '启用桌宠状态'}"
IsChecked="{Binding InteractiveSetting.CalFunState}" IsChecked="{Binding InteractiveSetting.EnableFunction}"
Style="{DynamicResource Switch_BaseStyle}" Style="{DynamicResource Switch_BaseStyle}"
ToolTip="{ll:Str '启用数据计算,桌宠会有状态变化,需要按时投喂等.\&#13;如果嫌麻烦可以关掉'}" /> ToolTip="{ll:Str '启用数据计算,桌宠会有状态变化,需要按时投喂等.\&#13;如果嫌麻烦可以关掉'}" />
<!-- TODO: ComboBox使用内部数据 --> <!-- TODO: ComboBox使用内部数据 -->

View File

@ -49,7 +49,7 @@
<Setter.Value> <Setter.Value>
<ContextMenu DataContext="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Mode=Self}}"> <ContextMenu DataContext="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Mode=Self}}">
<MenuItem <MenuItem
Command="{Binding PlacementTarget.Tag.OpenFileDommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}" Command="{Binding PlacementTarget.Tag.OpenFileCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
CommandParameter="{Binding}" CommandParameter="{Binding}"
Header="{ll:Str 打开文件}" /> Header="{ll:Str 打开文件}" />
<MenuItem <MenuItem