完善翻译相关设置

This commit is contained in:
ZouJin 2023-07-03 21:41:02 +10:00
parent 0c2b53a55a
commit 1f15d6c5cb
12 changed files with 245 additions and 119 deletions

View File

@ -25,7 +25,7 @@
<Grid.RowDefinitions>
<RowDefinition Height="2*" />
<RowDefinition Height="4*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1.5*" />
</Grid.RowDefinitions>
<TextBlock x:Name="tNow" Foreground="{DynamicResource Foreground}" FontSize="36" FontWeight="Bold"
HorizontalAlignment="Right" VerticalAlignment="Center" Margin="5,0,5,0" Grid.ColumnSpan="2"
@ -38,7 +38,7 @@
<ProgressBar x:Name="PBLeft" Grid.Row="2" Grid.ColumnSpan="2" Background="{x:Null}"
Foreground="{DynamicResource ButtonBackgroundHover}" Value="20" />
<Button x:Name="btnStop" Grid.Row="2" Grid.ColumnSpan="2" Foreground="{DynamicResource ButtonForeground}"
Background="{DynamicResource ButtonBackground}" Content="{ll:Str 停止工作}" FontSize="16" Click="btnStop_Click"
Background="{DynamicResource ButtonBackground}" Content="{ll:Str 停止工作}" FontSize="24" Click="btnStop_Click"
pu:ButtonHelper.HoverBackground="{DynamicResource ButtonBackgroundHover}" />
<Button HorizontalAlignment="Left" VerticalAlignment="Center" Padding="5,5,8,7"
Background="{DynamicResource BorderBrush}" pu:ButtonHelper.CornerRadius="5" Margin="10,0,0,0"

View File

@ -74,13 +74,13 @@
<HintPath>..\packages\LinePutScript.1.8.2\lib\net462\LinePutScript.dll</HintPath>
</Reference>
<Reference Include="LinePutScript.Localization.WPF, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LinePutScript.Localization.WPF.1.0.3\lib\net462\LinePutScript.Localization.WPF.dll</HintPath>
<HintPath>..\packages\LinePutScript.Localization.WPF.1.0.4\lib\net462\LinePutScript.Localization.WPF.dll</HintPath>
</Reference>
<Reference Include="Panuon.WPF, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Panuon.WPF.1.0.1\lib\net462\Panuon.WPF.dll</HintPath>
</Reference>
<Reference Include="Panuon.WPF.UI, Version=1.1.12.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Panuon.WPF.UI.1.1.12.1\lib\net462\Panuon.WPF.UI.dll</HintPath>
<Reference Include="Panuon.WPF.UI, Version=1.1.13.7, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Panuon.WPF.UI.1.1.14\lib\net462\Panuon.WPF.UI.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="LinePutScript" version="1.8.2" targetFramework="net462" />
<package id="LinePutScript.Localization.WPF" version="1.0.3" targetFramework="net462" />
<package id="LinePutScript.Localization.WPF" version="1.0.4" targetFramework="net462" />
<package id="Panuon.WPF" version="1.0.1" targetFramework="net462" />
<package id="Panuon.WPF.UI" version="1.1.12.1" targetFramework="net462" />
<package id="Panuon.WPF.UI" version="1.1.14" targetFramework="net462" />
</packages>

View File

@ -60,7 +60,9 @@ namespace VPet_Simulator.Windows.Interface
[Line(name: "name")]
public string Name { get; set; }
private string transname = null;
/// <summary>
/// 食物名字 (翻译)
/// </summary>
public string TranslateName
{
get
@ -118,7 +120,7 @@ namespace VPet_Simulator.Windows.Interface
sb.Append("健康".Translate() + ":\t").Append(Health > 0 ? "+" : "").Append(Health.ToString("f2")).Append("\t\t");
if (Likability != 0)
sb.Append("好感度".Translate() + ":\t").Append(Likability > 0 ? "+" : "").Append(Likability.ToString("f2"));
sb.AppendLine().Append(Desc);
sb.AppendLine().Append(Desc.Translate());
desc = sb.ToString();
}
return desc;

View File

@ -1,9 +1,11 @@
using LinePutScript.Converter;
using LinePutScript.Localization.WPF;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace VPet_Simulator.Windows.Interface
{
@ -82,5 +84,21 @@ namespace VPet_Simulator.Windows.Interface
/// 说话的内容
/// </summary>
[Line(IgnoreCase = true)] public string Text { get; set; }
private string transText = null;
/// <summary>
/// 说话的内容 (翻译)
/// </summary>
public string TranslateText
{
get
{
if (transText == null)
{
transText = LocalizeCore.Translate(Text);
}
return transText;
}
}
}
}

View File

