初始化 InteractiveSettingsPage

This commit is contained in:
Hakoyu 2023-12-25 00:31:22 +08:00
parent 9b019d55fb
commit 944cf2c34b
5 changed files with 354 additions and 416 deletions

View File

@ -12,4 +12,5 @@
<c:EqualsConverter x:Key="EqualsConverter" /> <c:EqualsConverter x:Key="EqualsConverter" />
<c:NotEqualsConverter x:Key="NotEqualsConverter" /> <c:NotEqualsConverter x:Key="NotEqualsConverter" />
<c:NullToFalseConverter x:Key="NullToFalseConverter" /> <c:NullToFalseConverter x:Key="NullToFalseConverter" />
<c:BoolInverter x:Key="BoolInverter" />
</ResourceDictionary> </ResourceDictionary>

View File

@ -0,0 +1,19 @@
using System.Globalization;
using System.Windows.Data;
namespace VPet.House.Converters;
public class BoolInverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is not bool b)
return false;
return !b;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}

View File

@ -160,10 +160,10 @@
</Style> </Style>
<Style x:Key="NumberInput_BaseStyle" TargetType="pu:NumberInput"> <Style x:Key="NumberInput_BaseStyle" TargetType="pu:NumberInput">
<Setter Property="Height" Value="30" /> <Setter Property="Height" Value="30" />
<Setter Property="Margin" Value="10,0,10,0" /> <Setter Property="Margin" Value="10,5,10,5" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Background" Value="{x:Null}" /> <Setter Property="Background" Value="{x:Null}" />
<Setter Property="FontSize" Value="16" /> <Setter Property="FontSize" Value="14" />
<Setter Property="FontWeight" Value="Bold" /> <Setter Property="FontWeight" Value="Bold" />
<Setter Property="Foreground" Value="{DynamicResource DARKPrimaryDarker}" /> <Setter Property="Foreground" Value="{DynamicResource DARKPrimaryDarker}" />
</Style> </Style>
@ -186,4 +186,23 @@
TargetType="ComboBox"> TargetType="ComboBox">
<Setter Property="Margin" Value="10,5,10,5" /> <Setter Property="Margin" Value="10,5,10,5" />
</Style> </Style>
<Style
x:Key="Expander_BaseStyle"
BasedOn="{StaticResource {x:Static pu:StyleKeys.ExpanderStyle}}"
TargetType="Expander">
<Setter Property="Margin" Value="10" />
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryDark}" />
<Setter Property="Background" Value="{DynamicResource DARKPrimaryText}" />
<Setter Property="BorderThickness" Value="2" />
<Setter Property="pu:ExpanderHelper.CornerRadius" Value="4" />
<Setter Property="pu:ExpanderHelper.ToggleArrowPlacement" Value="Right" />
</Style>
<Style
x:Key="Slider_BaseStyle"
BasedOn="{StaticResource StandardSliderStyle}"
TargetType="Slider">
<Setter Property="IsSnapToTickEnabled" Value="True" />
<Setter Property="Margin" Value="10,5,10,5" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
</ResourceDictionary> </ResourceDictionary>

View File

@ -71,6 +71,7 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</ApplicationDefinition> </ApplicationDefinition>
<Compile Include="Converters\BoolInverter.cs" />
<Compile Include="Utils\ClearFocus.cs" /> <Compile Include="Utils\ClearFocus.cs" />
<Compile Include="Utils\ElementHelper.cs" /> <Compile Include="Utils\ElementHelper.cs" />
<Compile Include="Utils\FindTopParent.cs" /> <Compile Include="Utils\FindTopParent.cs" />

View File