@ -92,13 +92,13 @@
<HintPath>..\packages\LinePutScript.1.8.2\lib\net462\LinePutScript.dll</HintPath>
</Reference>
<Reference Include="LinePutScript.Localization.WPF, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LinePutScript.Localization.WPF.1.0.3\lib\net462\LinePutScript.Localization.WPF.dll</HintPath>
<HintPath>..\packages\LinePutScript.Localization.WPF.1.0.4\lib\net462\LinePutScript.Localization.WPF.dll</HintPath>
</Reference>
<Reference Include="Panuon.WPF, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Panuon.WPF.1.0.1\lib\net462\Panuon.WPF.dll</HintPath>
</Reference>
<Reference Include="Panuon.WPF.UI, Version=1.1.12.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Panuon.WPF.UI.1.1.12.1\lib\net462\Panuon.WPF.UI.dll</HintPath>
<Reference Include="Panuon.WPF.UI, Version=1.1.13.7, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Panuon.WPF.UI.1.1.14\lib\net462\Panuon.WPF.UI.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="LinePutScript" version="1.8.2" targetFramework="net462" />
<package id="LinePutScript.Localization.WPF" version="1.0.3" targetFramework="net462" />
<package id="LinePutScript.Localization.WPF" version="1.0.4" targetFramework="net462" />
<package id="Panuon.WPF" version="1.0.1" targetFramework="net462" />
<package id="Panuon.WPF.UI" version="1.1.12.1" targetFramework="net462" />
<package id="Panuon.WPF.UI" version="1.1.14" targetFramework="net462" />
</packages>

View File

@ -50,6 +50,12 @@ namespace VPet_Simulator.Windows
Set.ZoomLevel = zl;
//this.Height = 500 * zl;
this.Width = 500 * zl;
if (petHelper != null)
{
petHelper.Width = 50 * zl;
petHelper.Height = 50 * zl;
petHelper.ReloadLocation();
}
}
/// <summary>
/// 保存设置
@ -116,6 +122,15 @@ namespace VPet_Simulator.Windows
new winReport(this, "由于插件引起的自定按钮加载错误".Translate() + '\n' + e.ToString()).Show();
}
}
/// <summary>
/// 加载帮助器
/// </summary>
public void LoadPetHelper()
{
petHelper = new PetHelper(this);
petHelper.Show();
}
public static void RunDIY(string content)
{
if (content.Contains("://") || content.Contains(@":\"))
@ -235,17 +250,17 @@ namespace VPet_Simulator.Windows
if (Core.Save.StrengthFood > 60)
{
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.L);
Main.Say(txt[Function.Rnd.Next(txt.Count)].Text, GraphCore.Helper.SayType.None);
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
}
else if (Core.Save.StrengthFood > 40)
{
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.M);
Main.Say(txt[Function.Rnd.Next(txt.Count)].Text, GraphCore.Helper.SayType.None);
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
}
else
{
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.S);
Main.Say(txt[Function.Rnd.Next(txt.Count)].Text, GraphCore.Helper.SayType.None);
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
}
Task.Run(() => Main.Display(GraphCore.GraphType.Switch_Hunger, Main.DisplayToNomal));
return;
@ -258,17 +273,17 @@ namespace VPet_Simulator.Windows
if (Core.Save.StrengthDrink > 60)
{
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.L);
Main.Say(txt[Function.Rnd.Next(txt.Count)].Text, GraphCore.Helper.SayType.None);
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
}
else if (Core.Save.StrengthDrink > 40)
{
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.M);
Main.Say(txt[Function.Rnd.Next(txt.Count)].Text, GraphCore.Helper.SayType.None);
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
}
else
{
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.S);
Main.Say(txt[Function.Rnd.Next(txt.Count)].Text, GraphCore.Helper.SayType.None);
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
}
Task.Run(() => Main.Display(GraphCore.GraphType.Switch_Thirsty, Main.DisplayToNomal));
return;
@ -283,17 +298,17 @@ namespace VPet_Simulator.Windows
if (Core.Save.StrengthFood > 40)
{
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.L);
Main.Say(txt[Function.Rnd.Next(txt.Count)].Text, GraphCore.Helper.SayType.None);
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
}
else if (Core.Save.StrengthFood > 20)
{
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.M);
Main.Say(txt[Function.Rnd.Next(txt.Count)].Text, GraphCore.Helper.SayType.None);
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
}
else
{
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.S);
Main.Say(txt[Function.Rnd.Next(txt.Count)].Text, GraphCore.Helper.SayType.None);
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
}
Task.Run(() => Main.Display(GraphCore.GraphType.Switch_Hunger, Main.DisplayToNomal));
return;
@ -305,17 +320,17 @@ namespace VPet_Simulator.Windows
if (Core.Save.StrengthDrink > 40)
{
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.L);
Main.Say(txt[Function.Rnd.Next(txt.Count)].Text, GraphCore.Helper.SayType.None);
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
}
else if (Core.Save.StrengthDrink > 20)
{
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.M);
Main.Say(txt[Function.Rnd.Next(txt.Count)].Text, GraphCore.Helper.SayType.None);
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
}
else
{
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.S);
Main.Say(txt[Function.Rnd.Next(txt.Count)].Text, GraphCore.Helper.SayType.None);
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText, GraphCore.Helper.SayType.None);
}
Task.Run(() => Main.Display(GraphCore.GraphType.Switch_Thirsty, Main.DisplayToNomal));
return;

View File

@ -82,7 +82,7 @@
<HintPath>..\packages\LinePutScript.1.8.2\lib\net48\LinePutScript.dll</HintPath>
</Reference>
<Reference Include="LinePutScript.Localization.WPF, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LinePutScript.Localization.WPF.1.0.3\lib\net462\LinePutScript.Localization.WPF.dll</HintPath>
<HintPath>..\packages\LinePutScript.Localization.WPF.1.0.4\lib\net462\LinePutScript.Localization.WPF.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
@ -90,8 +90,8 @@
<Reference Include="Panuon.WPF, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Panuon.WPF.1.0.1\lib\net48\Panuon.WPF.dll</HintPath>
</Reference>
<Reference Include="Panuon.WPF.UI, Version=1.1.12.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Panuon.WPF.UI.1.1.12.1\lib\net48\Panuon.WPF.UI.dll</HintPath>
<Reference Include="Panuon.WPF.UI, Version=1.1.13.7, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Panuon.WPF.UI.1.1.14\lib\net48\Panuon.WPF.UI.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
@ -119,6 +119,10 @@
<Compile Include="Design\AutoUniformGrid.cs" />
<Compile Include="Design\Converters\BoolToIntConverter.cs" />
<Compile Include="Design\Converters\DiscountPriceConverter.cs" />
<Compile Include="Function\Win32.cs" />
<Compile Include="PetHelper.xaml.cs">
<DependentUpon>PetHelper.xaml</DependentUpon>
</Compile>
<Compile Include="WinDesign\winBetterBuy.xaml.cs">
<DependentUpon>winBetterBuy.xaml</DependentUpon>
</Compile>
@ -148,6 +152,10 @@
<Compile Include="WinDesign\winReport.xaml.cs">
<DependentUpon>winReport.xaml</DependentUpon>
</Compile>
<Page Include="PetHelper.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="WinDesign\winBetterBuy.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@ -255,6 +263,7 @@
</Resource>
<Resource Include="Res\TopLogo2019.PNG" />
<Resource Include="Res\BetterBuy.png" />
<Resource Include="Res\vpeticon.png" />
<Content Include="steam_api.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

View File