@ -14,488 +14,386 @@
d:DesignHeight="450" d:DesignHeight="450"
d:DesignWidth="800" d:DesignWidth="800"
mc:Ignorable="d"> mc:Ignorable="d">
<Grid> <Grid>
<ScrollViewer> <ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel> <StackPanel>
<TextBlock <Label
Margin="5"
HorizontalAlignment="Left" HorizontalAlignment="Left"
VerticalAlignment="Top" Content="{ll:Str 桌宠设置}"
Background="{x:Null}" FontSize="16"
TextWrapping="Wrap"> FontWeight="Bold"
<Run Style="{DynamicResource Label_BaseStyle}" />
FontSize="18" <Grid MinHeight="40">
FontWeight="Bold"
Text="{ll:Str 互动设置}" /><LineBreak />
<Run Text="{ll:Str 游戏互动相关设置}" />
</TextBlock>
<Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="15" />
<ColumnDefinition /> <ColumnDefinition />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Label Content="{ll:Str 桌宠名称}" Style="{DynamicResource Label_BaseStyle}" />
<RowDefinition Height="35" /> <TextBox
<RowDefinition Height="35" /> x:Name="TextBoxPetName"
<RowDefinition Height="35" /> Grid.Column="1"
<RowDefinition Height="35" /> d:TextChanged="TextBoxPetName_TextChanged"
<RowDefinition Height="35" /> Style="{DynamicResource StandardTextBoxStyle}" />
<RowDefinition Height="35" /> </Grid>
<RowDefinition Height="35" /> <Grid MinHeight="40">
<RowDefinition Height="Auto" /> <Grid.ColumnDefinitions>
</Grid.RowDefinitions> <ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Content="{ll:Str 桌宠状态}" Style="{DynamicResource Label_BaseStyle}" />
<pu:Switch <pu:Switch
x:Name="CalFunctionBox" x:Name="Switch_EnablePetState"
Grid.Column="2" Grid.Column="1"
d:Checked="CalFunctionBox_Checked" d:Checked="CalFunctionBox_Checked"
d:Unchecked="CalFunctionBox_Checked" d:Unchecked="CalFunctionBox_Checked"
Background="Transparent" Content="{ll:Str '启用桌宠状态'}"
BorderBrush="{DynamicResource PrimaryDark}" Style="{DynamicResource Switch_BaseStyle}"
BoxHeight="18"
BoxWidth="35"
CheckedBackground="{DynamicResource Primary}"
CheckedBorderBrush="{DynamicResource Primary}"
CheckedToggleBrush="{DynamicResource DARKPrimaryText}"
Content="{ll:Str '启用后桌宠会有状态变化,需要按时投喂等'}"
ToggleBrush="{DynamicResource PrimaryDark}"
ToggleShadowColor="{x:Null}"
ToggleSize="14"
ToolTip="{ll:Str '启用数据计算,桌宠会有状态变化,需要按时投喂等.\&#13;如果嫌麻烦可以关掉'}" /> ToolTip="{ll:Str '启用数据计算,桌宠会有状态变化,需要按时投喂等.\&#13;如果嫌麻烦可以关掉'}" />
<Grid <!-- TODO: ComboBox使用内部数据 -->
Grid.Row="1" <ComboBox
Grid.Column="2" Grid.Column="2"
ToolTip="{ll:Str '当玩家在指定时间未对桌宠进行交互的时候,智能禁用移动功能\&#13;将在下次交互时解除'}"> d:SelectionChanged="combCalFunState_SelectionChanged"
pu:ComboBoxHelper.Watermark="{ll:Str '当关闭数据计算时\&#13;桌宠显示的状态'}"
IsEnabled="{Binding IsChecked, ElementName=Switch_EnablePetState, Converter={StaticResource BoolInverter}}"
SelectedIndex="0"
Style="{DynamicResource ComboBox_BaseStyle}"
ToolTip="{ll:Str '当关闭数据计算时\&#13;桌宠显示的状态'}">
<ComboBoxItem Content="Happy" />
<ComboBoxItem Content="Nomal" />
<ComboBoxItem Content="PoorCondition" />
<ComboBoxItem Content="Ill" />
</ComboBox>
</Grid>
<Grid MinHeight="40">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label Content="{ll:Str 长按间隔}" Style="{DynamicResource Label_BaseStyle}" />
<Slider
x:Name="PressLengthSlider"
Grid.Column="1"
VerticalAlignment="Center"
d:ValueChanged="PressLengthSlider_ValueChanged"
LargeChange="0.1"
Maximum="5"
Minimum="0.05"
SmallChange=".05"
Style="{DynamicResource Slider_BaseStyle}"
TickFrequency="0.01"
Value="0.5" />
<pu:NumberInput
Grid.Column="2"
Interval="0.1"
Maximum="5"
Minimum="0.05"
Style="{DynamicResource NumberInput_BaseStyle}"
Value="{Binding Value, ElementName=PressLengthSlider}" />
<TextBlock
Grid.Column="3"
Margin="0,5,10,5"
Style="{DynamicResource TextBlock_BaseStyle}"
Text="{ll:Str 秒}" />
</Grid>
<Grid MinHeight="40">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label Content="{ll:Str 计算间隔}" Style="{DynamicResource Label_BaseStyle}" />
<Slider
x:Name="Slider_Cal"
Grid.Column="1"
VerticalAlignment="Center"
d:ValueChanged="CalSlider_ValueChanged"
LargeChange="1"
Maximum="60"
Minimum="5"
SmallChange=".5"
Style="{DynamicResource Slider_BaseStyle}"
TickFrequency="0.1"
Value="15" />
<pu:NumberInput
Grid.Column="2"
Interval="0.5"
Maximum="60"
Minimum="5"
Style="{DynamicResource NumberInput_BaseStyle}"
Value="{Binding Value, ElementName=Slider_Cal}" />
<TextBlock
Grid.Column="3"
Margin="0,5,10,5"
Style="{DynamicResource TextBlock_BaseStyle}"
Text="{ll:Str 秒}" />
</Grid>
<Grid MinHeight="40" ToolTip="{ll:Str 互动周期决定在交互结束后大约经历多少计算间隔后再次进行自主行动}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Content="{ll:Str 互动周期}" Style="{DynamicResource Label_BaseStyle}" />
<Grid Grid.Column="1">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition />
<ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" />
<TextBlock FontSize="14" Text="{ll:Str '当关闭数据计算时\&#13;桌宠显示的状态'}" />
<ComboBox
x:Name="combCalFunState"
Grid.Column="1"
d:SelectionChanged="combCalFunState_SelectionChanged"
SelectedIndex="5"
Style="{DynamicResource StandardComboBoxStyle}"
ToolTip="{ll:Str '当关闭数据计算时\&#13;桌宠显示的状态'}">
<ComboBoxItem Content="Happy" />
<ComboBoxItem Content="Nomal" />
<ComboBoxItem Content="PoorCondition" />
<ComboBoxItem Content="Ill" />
</ComboBox>
</Grid>
<Grid
Grid.Row="5"
Grid.RowSpan="4"
Grid.Column="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="35" /> <RowDefinition Height="Auto" />
<RowDefinition Height="35" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<pu:Switch <Slider
x:Name="MoveEventBox" x:Name="Slider_Interaction"
Margin="10,0,0,0" d:ValueChanged="Slider_Interaction_ValueChanged"
d:Checked="MoveEventBox_Checked" LargeChange="5"
d:Unchecked="MoveEventBox_Checked" Maximum="1000"
Background="Transparent" Minimum="30"
BorderBrush="{DynamicResource PrimaryDark}" SmallChange="1"
BoxHeight="18" Style="{DynamicResource Slider_BaseStyle}"
BoxWidth="35" TickFrequency="1"
CheckedBackground="{DynamicResource Primary}" ToolTip="{ll:Str '数据计算和互动计算时间间隔,间隔越短需要互动的频率可能会增加.\&#13;间隔越大越不容易打扰到当前工作'}"
CheckedBorderBrush="{DynamicResource Primary}" Value="200" />
CheckedToggleBrush="{DynamicResource DARKPrimaryText}" <pu:NumberInput
Content="{ll:Str 启用桌宠移动}"
IsChecked="True"
ToggleBrush="{DynamicResource PrimaryDark}"
ToggleShadowColor="{x:Null}"
ToggleSize="14"
ToolTip="{ll:Str '启用移动互动,桌宠会在屏幕上乱动,移动互动概率为普通互动的一半.\&#13;如果嫌麻烦可以关掉'}" />
<pu:Switch
x:Name="SmartMoveEventBox"
Grid.Column="1" Grid.Column="1"
Margin="10,0,0,0" Interval="1"
d:Checked="SmartMoveEventBox_Checked" Maximum="1000"
d:Unchecked="SmartMoveEventBox_Checked" Minimum="30"
Background="Transparent" Style="{DynamicResource NumberInput_BaseStyle}"
BorderBrush="{DynamicResource PrimaryDark}" Value="{Binding ElementName=Slider_Interaction, Path=Value}" />
BoxHeight="18" <TextBlock
BoxWidth="35" Grid.Column="2"
CheckedBackground="{DynamicResource Primary}" Margin="0,5,10,5"
CheckedBorderBrush="{DynamicResource Primary}" Style="{DynamicResource TextBlock_BaseStyle}"
CheckedToggleBrush="{DynamicResource DARKPrimaryText}" Text="{ll:Str 秒}" />
Content="{ll:Str '智能移动'}"
IsEnabled="{Binding ElementName=MoveEventBox, Path=IsChecked}"
ToggleBrush="{DynamicResource PrimaryDark}"
ToggleShadowColor="{x:Null}"
ToggleSize="14"
ToolTip="{ll:Str '当玩家在指定时间未对桌宠进行交互的时候,智能禁用移动功能\&#13;将在下次交互时解除'}" />
<TextBlock <TextBlock
Grid.Row="1" Grid.Row="1"
Text="{ll:Str '智能移动判断时间间隔'}" Grid.ColumnSpan="3"
ToolTip="{ll:Str '当玩家在指定时间未对桌宠进行交互的时候,智能禁用移动功能\&#13;将在下次交互时解除'}" /> HorizontalAlignment="Left"
<ComboBox Style="{DynamicResource TextBlock_BaseStyle}">
x:Name="CBSmartMove" <Run Text="{ll:Str 每分钟计算}" /> <Run x:Name="rTimeMinute">4</Run> <Run Text="{ll:Str 次数值变化}" />
Grid.Row="1" <Run Text="{ll:Str 大约}" /> <Run x:Name="RInter">4</Run> <Run Text="{ll:Str '分钟左右主动进行一次互动 (走路发呆爬墙等) '}" />
Grid.Column="1" </TextBlock>
d:SelectionChanged="CBSmartMove_SelectionChanged"
IsEnabled="{Binding ElementName=SmartMoveEventBox, Path=IsChecked}"
SelectedIndex="5"
Style="{DynamicResource StandardComboBoxStyle}"
ToolTip="{ll:Str '当玩家在指定时间未对桌宠进行交互的时候,智能禁用移动功能\&#13;将在下次交互时解除'}">
<ComboBoxItem Content="{ll:Str '30 秒'}">
<ComboBoxItem.Tag>
<sys:Int32>30</sys:Int32>
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem Content="{ll:Str '1 分钟'}">
<ComboBoxItem.Tag>
<sys:Int32>60</sys:Int32>
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem Content="{ll:Str '2 分钟'}">
<ComboBoxItem.Tag>
<sys:Int32>120</sys:Int32>
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem Content="{ll:Str '5 分钟'}">
<ComboBoxItem.Tag>
<sys:Int32>300</sys:Int32>
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem Content="{ll:Str '10 分钟'}">
<ComboBoxItem.Tag>
<sys:Int32>600</sys:Int32>
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem Content="{ll:Str '20 分钟'}">
<ComboBoxItem.Tag>
<sys:Int32>1200</sys:Int32>
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem Content="{ll:Str '30 分钟'}">
<ComboBoxItem.Tag>
<sys:Int32>1800</sys:Int32>
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem Content="{ll:Str '40 分钟'}">
<ComboBoxItem.Tag>
<sys:Int32>2400</sys:Int32>
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem Content="{ll:Str '50 分钟'}">
<ComboBoxItem.Tag>
<sys:Int32>3000</sys:Int32>
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem Content="{ll:Str '60 分钟'}">
<ComboBoxItem.Tag>
<sys:Int32>3600</sys:Int32>
</ComboBoxItem.Tag>
</ComboBoxItem>
</ComboBox>
</Grid> </Grid>
<Grid Grid.Row="7" Grid.Column="3"> </Grid>
<Grid MinHeight="40" ToolTip="{ll:Str '当玩家在指定时间未对桌宠进行交互的时候,智能禁用移动功能\&#13;将在下次交互时解除'}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label Content="{ll:Str 桌宠移动}" Style="{DynamicResource Label_BaseStyle}" />
<pu:Switch
x:Name="Switch_PetMove"
Grid.Column="1"
d:Checked="Switch_PetMove_Checked"
d:Unchecked="Switch_PetMove_Checked"
Content="{ll:Str 启用桌宠移动}"
Style="{DynamicResource Switch_BaseStyle}"
ToolTip="{ll:Str '启用移动互动,桌宠会在屏幕上乱动,移动互动概率为普通互动的一半.\&#13;如果嫌麻烦可以关掉'}" />
<pu:Switch
x:Name="Switch_SmartPetMove"
Grid.Column="2"
d:Checked="SmartSwitch_PetMove_Checked"
d:Unchecked="SmartSwitch_PetMove_Checked"
Content="{ll:Str '智能移动'}"
IsEnabled="{Binding ElementName=Switch_PetMove, Path=IsChecked}"
Style="{DynamicResource Switch_BaseStyle}" />
<ComboBox
x:Name="CBSmartMove"
Grid.Column="3"
d:SelectionChanged="CBSmartMove_SelectionChanged"
IsEnabled="{Binding IsChecked, ElementName=Switch_SmartPetMove}"
SelectedIndex="5"
Style="{DynamicResource StandardComboBoxStyle}"
ToolTip="{ll:Str 智能移动判断时间间隔}">
<!--<ComboBoxItem Content="{ll:Str '30 秒'}">
<ComboBoxItem.Tag>
<sys:Int32>30</sys:Int32>
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem Content="{ll:Str '1 分钟'}">
<ComboBoxItem.Tag>
<sys:Int32>60</sys:Int32>
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem Content="{ll:Str '2 分钟'}">
<ComboBoxItem.Tag>
<sys:Int32>120</sys:Int32>
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem Content="{ll:Str '5 分钟'}">
<ComboBoxItem.Tag>
<sys:Int32>300</sys:Int32>
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem Content="{ll:Str '10 分钟'}">
<ComboBoxItem.Tag>
<sys:Int32>600</sys:Int32>
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem Content="{ll:Str '20 分钟'}">
<ComboBoxItem.Tag>
<sys:Int32>1200</sys:Int32>
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem Content="{ll:Str '30 分钟'}">
<ComboBoxItem.Tag>
<sys:Int32>1800</sys:Int32>
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem Content="{ll:Str '40 分钟'}">
<ComboBoxItem.Tag>
<sys:Int32>2400</sys:Int32>
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem Content="{ll:Str '50 分钟'}">
<ComboBoxItem.Tag>
<sys:Int32>3000</sys:Int32>
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem Content="{ll:Str '60 分钟'}">
<ComboBoxItem.Tag>
<sys:Int32>3600</sys:Int32>
</ComboBoxItem.Tag>
</ComboBoxItem>-->
</ComboBox>
<TextBlock
Grid.Column="4"
Style="{DynamicResource TextBlock_BaseStyle}"
Text="{ll:Str 分钟}" />
</Grid>
<Grid MinHeight="40">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Content="{ll:Str 移动范围}" Style="{DynamicResource Label_BaseStyle}" />
<Grid Grid.Column="1">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition />
<ColumnDefinition Width="*" /> <ColumnDefinition />
<ColumnDefinition Width="*" /> <ColumnDefinition />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<WrapPanel Grid.ColumnSpan="3"> <TextBlock HorizontalAlignment="Left" Style="{DynamicResource TextBlock_BaseStyle}">
<TextBlock Text="{ll:Str '当前移动区域:'}" /> <Run Text="{ll:Str '当前移动区域:'}" />
<TextBlock x:Name="textMoveArea" Text="{ll:Str '主屏幕'}" /> <Run Text="{ll:Str '主屏幕'}" />
</WrapPanel> </TextBlock>
<Button <Button
x:Name="BtnSetMoveArea_Default" x:Name="BtnSetMoveArea_Default"
Grid.Row="1" Grid.Row="1"
Grid.Column="0"
Margin="5,5,5,5"
Padding="1"
d:Click="BtnSetMoveArea_Default_Click" d:Click="BtnSetMoveArea_Default_Click"
pu:ButtonHelper.CornerRadius="4" Content="{ll:Str 重置为主屏幕}"
Background="{DynamicResource SecondaryLight}" Style="{DynamicResource Button_BaseStyle}"
Content="{ll:Str 重置为主屏}"
ToolTip="{ll:Str '设置桌宠只在主屏幕进行移动'}" /> ToolTip="{ll:Str '设置桌宠只在主屏幕进行移动'}" />
<Button <Button
x:Name="BtnSetMoveArea_DetectScreen" x:Name="BtnSetMoveArea_DetectScreen"
Grid.Row="1" Grid.Row="1"
Grid.Column="1" Grid.Column="1"
Margin="5,5,5,5"
Padding="1"
d:Click="BtnSetMoveArea_DetectScreen_Click" d:Click="BtnSetMoveArea_DetectScreen_Click"
pu:ButtonHelper.CornerRadius="4"
Background="{DynamicResource SecondaryLight}"
Content="{ll:Str 设为当前屏幕}" Content="{ll:Str 设为当前屏幕}"
Style="{DynamicResource Button_BaseStyle}"
ToolTip="{ll:Str '设置桌宠只在当前桌宠所在的屏幕范围进行移动'}" /> ToolTip="{ll:Str '设置桌宠只在当前桌宠所在的屏幕范围进行移动'}" />
<Button <Button
x:Name="BtnSetMoveArea_Window" x:Name="BtnSetMoveArea_Window"
Grid.Row="1" Grid.Row="1"
Grid.Column="2" Grid.Column="2"
Margin="5,5,5,5"
Padding="1"
d:Click="BtnSetMoveArea_Window_Click" d:Click="BtnSetMoveArea_Window_Click"
pu:ButtonHelper.CornerRadius="4"
Background="{DynamicResource SecondaryLight}"
Content="{ll:Str 自定移动范围}" Content="{ll:Str 自定移动范围}"
Style="{DynamicResource Button_BaseStyle}"
ToolTip="{ll:Str '手动设置桌宠可移动范围'}" /> ToolTip="{ll:Str '手动设置桌宠可移动范围'}" />
</Grid> </Grid>
<TextBlock
Grid.Row="0"
VerticalAlignment="Center"
Text="{ll:Str 数据计算}" />
<TextBlock
Grid.Row="1"
VerticalAlignment="Center"
Text="{ll:Str 显示状态}" />
<TextBlock
Grid.Row="5"
VerticalAlignment="Center"
Text="{ll:Str 桌宠移动}" />
<TextBlock
Grid.Row="2"
VerticalAlignment="Center"
Text="{ll:Str 计算间隔}" />
<Grid
Grid.Row="2"
Grid.Column="2"
ToolTip="{ll:Str '数据计算和互动计算时间间隔,间隔越短需要互动的频率可能会增加.\&#13;间隔越大越不容易打扰到当前工作'}">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Slider
x:Name="CalSlider"
VerticalAlignment="Center"
d:ValueChanged="CalSlider_ValueChanged"
IsSnapToTickEnabled="True"
LargeChange="1"
Maximum="60"
Minimum="5"
SmallChange=".5"
Style="{DynamicResource StandardSliderStyle}"
TickFrequency="0.1"
Value="15" />
<TextBlock
Grid.Column="1"
MinWidth="60"
Margin="10,0,0,0"
VerticalAlignment="Center"
Background="{x:Null}"
FontWeight="Bold"
Foreground="{DynamicResource DARKPrimaryDarker}"
Text="{ll:Str '\{0:f1} 秒',
ValueSource={Binding ElementName=CalSlider,
Path=Value}}" />
</Grid>
<TextBlock
Grid.Row="3"
VerticalAlignment="Center"
Text="{ll:Str '互动周期'}" />
<TextBlock
Grid.Row="4"
Grid.Column="2"
VerticalAlignment="Top"
FontSize="14">
<Run Text="{ll:Str 每分钟计算}" /> <Run x:Name="rTimeMinute">4</Run> <Run Text="{ll:Str 次数值变化}" /><LineBreak />
<Run Text="{ll:Str 大约}" /> <Run x:Name="RInter">4</Run> <Run Text="{ll:Str '分钟左右主动进行一次互动(走路发呆爬墙等)'}" />
</TextBlock>
<Grid
Grid.Row="3"
Grid.Column="2"
ToolTip="{ll:Str 互动周期决定在交互结束后大约经历多少计算间隔后再次进行自主行动}">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Slider
x:Name="InteractionSlider"
VerticalAlignment="Center"
d:ValueChanged="InteractionSlider_ValueChanged"
IsSnapToTickEnabled="True"
LargeChange="5"
Maximum="1000"
Minimum="30"
SmallChange="1"
Style="{DynamicResource StandardSliderStyle}"
TickFrequency="1"
Value="200" />
<TextBlock
Grid.Column="1"
Width="60"
Margin="10,0,0,0"
VerticalAlignment="Center"
Background="{x:Null}"
FontSize="18"
FontWeight="Bold"
Foreground="{DynamicResource DARKPrimaryDarker}"
Text="{Binding ElementName=InteractionSlider, Path=Value}" />
</Grid>
</Grid> </Grid>
<TextBlock <Label
Margin="0,10,0,0" Margin="5"
HorizontalAlignment="Left" HorizontalAlignment="Left"
VerticalAlignment="Top" Content="{ll:Str 音乐识别设置}"
Background="{x:Null}" FontSize="16"
TextWrapping="Wrap"> FontWeight="Bold"
<Run Style="{DynamicResource Label_BaseStyle}" />
FontSize="18" <Grid MinHeight="40">
FontWeight="Bold"
Text="{ll:Str 操作设置}" /><LineBreak />
<Run Text="{ll:Str 游戏操作相关设置}" />
</TextBlock>
<Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="15" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="35" />
<RowDefinition Height="35" />
</Grid.RowDefinitions>
<TextBlock
Grid.Row="0"
VerticalAlignment="Center"
Text="{ll:Str 长按间隔}" />
<TextBlock
Grid.Row="1"
VerticalAlignment="Center"
Text="{ll:Str 桌宠名字}" />
<TextBox
x:Name="TextBoxPetName"
Grid.Row="1"
Grid.Column="2"
d:TextChanged="TextBoxPetName_TextChanged"
FontSize="16"
Style="{DynamicResource StandardTextBoxStyle}" />
<Grid
Grid.Row="0"
Grid.Column="2"
ToolTip="{ll:Str '数据计算和互动计算时间间隔,间隔越短需要互动的频率可能会增加\&#13;间隔越大越不容易打扰到当前工作'}">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Slider
x:Name="PressLengthSlider"
VerticalAlignment="Center"
d:ValueChanged="PressLengthSlider_ValueChanged"
IsSnapToTickEnabled="True"
LargeChange="0.1"
Maximum="5"
Minimum="0.05"
SmallChange=".05"
Style="{DynamicResource StandardSliderStyle}"
TickFrequency="0.01"
Value="0.5" />
<TextBlock
Grid.Column="1"
Margin="10,0,0,0"
VerticalAlignment="Center"
Background="{x:Null}"
FontWeight="Bold"
Foreground="{DynamicResource DARKPrimaryDarker}"
Text="{ll:Str '\{0:F2} 秒',
ValueSource={Binding ElementName=PressLengthSlider,
Path=Value}}" />
<!-- {Binding ElementName=PressLengthSlider,Path=Value,StringFormat={}{0:f2} 秒} -->
</Grid>
</Grid>
<TextBlock
Margin="0,5,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Background="{x:Null}"
TextWrapping="Wrap">
<Run
FontSize="18"
FontWeight="Bold"
Text="{ll:Str 音乐识别设置}" /><LineBreak />
<Run Text="{ll:Str 设置识别音乐播放特殊动作阈值}" /> <LineBreak />
<Run Text="{ll:Str 当前播放音量大小}" />
:<Run x:Name="RVoice" />
</TextBlock>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="15" />
<ColumnDefinition /> <ColumnDefinition />
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Label
<RowDefinition Height="35" /> Content="{ll:Str 触发音量}"
<RowDefinition Height="35" /> Style="{DynamicResource Label_BaseStyle}"
</Grid.RowDefinitions>
<TextBlock
Grid.Row="0"
VerticalAlignment="Center"
Text="{ll:Str 触发音量}"
ToolTip="{ll:Str 当实时播放音量达到该值时运行音乐动作}" /> ToolTip="{ll:Str 当实时播放音量达到该值时运行音乐动作}" />
<Slider <Slider
x:Name="VoiceCatchSilder" x:Name="VoiceCatchSilder"
Grid.Column="2" Grid.Column="1"
VerticalAlignment="Center"
d:ValueChanged="VoiceCatchSilder_ValueChanged" d:ValueChanged="VoiceCatchSilder_ValueChanged"
IsSnapToTickEnabled="True" LargeChange="5"
LargeChange=".5" Maximum="100"
Maximum="1"
Minimum="0" Minimum="0"
SmallChange=".02" SmallChange="1"
Style="{DynamicResource StandardSliderStyle}" Style="{DynamicResource Slider_BaseStyle}"
TickFrequency="0.01" TickFrequency="1"
ToolTip="{ll:Str 当实时播放音量达到该值时运行音乐动作}" ToolTip="{ll:Str 当实时播放音量达到该值时运行音乐动作}"
Value="0.3" /> Value="30" />
<pu:NumberInput
Grid.Column="2"
Interval="1"
Maximum="100"
Minimum="0"
Style="{DynamicResource NumberInput_BaseStyle}"
ToolTip="{ll:Str 当实时播放音量达到该值时运行特殊音乐动作}"
Value="{Binding Value, ElementName=VoiceCatchSilder}" />
<TextBlock <TextBlock
Grid.Column="3" Grid.Column="3"
Margin="15,0,0,0" Margin="0,5,10,5"
VerticalAlignment="Center" Text="%" />
Background="{x:Null}" </Grid>
FontSize="18" <Grid MinHeight="40">
FontWeight="Bold" <Grid.ColumnDefinitions>
Foreground="{DynamicResource DARKPrimaryDarker}" <ColumnDefinition Width="Auto" />
Text="{Binding ElementName=VoiceCatchSilder, Path=Value, StringFormat=p0}" <ColumnDefinition />
ToolTip="{ll:Str 当实时播放音量达到该值时运行特殊音乐动作}" /> <ColumnDefinition Width="Auto" />
<TextBlock <ColumnDefinition Width="Auto" />
Grid.Row="1" </Grid.ColumnDefinitions>
VerticalAlignment="Center" <Label
Text="{ll:Str 高潮音量}" Content="{ll:Str 高潮音量}"
ToolTip="{ll:Str 当实时播放音量达到该值时运行特殊音乐动作}" /> Style="{DynamicResource Label_BaseStyle}"
ToolTip="{ll:Str 当实时播放音量达到该值时运行音乐动作}" />
<Slider <Slider
x:Name="VoiceMaxSilder" x:Name="VoiceMaxSilder"
Grid.Row="1" Grid.Column="1"
Grid.Column="2"
VerticalAlignment="Center"
d:ValueChanged="VoiceCatchSilder_ValueChanged" d:ValueChanged="VoiceCatchSilder_ValueChanged"
IsSnapToTickEnabled="True" LargeChange="1"
LargeChange=".05" Maximum="100"
Maximum="1"
Minimum="{Binding ElementName=VoiceCatchSilder, Path=Value}" Minimum="{Binding ElementName=VoiceCatchSilder, Path=Value}"
SmallChange=".01" SmallChange="1"
Style="{DynamicResource StandardSliderStyle}" Style="{DynamicResource StandardSliderStyle}"
TickFrequency="0.01" TickFrequency="1"
ToolTip="{ll:Str 当实时播放音量达到该值时运行特殊音乐动作}" ToolTip="{ll:Str 当实时播放音量达到该值时运行特殊音乐动作}"
Value="0.75" /> Value="75" />
<TextBlock <pu:NumberInput
Grid.Row="1" Grid.Column="2"
Grid.Column="3"
Margin="15,0,0,0"
VerticalAlignment="Center"
Background="{x:Null}"
FontSize="18"
FontWeight="Bold"
Foreground="{DynamicResource DARKPrimaryDarker}" Foreground="{DynamicResource DARKPrimaryDarker}"
Text="{Binding ElementName=VoiceMaxSilder, Path=Value, StringFormat=p0}" Interval="1"
ToolTip="{ll:Str 当实时播放音量达到该值时运行特殊音乐动作}" /> Maximum="100"
Minimum="{Binding ElementName=VoiceCatchSilder, Path=Value}"
Style="{DynamicResource NumberInput_BaseStyle}"
ToolTip="{ll:Str 当实时播放音量达到该值时运行特殊音乐动作}"
Value="{Binding Value, ElementName=VoiceMaxSilder}" />
<TextBlock
Grid.Column="3"
Margin="0,5,10,5"
Text="%" />
</Grid> </Grid>
</StackPanel> </StackPanel>
</ScrollViewer> </ScrollViewer>