@ -46,27 +46,61 @@
<RowDefinition Height="35" />
<RowDefinition Height="35" />
<RowDefinition Height="35" />
<RowDefinition Height="35" />
<RowDefinition Height="35" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Text="{ll:Str 快速切换}" VerticalAlignment="Center" Grid.Row="1" />
<TextBlock Text="{ll:Str 置于顶层}" VerticalAlignment="Center" />
<pu:Switch x:Name="TopMostBox" Grid.Column="2" BorderBrush="{DynamicResource PrimaryDark}"
<Grid Grid.Row="0" Grid.Column="2" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<pu:Switch x:Name="TopMostBox" Grid.Column="0" BorderBrush="{DynamicResource PrimaryDark}"
CheckedBackground="{DynamicResource Primary}"
CheckedBorderBrush="{DynamicResource Primary}" Background="Transparent" BoxWidth="35"
BoxHeight="18" ToggleSize="14" ToggleShadowColor="{x:Null}"
ToggleBrush="{DynamicResource PrimaryDark}"
CheckedToggleBrush="{DynamicResource DARKPrimaryText}" Checked="TopMostBox_Checked"
Unchecked="TopMostBox_Unchecked" ToolTip="{ll:Str 将桌宠置于顶层}" Content="{ll:Str 将桌宠置于顶层}" />
<pu:Switch x:Name="HitThroughBox" Grid.Column="1" BorderBrush="{DynamicResource PrimaryDark}"
CheckedBackground="{DynamicResource Primary}"
CheckedBorderBrush="{DynamicResource Primary}" Background="Transparent" BoxWidth="35"
BoxHeight="18" ToggleSize="14" ToggleShadowColor="{x:Null}"
ToggleBrush="{DynamicResource PrimaryDark}"
CheckedToggleBrush="{DynamicResource DARKPrimaryText}"
ToolTip="{ll:Str '鼠标将会穿过桌宠到下方内容,不打扰操作\&#13;该选项'}" Content="{ll:Str '鼠标穿透'}"
Checked="HitThroughBox_Checked" Unchecked="HitThroughBox_Checked" />
</Grid>
<TextBlock Text="Language" VerticalAlignment="Center" Grid.Row="2" Grid.ColumnSpan="2" />
<ComboBox x:Name="LanguageBox" Grid.Row="2" Grid.Column="2"
Style="{DynamicResource StandardComboBoxStyle}" Margin="0,3,0,2" FontSize="16"
SelectionChanged="LanguageBox_SelectionChanged" />
<pu:Switch x:Name="PetHelperBox" Grid.Column="2" BorderBrush="{DynamicResource PrimaryDark}"
CheckedBackground="{DynamicResource Primary}" CheckedBorderBrush="{DynamicResource Primary}"
Background="Transparent" BoxWidth="35" BoxHeight="18" ToggleSize="14"
ToggleShadowColor="{x:Null}" ToggleBrush="{DynamicResource PrimaryDark}"
CheckedToggleBrush="{DynamicResource DARKPrimaryText}" Checked="TopMostBox_Checked"
Unchecked="TopMostBox_Unchecked" ToolTip="{ll:Str 将桌宠置于顶层}" />
<TextBlock Grid.Row="1" Text="{ll:Str 更高缩放}" VerticalAlignment="Center" />
<pu:Switch x:Name="FullScreenBox" Grid.Row="1" Grid.Column="2"
CheckedToggleBrush="{DynamicResource DARKPrimaryText}"
ToolTip="{ll:Str '添加快速切换小标,切换顶层或穿透'}" Grid.Row="1" Content="{ll:Str '添加小标,快速切换顶层或穿透'}" Checked="PetHelperBox_Checked" />
<TextBlock Grid.Row="3" Text="{ll:Str 更高缩放}" VerticalAlignment="Center" />
<pu:Switch x:Name="FullScreenBox" Grid.Row="3" Grid.Column="2" Content="{ll:Str 支持更大缩放倍率}"
BorderBrush="{DynamicResource PrimaryDark}" CheckedBackground="{DynamicResource Primary}"
CheckedBorderBrush="{DynamicResource Primary}" Background="Transparent" BoxWidth="35"
BoxHeight="18" ToggleSize="14" ToggleShadowColor="{x:Null}"
ToggleBrush="{DynamicResource PrimaryDark}"
CheckedToggleBrush="{DynamicResource DARKPrimaryText}" Checked="FullScreenBox_Check"
Unchecked="FullScreenBox_Check" ToolTip="{ll:Str 解锁缩放限制}" />
<TextBlock Grid.Row="2" Text="{ll:Str 缩放等级}" VerticalAlignment="Center" />
<Grid Grid.Column="2" Grid.Row="2">
<TextBlock Grid.Row="4" Text="{ll:Str 缩放等级}" VerticalAlignment="Center" />
<!--<Button pu:ButtonHelper.CornerRadius="4" Content="{ll:Str 小标介绍}" Grid.Column="2"
Background="{DynamicResource SecondaryLight}" HorizontalAlignment="Right"
VerticalAlignment="Center" Height="30" BorderBrush="{DynamicResource SecondaryDark}"
BorderThickness="2" Grid.Row="1" />-->
<Grid Grid.Column="2" Grid.Row="4">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
@ -79,17 +113,17 @@
Text="{Binding ElementName=ZoomSlider,Path=Value,StringFormat=f2}" FontSize="18"
Foreground="{DynamicResource DARKPrimaryDarker}" FontWeight="Bold" Background="{x:Null}" />
</Grid>
<TextBlock Grid.Row="3" Text="{ll:Str 主题}" VerticalAlignment="Center" />
<ComboBox x:Name="ThemeBox" Grid.Row="3" Grid.Column="2"
<TextBlock Grid.Row="5" Text="{ll:Str 主题}" VerticalAlignment="Center" />
<ComboBox x:Name="ThemeBox" Grid.Row="5" Grid.Column="2"
SelectionChanged="ThemeBox_SelectionChanged" IsEnabled="False"
Style="{DynamicResource StandardComboBoxStyle}" Margin="0,3,0,2" FontSize="16" />
<TextBlock Grid.Row="4" Text="{ll:Str 字体}" VerticalAlignment="Center" />
<ComboBox x:Name="FontBox" Grid.Row="4" Grid.Column="2" SelectionChanged="FontBox_SelectionChanged"
<TextBlock Grid.Row="6" Text="{ll:Str 字体}" VerticalAlignment="Center" />
<ComboBox x:Name="FontBox" Grid.Row="6" Grid.Column="2" SelectionChanged="FontBox_SelectionChanged"
IsEnabled="False" Style="{DynamicResource StandardComboBoxStyle}" FontSize="16"
Margin="0,2,0,3" />
<TextBlock Grid.Row="5" Text="{ll:Str 启动位置}" VerticalAlignment="Center" />
<Grid Grid.Row="5" Grid.Column="2">
<TextBlock Grid.Row="7" Text="{ll:Str 启动位置}" VerticalAlignment="Center" />
<Grid Grid.Row="7" Grid.Column="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.5*" />
<ColumnDefinition Width="1*" />
@ -119,16 +153,16 @@
Click="BtnStartUpGet_Click" />
</Grid>
<TextBlock Grid.Row="6" Text="{ll:Str 消息框}" VerticalAlignment="Center" />
<pu:Switch x:Name="SwitchMsgOut" Grid.Column="2" Grid.Row="6"
<TextBlock Grid.Row="8" Text="{ll:Str 消息框}" VerticalAlignment="Center" />
<pu:Switch x:Name="SwitchMsgOut" Grid.Column="2" Grid.Row="8"
BorderBrush="{DynamicResource PrimaryDark}" CheckedBackground="{DynamicResource Primary}"
CheckedBorderBrush="{DynamicResource Primary}" Background="Transparent" BoxWidth="35"
BoxHeight="18" ToggleSize="14" ToggleShadowColor="{x:Null}"
ToggleBrush="{DynamicResource PrimaryDark}"
CheckedToggleBrush="{DynamicResource DARKPrimaryText}" Checked="SwitchMsgOut_Checked"
Unchecked="SwitchMsgOut_Checked" ToolTip="{ll:Str 将消息框置于外部}" Content="{ll:Str 将消息框置于外部}" />
<TextBlock Grid.Row="7" Text="{ll:Str 开机启动}" VerticalAlignment="Center" />
<Grid Grid.Row="7" Grid.Column="2">
<TextBlock Grid.Row="9" Text="{ll:Str 开机启动}" VerticalAlignment="Center" />
<Grid Grid.Row="9" Grid.Column="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
@ -151,16 +185,16 @@
ToolTip="{ll:Str '从Steam启动该游戏, 统计时长不能停'}" Grid.Column="1"
Checked="StartUpSteamBox_Checked" Unchecked="StartUpSteamBox_Checked" />
</Grid>
<TextBlock Grid.Row="8" Text="{ll:Str 宠物动画}" VerticalAlignment="Center" />
<TextBlock x:Name="PetIntor" Grid.Row="9" Text="{ll:Str 动画描述动画描述动画描述动画描述动画描述}"
<TextBlock Grid.Row="10" Text="{ll:Str 宠物动画}" VerticalAlignment="Center" />
<TextBlock x:Name="PetIntor" Grid.Row="11" Text="{ll:Str 动画描述动画描述动画描述动画描述动画描述}"
VerticalAlignment="Center" Grid.Column="2" TextWrapping="WrapWithOverflow" FontSize="14" />
<ComboBox x:Name="PetBox" Grid.Row="8" Grid.Column="2" ToolTip="{ll:Str '加载的宠物动画,重启后生效'}"
<ComboBox x:Name="PetBox" Grid.Row="10" Grid.Column="2" ToolTip="{ll:Str '加载的宠物动画,重启后生效'}"
Style="{DynamicResource StandardComboBoxStyle}" Margin="0,3,0,2"
SelectionChanged="PetBox_SelectionChanged" FontSize="16" />
<Button x:Name="ButtonRestartGraph" Content="{ll:Str 重启软件以应用更改}" Visibility="Collapsed"
VerticalAlignment="Bottom" Background="{DynamicResource DARKPrimary}"
VerticalAlignment="Center" Background="{DynamicResource DARKPrimary}"
Foreground="{DynamicResource DARKPrimaryText}" Click="ButtonRestart_Click"
Grid.ColumnSpan="3" Grid.Row="10" />
Grid.ColumnSpan="3" Grid.Row="12" />
</Grid>
</TabItem>
<TabItem Header="{ll:Str 系统}" BorderBrush="{DynamicResource PrimaryDarker}">
@ -233,43 +267,7 @@
Style="{DynamicResource StandardComboBoxStyle}" FontSize="16" Grid.Column="2"
Grid.Row="1" MouseEnter="CBSaveReLoad_MouseEnter" />
</Grid>
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Background="{x:Null}"
TextWrapping="Wrap" Margin="0,10,0,0">
<Run FontWeight="Bold" FontSize="18" Text="{ll:Str 操作设置}" /><LineBreak />
<Run Text="{ll:Str 游戏操作相关设置}" />
</TextBlock>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="15" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="35" />
<RowDefinition Height="35" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="{ll:Str 长按间隔}" VerticalAlignment="Center" />
<TextBlock Grid.Row="1" Text="{ll:Str 桌宠名字}" VerticalAlignment="Center" />
<TextBox x:Name="TextBoxPetName" Grid.Row="1" Grid.Column="2"
Style="{DynamicResource StandardTextBoxStyle}"
TextChanged="TextBoxPetName_TextChanged" FontSize="16" />
<Grid Grid.Column="2" Grid.Row="0"
ToolTip="{ll:Str '数据计算和互动计算时间间隔,间隔越短需要互动的频率可能会增加\&#13;间隔越大越不容易打扰到当前工作'}">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Slider x:Name="PressLengthSlider" TickFrequency="0.01" IsSnapToTickEnabled="True"
Style="{DynamicResource StandardSliderStyle}" VerticalAlignment="Center"
Maximum="5" SmallChange=".05" Minimum="0.05" LargeChange="0.1" Value="0.5"
ValueChanged="PressLengthSlider_ValueChanged" />
<TextBlock Grid.Column="1" Margin="10,0,0,0" VerticalAlignment="Center" Width="60"
Text="{ll:Str '\{0:F2} 秒', ValueSource={Binding ElementName=PressLengthSlider,Path=Value}}"
Foreground="{DynamicResource DARKPrimaryDarker}" FontWeight="Bold"
Background="{x:Null}" />
<!--{Binding ElementName=PressLengthSlider,Path=Value,StringFormat={}{0:f2} 秒}-->
</Grid>
</Grid>
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Background="{x:Null}"
TextWrapping="Wrap" Margin="0,10,0,0">
<Run FontWeight="Bold" FontSize="18" Text="{ll:Str 聊天设置}" /><LineBreak />
@ -328,7 +326,6 @@
<RowDefinition Height="35" />
<RowDefinition Height="35" />
<RowDefinition Height="35" />
<RowDefinition Height="35" />
</Grid.RowDefinitions>
<pu:Switch x:Name="CalFunctionBox" BorderBrush="{DynamicResource PrimaryDark}" Grid.Column="2"
CheckedBackground="{DynamicResource Primary}"
@ -482,6 +479,43 @@
</Grid>
</Grid>
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Background="{x:Null}"
TextWrapping="Wrap" Margin="0,10,0,0">
<Run FontWeight="Bold" FontSize="18" Text="{ll:Str 操作设置}" /><LineBreak />
<Run Text="{ll:Str 游戏操作相关设置}" />
</TextBlock>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="15" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="35" />
<RowDefinition Height="35" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="{ll:Str 长按间隔}" VerticalAlignment="Center" />
<TextBlock Grid.Row="1" Text="{ll:Str 桌宠名字}" VerticalAlignment="Center" />
<TextBox x:Name="TextBoxPetName" Grid.Row="1" Grid.Column="2"
Style="{DynamicResource StandardTextBoxStyle}" TextChanged="TextBoxPetName_TextChanged"
FontSize="16" />
<Grid Grid.Column="2" Grid.Row="0"
ToolTip="{ll:Str '数据计算和互动计算时间间隔,间隔越短需要互动的频率可能会增加\&#13;间隔越大越不容易打扰到当前工作'}">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Slider x:Name="PressLengthSlider" TickFrequency="0.01" IsSnapToTickEnabled="True"
Style="{DynamicResource StandardSliderStyle}" VerticalAlignment="Center" Maximum="5"
SmallChange=".05" Minimum="0.05" LargeChange="0.1" Value="0.5"
ValueChanged="PressLengthSlider_ValueChanged" />
<TextBlock Grid.Column="1" Margin="10,0,0,0" VerticalAlignment="Center" Width="60"
Text="{ll:Str '\{0:F2} 秒', ValueSource={Binding ElementName=PressLengthSlider,Path=Value}}"
Foreground="{DynamicResource DARKPrimaryDarker}" FontWeight="Bold"
Background="{x:Null}" />
<!--{Binding ElementName=PressLengthSlider,Path=Value,StringFormat={}{0:f2} 秒}-->
</Grid>
</Grid>
</StackPanel>
</TabItem>
<TabItem Header="{ll:Str 自定}" BorderBrush="{DynamicResource PrimaryDarker}">
@ -532,13 +566,13 @@
<ComboBox x:Name="CBDiagnosis" SelectedIndex="1" VerticalAlignment="Top" Margin="10,5,0,0"
HorizontalAlignment="Left" Style="{DynamicResource StandardComboBoxStyle}" Width="200"
SelectionChanged="CBDiagnosis_SelectionChanged" IsEnabled="False">
<ComboBoxItem Content="{ll:Str '每 两百 周期一次'}" />
<ComboBoxItem Content="{ll:Str '每 五百 周期一次'}" />
<ComboBoxItem Content="{ll:Str '每 一千 周期一次'}" />
<ComboBoxItem Content="{ll:Str '每 两千 周期一次'}" />
<ComboBoxItem Content="{ll:Str '每 五千 周期一次'}" />
<ComboBoxItem Content="{ll:Str '每 一万 周期一次'}" />
<ComboBoxItem Content="{ll:Str '每 两万 周期一次'}" />
<ComboBoxItem Content="{ll:Str '每 两百 周期一次'}" />
<ComboBoxItem Content="{ll:Str '每 五百 周期一次'}" />
<ComboBoxItem Content="{ll:Str '每 一千 周期一次'}" />
<ComboBoxItem Content="{ll:Str '每 两千 周期一次'}" />
<ComboBoxItem Content="{ll:Str '每 五千 周期一次'}" />
<ComboBoxItem Content="{ll:Str '每 一万 周期一次'}" />
<ComboBoxItem Content="{ll:Str '每 两万 周期一次'}" />
</ComboBox>
</StackPanel>
</TabItem>
@ -596,23 +630,24 @@
</ScrollViewer>
</StackPanel>
<StackPanel Grid.Column="1">
<Label Content="{ll:Str 内容}" HorizontalAlignment="Left" Margin="-5,0,0,0" VerticalAlignment="Top"
FontSize="18" FontWeight="Bold" Background="{x:Null}" />
<Label Content="{ll:Str 内容}" HorizontalAlignment="Left" Margin="-5,0,0,0"
VerticalAlignment="Top" FontSize="18" FontWeight="Bold" Background="{x:Null}" />
<TextBlock x:Name="ButtonOpenModFolder" Cursor="Hand" HorizontalAlignment="Left"
Margin="0,0,0,0" TextWrapping="Wrap" Text="{ll:Str '所在文件夹'}" VerticalAlignment="Top"
FontSize="14" Foreground="{DynamicResource DARKPrimaryDarker}"
TextDecorations="Underline" MouseDown="ButtonOpenModFolder_MouseDown" />
Margin="0,0,0,0" TextWrapping="Wrap" Text="{ll:Str '所在文件夹'}"
VerticalAlignment="Top" FontSize="14"
Foreground="{DynamicResource DARKPrimaryDarker}" TextDecorations="Underline"
MouseDown="ButtonOpenModFolder_MouseDown" />
<TextBlock x:Name="ButtonEnable" HorizontalAlignment="Left" Margin="0,2,0,0"
TextWrapping="Wrap" Text="{ll:Str '启用该模组'}" VerticalAlignment="Top" FontSize="14"
Foreground="{DynamicResource DARKPrimaryDarker}" TextDecorations="Underline"
Cursor="Hand" MouseDown="ButtonEnable_MouseDown" />
TextWrapping="Wrap" Text="{ll:Str '启用该模组'}" VerticalAlignment="Top"
FontSize="14" Foreground="{DynamicResource DARKPrimaryDarker}"
TextDecorations="Underline" Cursor="Hand" MouseDown="ButtonEnable_MouseDown" />
<TextBlock x:Name="ButtonDisEnable" HorizontalAlignment="Left" Margin="0,2,0,0"
TextWrapping="Wrap" Text="{ll:Str '停用该模组'}" VerticalAlignment="Top" FontSize="14"
Foreground="{DynamicResource DARKPrimaryDarker}" TextDecorations="Underline"
Cursor="Hand" MouseDown="ButtonDisEnable_MouseDown" />
TextWrapping="Wrap" Text="{ll:Str '停用该模组'}" VerticalAlignment="Top"
FontSize="14" Foreground="{DynamicResource DARKPrimaryDarker}"
TextDecorations="Underline" Cursor="Hand" MouseDown="ButtonDisEnable_MouseDown" />
<TextBlock x:Name="ButtonPublish" HorizontalAlignment="Left" Margin="0,2,0,0"
TextWrapping="Wrap" Text="{ll:Str 更新至Steam}" VerticalAlignment="Top" FontSize="14"
Foreground="DimGray" TextDecorations="Underline" Cursor="Hand"
TextWrapping="Wrap" Text="{ll:Str 更新至Steam}" VerticalAlignment="Top"
FontSize="14" Foreground="DimGray" TextDecorations="Underline" Cursor="Hand"
MouseDown="ButtonPublish_MouseDown" />
<TextBlock x:Name="ButtonSteam" HorizontalAlignment="Left" Margin="0,2,0,0"
TextWrapping="Wrap" Text="{ll:Str 创意工坊页面}" VerticalAlignment="Top" FontSize="14"
@ -649,10 +684,10 @@
VerticalAlignment="Top" />
<TextBlock Margin="0,130,0,0" FontWeight="Bold" VerticalAlignment="Top">
<Run Text="{ll:Str 游戏策划}" /><LineBreak />
<Run Text="{ll:Str 'UI&amp;程序'}"/><LineBreak />
<Run Text="{ll:Str 'UI&amp;程序'}" /><LineBreak />
<Run Text="{ll:Str '动画绘制'}" /><LineBreak />
<Run Text="{ll:Str '开源项目'}" /><LineBreak /><LineBreak /><LineBreak />
<Run Text="{ll:Str '项目页面'}"/><LineBreak />
<Run Text="{ll:Str '项目页面'}" /><LineBreak />
<LineBreak /><LineBreak />
<LineBreak /><Run xml:space="preserve">Power By </Run>
<Hyperlink TextDecorations="Underline" Foreground="Black" Click="VPET_Click">exLB.net</Hyperlink>
@ -668,8 +703,8 @@
</TextBlock>
<TextBlock Margin="0,30,0,0" FontWeight="Bold" VerticalAlignment="Top">
<Run Text="{ll:Str '用户名'}" /><LineBreak />
<Run Text="{ll:Str '版本'}"/><LineBreak />
<Run Text="{ll:Str '激活'}"/><LineBreak />
<Run Text="{ll:Str '版本'}" /><LineBreak />
<Run Text="{ll:Str '激活'}" /><LineBreak />
</TextBlock>
<TextBlock VerticalAlignment="Top" Margin="100,30,0,0" TextWrapping="WrapWithOverflow">
<Run x:Name="runUserName">杨远洛里斯</Run><LineBreak />

View File

@ -61,13 +61,13 @@ namespace VPet_Simulator.Windows
TextBoxPetName.Text = mw.Core.Save.Name;
foreach (PetLoader pl in mw.Pets)
{
PetBox.Items.Add(pl.Name);
PetBox.Items.Add(pl.Name.Translate());
}
int petboxid = mw.Pets.FindIndex(x => x.Name == mw.Set.PetGraph);
if (petboxid == -1)
petboxid = 0;
PetBox.SelectedIndex = petboxid;
PetIntor.Text = mw.Pets[petboxid].Intor;
PetIntor.Text = mw.Pets[petboxid].Intor.Translate();
TextBoxStartUpX.Text = mw.Set.StartRecordPoint.X.ToString();
TextBoxStartUpY.Text = mw.Set.StartRecordPoint.Y.ToString();
@ -75,6 +75,17 @@ namespace VPet_Simulator.Windows
combCalFunState.SelectedIndex = (int)mw.Set.CalFunState;
combCalFunState.IsEnabled = !mw.Set.EnableFunction;
CalTimeInteraction();
LanguageBox.Items.Add("null");
foreach (string v in LocalizeCore.AvailableCultures)
{
LanguageBox.Items.Add(v);
}
LanguageBox.SelectedItem = LocalizeCore.CurrentCulture;
HitThroughBox.IsChecked = mw.Set.HitThrough;
PetHelperBox.IsChecked = mw.Set.PetHelper;
if (mw.Set.StartRecordLast == true)
{
StartPlace.IsChecked = true;
@ -680,7 +691,7 @@ namespace VPet_Simulator.Windows
{
if (!AllowChange)
return;
mw.Set.PetGraph = (string)PetBox.SelectedItem;
mw.Set.PetGraph = mw.Pets[PetBox.SelectedIndex].Name;
PetIntor.Text = mw.Pets[PetBox.SelectedIndex].Intor;
ButtonRestartGraph.Visibility = Visibility.Visible;
}
@ -902,5 +913,41 @@ namespace VPet_Simulator.Windows
mw.Main.NoFunctionMOD = (GameSave.ModeType)combCalFunState.SelectedIndex;
mw.Main.EventTimer_Elapsed(null, null);
}
private void HitThroughBox_Checked(object sender, RoutedEventArgs e)
{
if (!AllowChange)
return;
mw.Set.HitThrough = HitThroughBox.IsChecked.Value;
if (HitThroughBox.IsChecked.Value != mw.HitThrough)
mw.SetTransparentHitThrough();
if (HitThroughBox.IsChecked.Value)
PetHelperBox.IsChecked = true;
}
private void PetHelperBox_Checked(object sender, RoutedEventArgs e)
{
if (!AllowChange)
return;
if(PetHelperBox.IsChecked == true)
{
mw.Set.PetHelper = true;
mw.LoadPetHelper();
}
else
{
mw.Set.PetHelper = false;
mw.petHelper?.Close();
mw.petHelper = null;
}
}
private void LanguageBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (!AllowChange)
return;
LocalizeCore.LoadCulture((string)LanguageBox.SelectedItem);
mw.Set.Language = LocalizeCore.CurrentCulture;
}
}
}

View File

@ -4,8 +4,8 @@
<package id="Facepunch.Steamworks" version="2.3.3" targetFramework="net48" />
<package id="Facepunch.Steamworks.win32" version="2.3.3" targetFramework="net48" />
<package id="LinePutScript" version="1.8.2" targetFramework="net48" />
<package id="LinePutScript.Localization.WPF" version="1.0.3" targetFramework="net48" />
<package id="LinePutScript.Localization.WPF" version="1.0.4" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
<package id="Panuon.WPF" version="1.0.1" targetFramework="net48" />
<package id="Panuon.WPF.UI" version="1.1.12.1" targetFramework="net48" />
<package id="Panuon.WPF.UI" version="1.1.14" targetFramework="net48" />
</packages>