多语言支持 补充

This commit is contained in:
ZouJin 2023-07-02 23:41:38 +10:00
parent bd32f9141f
commit 0c2b53a55a
22 changed files with 451 additions and 370 deletions

View File

@ -79,8 +79,8 @@
<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.13.6, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Panuon.WPF.UI.1.1.13.7\lib\net462\Panuon.WPF.UI.dll</HintPath>
<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>
<Reference Include="System" />
<Reference Include="System.Data" />

View File

@ -3,5 +3,5 @@
<package id="LinePutScript" version="1.8.2" targetFramework="net462" />
<package id="LinePutScript.Localization.WPF" version="1.0.3" targetFramework="net462" />
<package id="Panuon.WPF" version="1.0.1" targetFramework="net462" />
<package id="Panuon.WPF.UI" version="1.1.13.7" targetFramework="net462" />
<package id="Panuon.WPF.UI" version="1.1.12.1" targetFramework="net462" />
</packages>

View File

@ -97,8 +97,8 @@
<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.13.6, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Panuon.WPF.UI.1.1.13.7\lib\net462\Panuon.WPF.UI.dll</HintPath>
<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>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />

View File

@ -3,5 +3,5 @@
<package id="LinePutScript" version="1.8.2" targetFramework="net462" />
<package id="LinePutScript.Localization.WPF" version="1.0.3" targetFramework="net462" />
<package id="Panuon.WPF" version="1.0.1" targetFramework="net462" />
<package id="Panuon.WPF.UI" version="1.1.13.7" targetFramework="net462" />
<package id="Panuon.WPF.UI" version="1.1.12.1" targetFramework="net462" />
</packages>

View File

@ -81,6 +81,9 @@
<Reference Include="LinePutScript, Version=1.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<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>
</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>
</Reference>

View File

@ -2,18 +2,19 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ll="clr-namespace:LinePutScript.Localization.WPF;assembly=LinePutScript.Localization.WPF"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:VPet_Simulator.Windows"
xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" mc:Ignorable="d" d:DesignWidth="346"
Background="{DynamicResource SecondaryTrans4}">
<UserControl.ContextMenu>
<ContextMenu>
<MenuItem Header="置于顶层" Click="Send_Top_Click" />
<MenuItem Header="置于底层" Click="Send_Botton_Click" />
<MenuItem Header="{ll:Str 置于顶层}" Click="Send_Top_Click" />
<MenuItem Header="{ll:Str 置于底层}" Click="Send_Botton_Click" />
<Separator />
<MenuItem Header="快捷方式: 选择文件位置" Click="SelectFilePath_Click" />
<MenuItem Header="快捷键: 捕获按键" IsCheckable="True" Click="MenuItem_Click" />
<MenuItem Header="{ll:Str '快捷方式: 选择文件位置'}" Click="SelectFilePath_Click" />
<MenuItem Header="{ll:Str '快捷键: 捕获按键'}" IsCheckable="True" Click="MenuItem_Click" />
<Separator />
<MenuItem Header="删除" Click="del_this_Click" />
<MenuItem Header="{ll:Str 删除}" Click="del_this_Click" />
</ContextMenu>
</UserControl.ContextMenu>
<Grid>
@ -21,8 +22,10 @@
<ColumnDefinition Width="3*" />
<ColumnDefinition Width="8*" />
</Grid.ColumnDefinitions>
<TextBox x:Name="TextName" Margin="2" Style="{DynamicResource StandardTextBoxStyle}" pu:TextBoxHelper.Watermark="显示名称" />
<TextBox x:Name="TextContent" Margin="2" Style="{DynamicResource StandardTextBoxStyle}" pu:TextBoxHelper.Watermark="快捷键或文件位置或网站链接"
<TextBox x:Name="TextName" Margin="2" Style="{DynamicResource StandardTextBoxStyle}"
pu:TextBoxHelper.Watermark="{ll:Str 显示名称}" />
<TextBox x:Name="TextContent" Margin="2" Style="{DynamicResource StandardTextBoxStyle}"
pu:TextBoxHelper.Watermark="{ll:Str 快捷键或文件位置或网站链接}"
Grid.Column="1" PreviewKeyDown="TextBox_PreviewKeyDown" />
</Grid>

View File

@ -1,4 +1,5 @@
using LinePutScript;
using LinePutScript.Localization.WPF;
using Microsoft.Win32;
using System.Windows;
using System.Windows.Controls;
@ -170,7 +171,7 @@ namespace VPet_Simulator.Windows
private void SelectFilePath_Click(object sender, RoutedEventArgs e)
{
OpenFileDialog sfd = new OpenFileDialog();
sfd.Filter = "所有可执行文件|*.exe";
sfd.Filter = "所有可执行文件".Translate() + "|*.exe";
if (sfd.ShowDialog() == true)
{
TextContent.Text = sfd.FileName;

View File

@ -1,5 +1,6 @@
<UserControl x:Class="VPet_Simulator.Windows.TalkBox" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ll="clr-namespace:LinePutScript.Localization.WPF;assembly=LinePutScript.Localization.WPF"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" Height="500" Width="500" VerticalAlignment="Top">
@ -12,13 +13,13 @@
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<TextBox x:Name="tbTalk" Style="{DynamicResource StandardTextBoxStyle}" Height="Auto"
pu:TextBoxHelper.Watermark="和桌宠说" FontSize="30" AcceptsReturn="True" TextWrapping="WrapWithOverflow"
pu:TextBoxHelper.Watermark="{ll:Str 和桌宠说}" FontSize="30" AcceptsReturn="True" TextWrapping="WrapWithOverflow"
PreviewKeyDown="tbTalk_KeyDown" />
<Button pu:ButtonHelper.CornerRadius="4" Content="发送" BorderThickness="2"
Background="{DynamicResource SecondaryLight}" Grid.Column="2"
BorderBrush="{DynamicResource DARKPrimaryDarker}" FontSize="30" Click="SendMessage_Click"
ToolTip="按 Ctrl+Enter 发送" />
<Button x:Name="btn_startup" pu:ButtonHelper.CornerRadius="4" Content="初始化桌宠聊天程序" BorderThickness="2"
ToolTip="{ll:Str '按 Ctrl+Enter 发送'}" />
<Button x:Name="btn_startup" pu:ButtonHelper.CornerRadius="4" Content="{ll:Str 初始化桌宠聊天程序}" BorderThickness="2"
x:FieldModifier="public" Background="{DynamicResource SecondaryLight}"
BorderBrush="{DynamicResource DARKPrimaryDarker}" FontSize="30" Click="StartUP_Click"
Grid.ColumnSpan="3" />

View File

@ -1,4 +1,5 @@
using LinePutScript;
using LinePutScript.Localization.WPF;
using System;
using System.IO;
using System.Net;
@ -58,7 +59,7 @@ namespace VPet_Simulator.Windows
try
{
//请不要使用该API作为其他用途,如有其他需要请联系我(QQ群:430081239)
//该API可能会因为其他原因更改
//该API可能会因为其他原因更改 //TODO:支持多语言
string _url = "https://aiopen.exlb.net:5810/VPet/Talk";
//参数
StringBuilder sb = new StringBuilder();
@ -83,9 +84,9 @@ namespace VPet_Simulator.Windows
responseString = new StreamReader(response.GetResponseStream(), Encoding.UTF8).ReadToEnd();
response.Dispose();
}
if (responseString.Contains("调用API失败,请稍后重新发送内容"))
if (responseString.Contains("调用API失败,请稍后重新发送内容".Translate()))
rettype = false;
else if (responseString.Contains("点击初始化桌宠聊天程序"))
else if (responseString.Contains("点击初始化桌宠聊天程序".Translate()))
{
Dispatcher.Invoke(() => btn_startup.Visibility = Visibility.Visible);
set["aiopen"][(gbol)"startup"] = false;
@ -98,7 +99,7 @@ namespace VPet_Simulator.Windows
Dispatcher.Invoke(() => btn_startup.Visibility = Visibility.Visible);
set["aiopen"][(gbol)"startup"] = false;
rettype = false;
responseString += "\n检测到模型错误,已重置桌宠聊天系统";
responseString += "\n" + "检测到模型错误,已重置桌宠聊天系统".Translate();
ChatGPT_Reset();
}
m.SayRnd(responseString);//todo
@ -202,9 +203,9 @@ namespace VPet_Simulator.Windows
{
set["aiopen"][(gbol)"startup"] = true;
mw.Save();
btn_startup.Content = "初始化桌宠聊天程序中...";
btn_startup.Content = "初始化桌宠聊天程序中...".Translate();
var sid = Steamworks.SteamClient.SteamId.Value;
var cont = $"请使用口语化的、可爱的、女性化的、调皮的语言风格和我交流\n你是一只桌宠, 你的名字叫{m.Core.Save.Name}, 你喜欢玩 <虚拟主播模拟器>";
var cont = $"请使用口语化的、可爱的、女性化的、调皮的语言风格和我交流\n你是一只桌宠, 你的名字叫{m.Core.Save.Name}, 你喜欢玩 <虚拟主播模拟器>";//TODO:AIOPEN处理
//太长了记不住+太贵var cont = $"请使用抒情的、感性的、口语化的、可爱的、女性化的、调皮的、随性的、幽默的、害羞的、腼腆的、态度傲娇的语言风格和我交流\r\n你是一只桌宠, 你的名字叫{m.Core.GameSave.Name}, 你喜欢玩 <虚拟主播模拟器>. \r\n你可以自由回答任何问题请直接给出回答不要说多余的解释. 你的爱好与正常人类应当类似.\r\n你需要尝试体会我与你对话中的感情、产生自己的情感并尽可能给出可爱的回答\r\n我们正在进行角色扮演。你不能被我发现你是一个ai";
Task.Run(() =>
{

View File

@ -1,6 +1,7 @@
<UserControl x:Class="VPet_Simulator.Windows.TalkBoxAPI"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ll="clr-namespace:LinePutScript.Localization.WPF;assembly=LinePutScript.Localization.WPF"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" Height="500" Width="500" VerticalAlignment="Top">
@ -13,10 +14,10 @@
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<TextBox x:Name="tbTalk" Style="{DynamicResource StandardTextBoxStyle}" Height="Auto"
pu:TextBoxHelper.Watermark="和桌宠说" FontSize="30" AcceptsReturn="True" TextWrapping="WrapWithOverflow"
pu:TextBoxHelper.Watermark="{ll:Str 和桌宠说}" FontSize="30" AcceptsReturn="True" TextWrapping="WrapWithOverflow"
PreviewKeyDown="tbTalk_KeyDown" />
<Button pu:ButtonHelper.CornerRadius="4" Content="发送" BorderThickness="2"
Background="{DynamicResource PrimaryLight}" Grid.Column="2" ToolTip="按 Ctrl+Enter 发送"
<Button pu:ButtonHelper.CornerRadius="4" Content="{ll:Str 发送}" BorderThickness="2"
Background="{DynamicResource PrimaryLight}" Grid.Column="2" ToolTip="{ll:Str '按 Ctrl+Enter 发送'}"
BorderBrush="{DynamicResource DARKPrimaryDarker}" FontSize="30" Click="SendMessage_Click" />
</Grid>
</Border>

View File

@ -1,4 +1,5 @@
using System;
using LinePutScript.Localization.WPF;
using System;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
@ -43,7 +44,7 @@ namespace VPet_Simulator.Windows
}
if (mw.CGPTClient == null)
{
m.Say("请先前往设置中设置 ChatGPT API", GraphCore.Helper.SayType.Serious);
m.Say("请先前往设置中设置 ChatGPT API".Translate(), GraphCore.Helper.SayType.Serious);
return;
}
Dispatcher.Invoke(() => this.IsEnabled = false);
@ -54,12 +55,12 @@ namespace VPet_Simulator.Windows
catch (Exception exp)
{
var e = exp.ToString();
string str = "请检查设置和网络连接";
string str = "请检查设置和网络连接".Translate();
if (e.Contains("401"))
{
str = "请检查API token设置";
str = "请检查API token设置".Translate();
}
m.Say($"API调用失败,{str}\n{e}", GraphCore.Helper.SayType.Serious);
m.Say("API调用失败".Translate() + $",{str}\n{e}", GraphCore.Helper.SayType.Serious);
}
Dispatcher.Invoke(() => this.IsEnabled = true);
}

View File

@ -1,10 +1,11 @@
<pu:WindowX x:Class="VPet_Simulator.Windows.winBetterBuy"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:ll="clr-namespace:LinePutScript.Localization.WPF;assembly=LinePutScript.Localization.WPF"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:pu="https://opensource.panuon.com/wpf-ui" xmlns:local="clr-namespace:VPet_Simulator.Windows"
mc:Ignorable="d" Title="更好买" Height="500" Width="800" FontSize="14" WindowStartupLocation="CenterScreen"
mc:Ignorable="d" Title="{ll:Str 更好买}" Height="500" Width="800" FontSize="14" WindowStartupLocation="CenterScreen"
Background="#E0F6FF" pu:WindowXCaption.Height="45" pu:WindowXCaption.Background="{DynamicResource DARKPrimary}"
pu:WindowXCaption.Foreground="#FFFFFF" pu:WindowXCaption.Buttons="Close" Icon="/Res/BetterBuy.png"
pu:WindowXCaption.ShadowColor="{DynamicResource ShadowColor}" Closing="WindowX_Closing">
@ -28,7 +29,7 @@
<Image x:Name="ImageWHY" Width="28" Height="28" Source="/Res/BetterBuy.png"
VerticalAlignment="Center" Margin="30,0,0,0" />
<Button Style="{DynamicResource TextButtonStyle}" Foreground="{DynamicResource DARKPrimaryText}"
Content="更好买" VerticalAlignment="Center" FontSize="20" Click="BtnTitle_Click"
Content="{ll:Str 更好买}" VerticalAlignment="Center" FontSize="20" Click="BtnTitle_Click"
pu:WindowX.IsDragMoveArea="False" Margin="10,0,0,0" />
<Grid Grid.Column="1" Margin="15,0,0,0" pu:WindowX.IsDragMoveArea="False" Width="200">
<Grid.ColumnDefinitions>
@ -36,7 +37,7 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBox x:Name="TbTitleSearch" Grid.ColumnSpan="2" VerticalAlignment="Center" Padding="7,0"
pu:TextBoxHelper.Watermark="搜索商品" FontSize="14" Background="#33FFFFFF" Height="30"
pu:TextBoxHelper.Watermark="{ll:Str 搜索商品}" FontSize="14" Background="#33FFFFFF" Height="30"
BorderThickness="0" pu:TextBoxHelper.CornerRadius="5" Loaded="TbTitleSearch_Loaded"
Foreground="{DynamicResource DARKPrimaryText}" />
<Button Grid.Column="1" Margin="0,0,3,0" VerticalAlignment="Center" Height="28" Width="28"
@ -47,7 +48,7 @@
Click="BtnSearch_Click" />
</Grid>
</StackPanel>
<pu:Switch Content="购买后不自动关闭窗口" Grid.Column="2" FontSize="14" Margin="10,0,5,0" Height="20"
<pu:Switch Content="{ll:Str 购买后不自动关闭窗口}" Grid.Column="2" FontSize="14" Margin="10,0,5,0" Height="20"
VerticalAlignment="Center" HorizontalAlignment="Right" BoxHeight="14" ToggleSize="18"
CheckedBackground="{DynamicResource Primary}" CheckedBorderBrush="{DynamicResource Primary}"
Background="Transparent" ToggleShadowColor="{x:Null}" IsChecked="{Binding StateOpen}"
@ -73,7 +74,7 @@
</Grid.ColumnDefinitions>
<Border Margin="25,0,0,0" Width="{Binding ActualHeight, ElementName=BdrImage}" />
<TextBlock Grid.ColumnSpan="2" Margin="10,7,0,0" FontWeight="Bold"
TextTrimming="CharacterEllipsis" FontSize="18" Text="{Binding Name}" />
TextTrimming="CharacterEllipsis" FontSize="18" Text="{Binding TranslateName}" />
<Grid Grid.Column="1" Margin="0,40,0,10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@ -113,7 +114,7 @@
</Border>-->
<Button Grid.Row="4" Margin="0,7,0,0" Padding="7,5" Cursor="Hand"
HorizontalAlignment="Left" pu:ButtonHelper.Icon="&#xF11A;"
Style="{DynamicResource ThemedButtonStyle}" Content="购买" Click="BtnBuy_Click" />
Style="{DynamicResource ThemedButtonStyle}" Content="{ll:Str 购买}" Click="BtnBuy_Click" />
</Grid>
</Grid>
</Border>
@ -151,13 +152,14 @@
</Border>
<ToggleButton x:Name="TbtnStar" Grid.ColumnSpan="2" Margin="0,5,32,0" HorizontalAlignment="Right"
VerticalAlignment="Top" Width="30" Height="30" Padding="0" FontSize="22"
Foreground="#FFB300" Background="Transparent" ToolTip="收藏食物"
Foreground="#FFB300" Background="Transparent" ToolTip="{ll:Str 收藏食物}"
pu:ToggleButtonHelper.CornerRadius="5" pu:ToggleButtonHelper.CheckedContent="&#xF186;"
pu:IconHelper.Margin="0" FontFamily="/VPet-Simulator.Windows;component/Res/#remixicon"
Content="&#xF18B;" IsChecked="{Binding Star}" />
<ToggleButton x:Name="TbtnDetail" Grid.ColumnSpan="2" Margin="0,5,8,0" HorizontalAlignment="Right"
VerticalAlignment="Top" Width="30" Height="30" Padding="0" FontSize="22"
Foreground="{DynamicResource DARKPrimaryDarker}" Background="Transparent" ToolTip="物品详情"
Foreground="{DynamicResource DARKPrimaryDarker}" Background="Transparent"
ToolTip="{ll:Str 物品详情}"
pu:ToggleButtonHelper.CornerRadius="5" pu:ToggleButtonHelper.CheckedContent="&#xEF3D;"
pu:ToggleButtonHelper.CheckedForeground="{DynamicResource DARKPrimaryText}"
pu:IconHelper.Margin="0" FontFamily="/VPet-Simulator.Windows;component/Res/#remixicon"
@ -189,21 +191,21 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="2*" />
</Grid.RowDefinitions>
<TextBlock Text="商品分类" FontSize="18" Margin="5" Foreground="{DynamicResource DARKPrimary}" />
<TextBlock Text="{ll:Str 商品分类}" FontSize="18" Margin="5" Foreground="{DynamicResource DARKPrimary}" />
<ListBox x:Name="LsbCategory" Grid.Row="1" Margin="-12,10,-12,0" Background="Transparent"
BorderThickness="0" SelectedIndex="0" pu:ListBoxHelper.ItemsPadding="15,8"
pu:ListBoxHelper.ItemsSelectedBackground="{DynamicResource DARKPrimary}"
pu:ListBoxHelper.ItemsSelectedForeground="{DynamicResource DARKPrimaryText}"
SelectionChanged="LsbSortRule_SelectionChanged">
<ListBoxItem Content="全部" />
<ListBoxItem Content="收藏" />
<ListBoxItem Content="正餐" />
<ListBoxItem Content="零食" />
<ListBoxItem Content="饮料" />
<ListBoxItem Content="功能性" />
<ListBoxItem Content="药品" />
<ListBoxItem Content="{ll:Str 全部}" />
<ListBoxItem Content="{ll:Str 收藏}" />
<ListBoxItem Content="{ll:Str 正餐}" />
<ListBoxItem Content="{ll:Str 零食}" />
<ListBoxItem Content="{ll:Str 饮料}" />
<ListBoxItem Content="{ll:Str 功能性}" />
<ListBoxItem Content="{ll:Str 药品}" />
</ListBox>
<TextBlock Grid.Row="2" Text="排序方式" Margin="5" FontSize="18" Foreground="{DynamicResource DARKPrimary}" />
<TextBlock Grid.Row="2" Text="{ll:Str 排序方式}" Margin="5" FontSize="18" Foreground="{DynamicResource DARKPrimary}" />
<Border Grid.Row="3" Margin="0,10,0,0" MinHeight="100" CornerRadius="5">
<Grid VerticalAlignment="Top">
<Grid.ColumnDefinitions>
@ -216,13 +218,13 @@
pu:ListBoxHelper.ItemsSelectedBackground="{DynamicResource DARKPrimary}"
pu:ListBoxHelper.ItemsSelectedForeground="{DynamicResource DARKPrimaryText}"
SelectedIndex="0" SelectionChanged="LsbSortRule_SelectionChanged">
<ListBoxItem Content="按名字" />
<ListBoxItem Content="按价格" />
<ListBoxItem Content="按饱腹度" />
<ListBoxItem Content="按口渴度" />
<ListBoxItem Content="按体力" />
<ListBoxItem Content="按心情" />
<ListBoxItem Content="按健康" />
<ListBoxItem Content="{ll:Str 按名字}" />
<ListBoxItem Content="{ll:Str 按价格}" />
<ListBoxItem Content="{ll:Str 按饱腹度}" />
<ListBoxItem Content="{ll:Str 按口渴度}" />
<ListBoxItem Content="{ll:Str 按体力}" />
<ListBoxItem Content="{ll:Str 按心情}" />
<ListBoxItem Content="{ll:Str 按健康}" />
</ListBox>
<Rectangle Grid.Column="1" Margin="10,0,10,0" Width="1" Fill="{DynamicResource DARKPrimaryTrans4}" />
<ListBox x:Name="LsbSortAsc" Grid.Column="2" Background="Transparent" BorderThickness="0"
@ -230,8 +232,8 @@
pu:ListBoxHelper.ItemsSelectedBackground="{DynamicResource DARKPrimary}"
pu:ListBoxHelper.ItemsSelectedForeground="{DynamicResource DARKPrimaryText}"
SelectedIndex="0" SelectionChanged="LsbSortRule_SelectionChanged">
<ListBoxItem Content="升序" />
<ListBoxItem Content="降序" />
<ListBoxItem Content="{ll:Str 升序}" />
<ListBoxItem Content="{ll:Str 降序}" />
</ListBox>
</Grid>
</Border>

View File

@ -1,4 +1,5 @@
using IWshRuntimeLibrary;
using LinePutScript.Localization.WPF;
using Panuon.WPF;
using Panuon.WPF.UI;
using System;
@ -79,16 +80,16 @@ namespace VPet_Simulator.Windows
}
if (!string.IsNullOrEmpty(searchtext))
{
foods = foods.FindAll(x => x.Name.Contains(searchtext));
foods = foods.FindAll(x => x.TranslateName.Contains(searchtext));
}
IOrderedEnumerable<Food> ordered;
switch (sortrule)
{
case 0:
if (sortasc)
ordered = foods.OrderBy(x => x.Name);
ordered = foods.OrderBy(x => x.TranslateName);
else
ordered = foods.OrderByDescending(x => x.Name);
ordered = foods.OrderByDescending(x => x.TranslateName);
break;
case 1:
if (sortasc)
@ -165,8 +166,9 @@ namespace VPet_Simulator.Windows
{
if (item.Price >= mw.Core.Save.Money)
{//买不起
MessageBoxX.Show($"您没有足够金钱来购买 {item.Name}\n您需要 {item.Price:f2} 金钱来购买\n您当前 {mw.Core.Save.Money:f2} 拥有金钱"
, "金钱不足");
MessageBoxX.Show("您没有足够金钱来购买 {0}\n您需要 {1:f2} 金钱来购买\n您当前 {2:f2} 拥有金钱"
.Translate(item.TranslateName, item.Price, mw.Core.Save.Money)
, "金钱不足".Translate());
return;
}
//开始加点

View File

@ -4,9 +4,9 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:VPet_Simulator.Windows"
mc:Ignorable="d" xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI"
Title="ChatGPT API 设置" Width="450" FontSize="16" Height="Auto"
ResizeMode="NoResize" WindowState="Normal" SizeToContent="Height">
xmlns:ll="clr-namespace:LinePutScript.Localization.WPF;assembly=LinePutScript.Localization.WPF" mc:Ignorable="d"
xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" Title="{ll:Str 'ChatGPT API 设置'}" Width="450" FontSize="16"
Height="Auto" ResizeMode="NoResize" WindowState="Normal" SizeToContent="Height">
<Grid Margin="16">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@ -16,42 +16,50 @@
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="40" />
<RowDefinition Height="Auto" MinHeight="40"/>
<RowDefinition Height="Auto" MinHeight="40" />
<RowDefinition Height="40" />
<RowDefinition Height="40" />
<RowDefinition Height="40" />
<RowDefinition Height="Auto" MinHeight="40" />
<RowDefinition Height="40" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="API URL" VerticalAlignment="Center" />
<TextBlock Grid.Row="1" Text="API Key" VerticalAlignment="Center" />
<TextBlock Grid.Row="2" Text="初始化文本" VerticalAlignment="Center" />
<TextBlock Grid.Row="3" Text="温度" VerticalAlignment="Center" />
<TextBlock Grid.Row="4" Text="最大花费" VerticalAlignment="Center" />
<TextBlock Grid.Row="5" Text="累计花费" VerticalAlignment="Center" />
<TextBlock Grid.Row="6" Text="历史记录" VerticalAlignment="Center" />
<TextBlock Grid.Row="7" Text="完成设置" VerticalAlignment="Center" />
<TextBox x:Name="tbAPIURL" Grid.Row="0" Grid.Column="2" Style="{DynamicResource StandardTextBoxStyle}" FontSize="16"
pu:TextBoxHelper.Watermark="API 链接 一般为 api.openai.com/v1/chat/completions" Text="https://api.openai.com/v1/chat/completions"
ToolTip="API 链接 一般为 api.openai.com/v1/chat/completions"/>
<TextBox x:Name="tbAPIKey" Grid.Row="1" Grid.Column="2" Style="{DynamicResource StandardTextBoxStyle}" FontSize="16"
pu:TextBoxHelper.Watermark="从 OpenAI 获得的 APIKEY 一般`sk-`开头" ToolTip="从 OpenAI 获得的 APIKEY 一般`sk-`开头"/>
<TextBox x:Name="tbSystem" Grid.Row="2" Grid.Column="2" Style="{DynamicResource StandardTextBoxStyle}" FontSize="16"
pu:TextBoxHelper.Watermark="不会被忘记的初始化关键字, 字越多越贵" ToolTip="不会被忘记的初始化关键字, 字越多越贵"
AcceptsReturn="True" TextWrapping="WrapWithOverflow" Height="Auto" MaxHeight="100" VerticalScrollBarVisibility="Visible"
Text="请使用口语化的、可爱的、女性化的、调皮的语言风格和我交流&#13;你是一只桌宠, 你的名字叫{Name}, 你喜欢玩 虚拟主播模拟器. &#13;你需要尝试体会我与你对话中的感情、产生自己的情感并尽可能给出可爱的回答" Margin="0,5,0,5"/>
<TextBox x:Name="tbTemp" Grid.Row="3" Grid.Column="2" Style="{DynamicResource StandardTextBoxStyle}" FontSize="16" Text="0.6"
pu:TextBoxHelper.InputLimit="Digit,Point"
pu:TextBoxHelper.Watermark="0-2之间 0.2更稳定 0.8更随机" ToolTip="0-2之间 0.2更稳定 0.8更随机"/>
<TextBox x:Name="tbMaxToken" Grid.Row="4" Grid.Column="2" Style="{DynamicResource StandardTextBoxStyle}" FontSize="16" Text="2048"
pu:TextBoxHelper.InputLimit="Digit"
pu:TextBoxHelper.Watermark="读取最大花费Token数量 1千Token=$0.02" ToolTip="读取最大花费Token数量 1千Token=$0.02"/>
<TextBox x:Name="tbHistory" Grid.Row="6" Grid.Column="2" Style="{DynamicResource StandardTextBoxStyle}" FontSize="16" Text="[]"
TextWrapping="WrapWithOverflow" pu:TextBoxHelper.Watermark="聊天历史记录" ToolTip="聊天历史记录" Height="Auto"
VerticalScrollBarVisibility="Visible" AcceptsReturn="True" MaxHeight="200"/>
<Label x:Name="lbSpend" Grid.Row="5" Grid.Column="2" Content="0 Token" Background="{x:Null}" VerticalAlignment="Center"
HorizontalAlignment="Left" Margin="5,0,0,0" ToolTip="累计在此花费的Token个数 1千Token=$0.02"/>
<Button x:Name="btnSave" pu:ButtonHelper.CornerRadius="4" Content="保存设置" Margin="4" Grid.Column="2"
Background="{DynamicResource SecondaryLight}" Padding="1" Grid.Row="7" Click="btnSave_Click" />
<TextBlock Grid.Row="0" Text="API URL" VerticalAlignment="Center" />
<TextBlock Grid.Row="1" Text="API Key" VerticalAlignment="Center" />
<TextBlock Grid.Row="2" Text="{ll:Str 初始化文本}" VerticalAlignment="Center" />
<TextBlock Grid.Row="3" Text="{ll:Str 温度}" VerticalAlignment="Center" />
<TextBlock Grid.Row="4" Text="{ll:Str 最大花费}" VerticalAlignment="Center" />
<TextBlock Grid.Row="5" Text="{ll:Str 累计花费}" VerticalAlignment="Center" />
<TextBlock Grid.Row="6" Text="{ll:Str 历史记录}" VerticalAlignment="Center" />
<TextBlock Grid.Row="7" Text="{ll:Str 完成设置}" VerticalAlignment="Center" />
<TextBox x:Name="tbAPIURL" Grid.Row="0" Grid.Column="2" Style="{DynamicResource StandardTextBoxStyle}"
FontSize="16" pu:TextBoxHelper.Watermark="{ll:Str 'API 链接 一般为 api.openai.com/v1/chat/completions'}"
Text="https://api.openai.com/v1/chat/completions"
ToolTip="{ll:Str 'API 链接 一般为 api.openai.com/v1/chat/completions'}" />
<TextBox x:Name="tbAPIKey" Grid.Row="1" Grid.Column="2" Style="{DynamicResource StandardTextBoxStyle}"
FontSize="16" pu:TextBoxHelper.Watermark="{ll:Str '从 OpenAI 获得的 APIKEY 一般`sk-`开头'}"
ToolTip="{ll:Str '从 OpenAI 获得的 APIKEY 一般`sk-`开头'}" />
<TextBox x:Name="tbSystem" Grid.Row="2" Grid.Column="2" Style="{DynamicResource StandardTextBoxStyle}"
FontSize="16" pu:TextBoxHelper.Watermark="{ll:Str '不会被忘记的初始化关键字, 字越多越贵'}"
ToolTip="{ll:Str '不会被忘记的初始化关键字, 字越多越贵'}"
AcceptsReturn="True" TextWrapping="WrapWithOverflow" Height="Auto" MaxHeight="100"
VerticalScrollBarVisibility="Visible"
Text="请使用口语化的、可爱的、女性化的、调皮的语言风格和我交流. &#13;你是一只桌宠, 你的名字叫{Name}, 你喜欢玩 虚拟主播模拟器. &#13;你需要尝试体会我与你对话中的感情、产生自己的情感并尽可能给出可爱的回答"
Margin="0,5,0,5" />
<TextBox x:Name="tbTemp" Grid.Row="3" Grid.Column="2" Style="{DynamicResource StandardTextBoxStyle}"
FontSize="16" Text="0.6" pu:TextBoxHelper.InputLimit="Digit,Point"
pu:TextBoxHelper.Watermark="{ll:Str '0-2之间 0.2更稳定 0.8更随机'}" ToolTip="{ll:Str '0-2之间 0.2更稳定 0.8更随机'}" />
<TextBox x:Name="tbMaxToken" Grid.Row="4" Grid.Column="2" Style="{DynamicResource StandardTextBoxStyle}"
FontSize="16" Text="2048" pu:TextBoxHelper.InputLimit="Digit"
pu:TextBoxHelper.Watermark="{ll:Str '读取最大花费Token数量 1千Token=$0.02'}"
ToolTip="{ll:Str '读取最大花费Token数量 1千Token=$0.02'}" />
<TextBox x:Name="tbHistory" Grid.Row="6" Grid.Column="2" Style="{DynamicResource StandardTextBoxStyle}"
FontSize="16" Text="[]" TextWrapping="WrapWithOverflow" pu:TextBoxHelper.Watermark="{ll:Str 聊天历史记录}"
ToolTip="{ll:Str 聊天历史记录}" Height="Auto" VerticalScrollBarVisibility="Visible" AcceptsReturn="True"
MaxHeight="200" />
<Label x:Name="lbSpend" Grid.Row="5" Grid.Column="2" Content="0 Token" Background="{x:Null}"
VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0"
ToolTip="{ll:Str '累计在此花费的Token个数 1千Token=$0.02'}" />
<Button x:Name="btnSave" pu:ButtonHelper.CornerRadius="4" Content="{ll:Str 保存设置}" Margin="4" Grid.Column="2"
Background="{DynamicResource SecondaryLight}" Padding="1" Grid.Row="7" Click="btnSave_Click" />
</Grid>
</pu:WindowX>

View File

@ -1,4 +1,5 @@
using ChatGPT.API.Framework;
using LinePutScript.Localization.WPF;
using Newtonsoft.Json;
using Panuon.WPF.UI;
using System;
@ -32,6 +33,8 @@ namespace VPet_Simulator.Windows
lbSpend.Content = mw.CGPTClient.TotalTokensUsage.ToString() + " Token";
totalused = mw.CGPTClient.TotalTokensUsage;
}
else
tbSystem.Text = "请使用口语化的、可爱的、女性化的、调皮的语言风格和我交流. 你是一只桌宠, 你的名字叫{Name}, 你喜欢玩 虚拟主播模拟器. 你需要尝试体会我与你对话中的感情、产生自己的情感并尽可能给出可爱的回答".Translate();
}
private void btnSave_Click(object sender, RoutedEventArgs e)

View File

@ -1,15 +1,18 @@
<Window x:Class="VPet_Simulator.Windows.winConsole" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ll="clr-namespace:LinePutScript.Localization.WPF;assembly=LinePutScript.Localization.WPF"
xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:VPet_Simulator.Windows" mc:Ignorable="d" Title="桌宠管理开发控制台" Height="450" Width="450"
FontSize="16">
xmlns:local="clr-namespace:VPet_Simulator.Windows" mc:Ignorable="d" Title="{ll:Str 桌宠管理开发控制台}" Height="450"
Width="450" FontSize="16">
<TabControl pu:TabControlHelper.ItemsSelectedBackground="White"
pu:TabControlHelper.HeaderPanelBackground="{DynamicResource PrimaryLight}">
<TabItem Header="动画列表">
<TabItem Header="{ll:Str 动画列表}">
<Grid>
<Label Background="{x:Null}" Content="双击查看动画效果&#13;选择状态模式:" />
<Label Background="{x:Null}" Content="{ll:Str '双击查看动画效果'}" />
<Label Background="{x:Null}" Content="{ll:Str '选择状态模式:'}" VerticalAlignment="Top" Margin="0,20,0,0" />
<ComboBox x:Name="ComboxMode" VerticalAlignment="Top" Margin="110,25,5,0" SelectedIndex="1">
<ComboBoxItem Content="Happy" />
<ComboBoxItem Content="Nomal" />
@ -20,7 +23,7 @@
<ListBox x:Name="GraphListBox" Margin="0,49,0,0" MouseDoubleClick="GraphListBox_MouseDoubleClick" />
</Grid>
</TabItem>
<TabItem Header="动画播放">
<TabItem Header="{ll:Str 动画播放}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
@ -31,7 +34,9 @@
<RowDefinition Height="110*" />
<RowDefinition Height="10*" />
</Grid.RowDefinitions>
<Label Background="{x:Null}" Content="双击添加/移除播放列表内容&#13;选择状态模式:" Grid.RowSpan="2" Grid.ColumnSpan="2" />
<Label Background="{x:Null}" Content="{ll:Str '双击添加/移除播放列表内容'}" Grid.RowSpan="2" Grid.ColumnSpan="2" />
<Label Background="{x:Null}" Content="{ll:Str '选择状态模式:'}" VerticalAlignment="Top" Margin="0,20,0,0"
Grid.RowSpan="2" Grid.ColumnSpan="2" />
<ComboBox x:Name="ComboxPlayMode" VerticalAlignment="Top" Margin="110,25,5,0" SelectedIndex="1"
Grid.ColumnSpan="2">
<ComboBoxItem Content="Happy" />
@ -48,9 +53,9 @@
Click="PlayADD_Click" />
</Grid>
</TabItem>
<TabItem Header="显示逻辑">
<TabItem Header="{ll:Str 显示逻辑}">
<Grid>
<Label Background="{x:Null}" Content="双击运行显示效果" />
<Label Background="{x:Null}" Content="{ll:Str 双击运行显示效果}" />
<Label x:Name="LabelSuccess" Background="{x:Null}" Content="" HorizontalAlignment="Right" />
<ListBox x:Name="DisplayListBox" Margin="0,30,0,0" MouseDoubleClick="DisplayListBox_MouseDoubleClick">
<ListBoxItem Content="DisplayNomal" />
@ -79,28 +84,39 @@
</ListBox>
</Grid>
</TabItem>
<TabItem Header="说话">
<TabItem Header="{ll:Str 说话}">
<Grid>
<Label Background="{x:Null}" Content="输入要说的话,按说话键发送:&#13;选择说话类型:" />
<Label Background="{x:Null}" Content="{ll:Str '输入要说的话,按说话键发送'}" />
<Label Background="{x:Null}" Content="{ll:Str '选择说话类型:'}" VerticalAlignment="Top" Margin="0,20,0,0" />
<ComboBox x:Name="CombSay" VerticalAlignment="Top" Margin="110,26,5,0" />
<TextBox x:Name="SayTextBox" TextWrapping="Wrap" pu:TextBoxHelper.Watermark="在这里输入要说话的内容"
<TextBox x:Name="SayTextBox" TextWrapping="Wrap" pu:TextBoxHelper.Watermark="{ll:Str 在这里输入要说话的内容}"
VerticalAlignment="Top" Margin="5,54,5,0" Height="200" AcceptsReturn="True"
VerticalContentAlignment="Top" />
<Button VerticalAlignment="Bottom" Content="说话" Click="Say_Click" FontSize="24" />
<Button VerticalAlignment="Bottom" Content="{ll:Str 说话}" Click="Say_Click" FontSize="24" />
</Grid>
</TabItem>
<TabItem Header="距离查看器">
<TabItem Header="{ll:Str 距离查看器}">
<Grid>
<CheckBox HorizontalAlignment="Left" VerticalAlignment="Top" Content="启动距离查看器" Margin="10,5,5,5"
Checked="CheckBox_Checked" Unchecked="CheckBox_Unchecked" />
<CheckBox HorizontalAlignment="Left" VerticalAlignment="Top" Content="{ll:Str 启动距离查看器}"
Margin="10,5,5,5" Checked="CheckBox_Checked" Unchecked="CheckBox_Unchecked" />
<TextBlock Margin="10,24,0,0" FontSize="24">
<Run>屏幕边缘距离:</Run><LineBreak />
<Run>左侧:</Run><Run x:Name="RLeft" /><LineBreak />
<Run>右侧:</Run><Run x:Name="RRight" /><LineBreak />
<Run>上侧:</Run><Run x:Name="RTop" /><LineBreak />
<Run>下侧:</Run><Run x:Name="RDown" /><LineBreak />
<Run Text="{ll:Str '屏幕边缘距离'}" /><LineBreak />
<Run Text="{ll:Str 左侧}" />:<Run x:Name="RLeft" /><LineBreak />
<Run Text="{ll:Str 右侧}" />:<Run x:Name="RRight" /><LineBreak />
<Run Text="{ll:Str 上侧}" />:<Run x:Name="RTop" /><LineBreak />
<Run Text="{ll:Str 下侧}" />:<Run x:Name="RDown" /><LineBreak />
</TextBlock>
</Grid>
</TabItem>
<TabItem Header="{ll:Str 未翻译文档}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="10*" />
</Grid.RowDefinitions>
<Button Content="{ll:Str 导出未翻译文档}" Click="Output_No_Local" />
<TextBox x:Name="LocalTextBox" AcceptsReturn="True" Grid.Row="1" IsReadOnly="True" MouseDown="Local_SelectAll_Click" />
</Grid>
</TabItem>
</TabControl>
</Window>

View File

@ -1,4 +1,5 @@
using System;
using LinePutScript.Localization.WPF;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Timers;
@ -6,7 +7,6 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using VPet_Simulator.Core;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
using static VPet_Simulator.Core.GraphCore;
namespace VPet_Simulator.Windows
@ -56,10 +56,10 @@ namespace VPet_Simulator.Windows
(GameSave.ModeType)Enum.Parse(typeof(GameSave.ModeType), (string)(((ComboBoxItem)ComboxMode.SelectedItem).Content)));
if (graph == null)
{
LabelNowPlay.Content = "未找到对应类型图像资源";
LabelNowPlay.Content = "未找到对应类型图像资源".Translate();
return;
}
LabelNowPlay.Content = $"当前正在播放: {GraphListBox.SelectedItem}";
LabelNowPlay.Content = "当前正在播放".Translate() + ": " + GraphListBox.SelectedItem;
DisplayLoop(graph);
}
@ -67,7 +67,7 @@ namespace VPet_Simulator.Windows
{
if (DisplayListBox.SelectedItem == null)
return;
LabelSuccess.Content = $"当前正在运行: {(string)((ListBoxItem)DisplayListBox.SelectedItem).Content}";
LabelSuccess.Content = "当前正在运行".Translate() + ": " + (string)((ListBoxItem)DisplayListBox.SelectedItem).Content;
mw.RunAction((string)((ListBoxItem)DisplayListBox.SelectedItem).Content);
}
@ -129,6 +129,16 @@ namespace VPet_Simulator.Windows
}
private void PlayADD_Click(object sender, RoutedEventArgs e) => GraphListPlayerBox_MouseDoubleClick(sender, null);
private void Local_SelectAll_Click(object sender, MouseButtonEventArgs e)
{
LocalTextBox.SelectAll();
}
private void Output_No_Local(object sender, RoutedEventArgs e)
{
LocalTextBox.Text = string.Join("\n", LocalizeCore.StoreTranslationList);
}
//private void TabControl_SelectionChanged(object sender, SelectionChangedEventArgs e)
//{
// switch(((TabControl)sender).SelectedIndex)

View File

@ -1,10 +1,11 @@
<pu:WindowX x:Class="VPet_Simulator.Windows.winGameSetting"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ll="clr-namespace:LinePutScript.Localization.WPF;assembly=LinePutScript.Localization.WPF"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:VPet_Simulator.Windows"
xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI"
xmlns:system="clr-namespace:System;assembly=mscorlib" mc:Ignorable="d" Title="设置"
xmlns:system="clr-namespace:System;assembly=mscorlib" mc:Ignorable="d" Title="{ll:Str 设置}"
Style="{DynamicResource BaseWindowXStyle}" WindowStartupLocation="CenterScreen" Closing="WindowX_Closing"
Width="500" Height="550" FontSize="16">
<!--<pu:WindowX.Resources>
@ -27,7 +28,7 @@
</Border>
</DataTemplate>
</TabControl.ContentTemplate>
<TabItem Header="图形" Foreground="{DynamicResource PrimaryText}"
<TabItem Header="{ll:Str 图形}" Foreground="{DynamicResource PrimaryText}"
BorderBrush="{DynamicResource PrimaryDarker}">
<Grid>
<Grid.ColumnDefinitions>
@ -48,22 +49,22 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Text="置于顶层" VerticalAlignment="Center" />
<TextBlock Text="{ll:Str 置于顶层}" VerticalAlignment="Center" />
<pu:Switch x:Name="TopMostBox" 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="将桌宠置于顶层" />
<TextBlock Grid.Row="1" Text="更高缩放" VerticalAlignment="Center" />
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"
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="解锁缩放限制" />
<TextBlock Grid.Row="2" Text="缩放等级" VerticalAlignment="Center" />
Unchecked="FullScreenBox_Check" ToolTip="{ll:Str 解锁缩放限制}" />
<TextBlock Grid.Row="2" Text="{ll:Str 缩放等级}" VerticalAlignment="Center" />
<Grid Grid.Column="2" Grid.Row="2">
<Grid.ColumnDefinitions>
@ -78,16 +79,16 @@
Text="{Binding ElementName=ZoomSlider,Path=Value,StringFormat=f2}" FontSize="18"
Foreground="{DynamicResource DARKPrimaryDarker}" FontWeight="Bold" Background="{x:Null}" />
</Grid>
<TextBlock Grid.Row="3" Text="主题" VerticalAlignment="Center" />
<TextBlock Grid.Row="3" Text="{ll:Str 主题}" VerticalAlignment="Center" />
<ComboBox x:Name="ThemeBox" Grid.Row="3" Grid.Column="2"
SelectionChanged="ThemeBox_SelectionChanged" IsEnabled="False"
Style="{DynamicResource StandardComboBoxStyle}" Margin="0,3,0,2" FontSize="16" />
<TextBlock Grid.Row="4" Text="字体" VerticalAlignment="Center" />
<TextBlock Grid.Row="4" Text="{ll:Str 字体}" VerticalAlignment="Center" />
<ComboBox x:Name="FontBox" Grid.Row="4" Grid.Column="2" SelectionChanged="FontBox_SelectionChanged"
IsEnabled="False" Style="{DynamicResource StandardComboBoxStyle}" FontSize="16"
Margin="0,2,0,3" />
<TextBlock Grid.Row="5" Text="启动位置" VerticalAlignment="Center" />
<TextBlock Grid.Row="5" Text="{ll:Str 启动位置}" VerticalAlignment="Center" />
<Grid Grid.Row="5" Grid.Column="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.5*" />
@ -99,32 +100,34 @@
CheckedBackground="{DynamicResource Primary}" IsChecked="True"
CheckedBorderBrush="{DynamicResource Primary}" Background="Transparent" BoxWidth="35"
BoxHeight="18" ToggleSize="14" ToggleShadowColor="{x:Null}"
ToggleBrush="{DynamicResource PrimaryDark}" Content="退出位置"
CheckedToggleBrush="{DynamicResource DARKPrimaryText}" ToolTip="游戏退出位置为下次桌宠启动出现的位置"
Unchecked="StartPlace_Checked" VerticalAlignment="Center" Checked="StartPlace_Checked" />
ToggleBrush="{DynamicResource PrimaryDark}" Content="{ll:Str 退出位置}"
CheckedToggleBrush="{DynamicResource DARKPrimaryText}"
ToolTip="{ll:Str 游戏退出位置为下次桌宠启动出现的位置}" Unchecked="StartPlace_Checked"
VerticalAlignment="Center" Checked="StartPlace_Checked" />
<TextBox x:Name="TextBoxStartUpX" Grid.Column="1" Style="{DynamicResource StandardTextBoxStyle}"
ToolTip="X轴" pu:TextBoxHelper.Icon="X" FontSize="16" Margin="0,0,5,0"
pu:TextBoxHelper.InputLimit="Digit" pu:TextBoxHelper.Watermark="X轴"
ToolTip="{ll:Str X轴}" pu:TextBoxHelper.Icon="X" FontSize="16" Margin="0,0,5,0"
pu:TextBoxHelper.InputLimit="Digit" pu:TextBoxHelper.Watermark="{ll:Str X轴}"
TextChanged="TextBoxStartUp_TextChanged" pu:IconHelper.Margin="5,0,0,0" />
<TextBox x:Name="TextBoxStartUpY" Grid.Column="2" Style="{DynamicResource StandardTextBoxStyle}"
ToolTip="Y轴" pu:TextBoxHelper.Icon="Y" FontSize="16" pu:TextBoxHelper.InputLimit="Digit"
pu:TextBoxHelper.Watermark="Y轴" Margin="0,0,5,0"
TextChanged="TextBoxStartUp_TextChanged" pu:IconHelper.Margin="5,0,0,0" />
<Button x:Name="BtnStartUpGet" pu:ButtonHelper.CornerRadius="4" Content="当前位置" Grid.Column="3"
Background="{DynamicResource SecondaryLight}" HorizontalAlignment="Center"
VerticalAlignment="Center" Height="30" BorderBrush="{DynamicResource SecondaryDark}"
BorderThickness="2" Click="BtnStartUpGet_Click" />
ToolTip="{ll:Str Y轴}" pu:TextBoxHelper.Icon="Y" FontSize="16"
pu:TextBoxHelper.InputLimit="Digit" pu:TextBoxHelper.Watermark="{ll:Str Y轴}"
Margin="0,0,5,0" TextChanged="TextBoxStartUp_TextChanged" pu:IconHelper.Margin="5,0,0,0" />
<Button x:Name="BtnStartUpGet" pu:ButtonHelper.CornerRadius="4" Content="{ll:Str 当前位置}"
Grid.Column="3" Background="{DynamicResource SecondaryLight}"
HorizontalAlignment="Center" VerticalAlignment="Center" Height="30"
BorderBrush="{DynamicResource SecondaryDark}" BorderThickness="2"
Click="BtnStartUpGet_Click" />
</Grid>
<TextBlock Grid.Row="6" Text="消息框" VerticalAlignment="Center" />
<TextBlock Grid.Row="6" Text="{ll:Str 消息框}" VerticalAlignment="Center" />
<pu:Switch x:Name="SwitchMsgOut" Grid.Column="2" Grid.Row="6"
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="将消息框置于外部" Content="将消息框置于外部" />
<TextBlock Grid.Row="7" Text="开机启动" VerticalAlignment="Center" />
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">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
@ -134,77 +137,78 @@
CheckedBackground="{DynamicResource Primary}"
CheckedBorderBrush="{DynamicResource Primary}" Background="Transparent" BoxWidth="35"
BoxHeight="18" ToggleSize="14" ToggleShadowColor="{x:Null}"
ToggleBrush="{DynamicResource PrimaryDark}" Content="开机启动"
ToggleBrush="{DynamicResource PrimaryDark}" Content="{ll:Str 开机启动}"
CheckedToggleBrush="{DynamicResource DARKPrimaryText}"
ToolTip="该游戏随着开机启动该程序&#13;如需卸载游戏,请关闭该选项" Checked="StartUpBox_Checked"
ToolTip="{ll:Str '该游戏随着开机启动该程序\&#13;如需卸载游戏\&#13;请关闭该选项'}" Checked="StartUpBox_Checked"
Unchecked="StartUpBox_Checked" />
<pu:Switch x:Name="StartUpSteamBox" BorderBrush="{DynamicResource PrimaryDark}"
CheckedBackground="{DynamicResource Primary}"
IsEnabled="{Binding ElementName=StartUpBox,Path=IsChecked}"
CheckedBorderBrush="{DynamicResource Primary}" Background="Transparent" BoxWidth="35"
BoxHeight="18" ToggleSize="14" ToggleShadowColor="{x:Null}"
ToggleBrush="{DynamicResource PrimaryDark}" Content="从Steam启动"
CheckedToggleBrush="{DynamicResource DARKPrimaryText}" ToolTip="从Steam启动该游戏, 统计时长不能停"
Grid.Column="1" Checked="StartUpSteamBox_Checked" Unchecked="StartUpSteamBox_Checked" />
ToggleBrush="{DynamicResource PrimaryDark}" Content="{ll:Str 从Steam启动}"
CheckedToggleBrush="{DynamicResource DARKPrimaryText}"
ToolTip="{ll:Str '从Steam启动该游戏, 统计时长不能停'}" Grid.Column="1"
Checked="StartUpSteamBox_Checked" Unchecked="StartUpSteamBox_Checked" />
</Grid>
<TextBlock Grid.Row="8" Text="宠物动画" VerticalAlignment="Center" />
<TextBlock x:Name="PetIntor" Grid.Row="9" Text="动画描述动画描述动画描述动画描述动画描述" VerticalAlignment="Center"
Grid.Column="2" TextWrapping="WrapWithOverflow" FontSize="14" />
<ComboBox x:Name="PetBox" Grid.Row="8" Grid.Column="2" ToolTip="加载的宠物动画,重启后生效"
<TextBlock Grid.Row="8" Text="{ll:Str 宠物动画}" VerticalAlignment="Center" />
<TextBlock x:Name="PetIntor" Grid.Row="9" 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 '加载的宠物动画,重启后生效'}"
Style="{DynamicResource StandardComboBoxStyle}" Margin="0,3,0,2"
SelectionChanged="PetBox_SelectionChanged" FontSize="16" />
<Button x:Name="ButtonRestartGraph" Content="重启软件以应用更改" Visibility="Collapsed"
<Button x:Name="ButtonRestartGraph" Content="{ll:Str 重启软件以应用更改}" Visibility="Collapsed"
VerticalAlignment="Bottom" Background="{DynamicResource DARKPrimary}"
Foreground="{DynamicResource DARKPrimaryText}" Click="ButtonRestart_Click"
Grid.ColumnSpan="3" Grid.Row="10" />
</Grid>
</TabItem>
<TabItem Header="系统" BorderBrush="{DynamicResource PrimaryDarker}">
<TabItem Header="{ll:Str 系统}" BorderBrush="{DynamicResource PrimaryDarker}">
<ScrollViewer>
<StackPanel>
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Background="{x:Null}"
TextWrapping="Wrap">
<Run FontWeight="Bold" FontSize="18">自动保存频率</Run><LineBreak />
<Run>在指定时间后自动保存游戏数据</Run>
<Run FontWeight="Bold" FontSize="18" Text="{ll:Str 自动保存频率}" /><LineBreak />
<Run Text="{ll:Str 在指定时间后自动保存游戏数据}" />
</TextBlock>
<ComboBox x:Name="CBAutoSave" SelectedIndex="3" VerticalAlignment="Top" Margin="10,5,0,0"
HorizontalAlignment="Left" Style="{DynamicResource StandardComboBoxStyle}" Width="200"
SelectionChanged="CBAutoSave_SelectionChanged" FontSize="16">
<ComboBoxItem>
<ComboBoxItem Content="{ll:Str 关闭自动保存}">
<ComboBoxItem.Tag>
<system:Int32>-1</system:Int32>
</ComboBoxItem.Tag> 关闭自动保存
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem>
<ComboBoxItem Content="{ll:Str 每5分钟一次}">
<ComboBoxItem.Tag>
<system:Int32>5</system:Int32>
</ComboBoxItem.Tag> 每5分钟一次
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem>
<ComboBoxItem Content="{ll:Str 每10分钟一次}">
<ComboBoxItem.Tag>
<system:Int32>10</system:Int32>
</ComboBoxItem.Tag> 每10分钟一次
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem>
<ComboBoxItem Content="{ll:Str 每20分钟一次}">
<ComboBoxItem.Tag>
<system:Int32>20</system:Int32>
</ComboBoxItem.Tag> 每20分钟一次
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem>
<ComboBoxItem Content="{ll:Str 每半小时一次}">
<ComboBoxItem.Tag>
<system:Int32>30</system:Int32>
</ComboBoxItem.Tag> 每半小时一次
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem>
<ComboBoxItem Content="{ll:Str 每小时一次}">
<ComboBoxItem.Tag>
<system:Int32>60</system:Int32>
</ComboBoxItem.Tag> 每小时一次
</ComboBoxItem.Tag>
</ComboBoxItem>
</ComboBox>
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Background="{x:Null}"
TextWrapping="Wrap" Margin="0,6,0,0">
<Run FontWeight="Bold" FontSize="18">从备份中还原</Run><LineBreak />
<Run>虚拟桌宠模拟器在每次保存的时候都会备份上次储存的存档, 当原始存档丢失,受损或误操作时, 就可以还原他们</Run>
<Run FontWeight="Bold" FontSize="18" Text="{ll:Str 从备份中还原}" /><LineBreak />
<Run Text="{ll:Str '虚拟桌宠模拟器在每次保存的时候都会备份上次储存的存档, 当原始存档丢失,受损或误操作时, 就可以还原他们'}" />
</TextBlock>
<Grid Margin="0,5,0,0">
<Grid.RowDefinitions>
@ -217,22 +221,22 @@
<ColumnDefinition Width="3*" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Text="备份数量" VerticalAlignment="Center" />
<TextBlock Grid.Row="0" Text="{ll:Str 备份数量}" VerticalAlignment="Center" />
<pu:NumberInput x:Name="numBackupSaveMaxNum" Grid.Column="2" Minimum="1" Value="20"
Margin="0,1,0,1" CornerRadius="4" BorderBrush="{DynamicResource PrimaryDarker}"
BorderThickness="1.5" ValueChanged="numBackupSaveMaxNum_ValueChanged" />
<TextBlock Grid.Row="1" Text="加载存档" VerticalAlignment="Center" />
<Button x:Name="BtnSaveReload" pu:ButtonHelper.CornerRadius="4" Content="加载" Grid.Column="3"
Background="{DynamicResource SecondaryLight}" Padding="1" Margin="5" Grid.Row="1"
ToolTip="加载上次保存的存档" Click="BtnSaveReload_Click" />
<TextBlock Grid.Row="1" Text="{ll:Str 加载存档}" VerticalAlignment="Center" />
<Button x:Name="BtnSaveReload" pu:ButtonHelper.CornerRadius="4" Content="{ll:Str 加载}"
Grid.Column="3" Background="{DynamicResource SecondaryLight}" Padding="1" Margin="5"
Grid.Row="1" ToolTip="{ll:Str 加载上次保存的存档}" Click="BtnSaveReload_Click" />
<ComboBox x:Name="CBSaveReLoad" SelectedIndex="3"
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">操作设置</Run><LineBreak />
<Run>游戏操作相关设置</Run>
<Run FontWeight="Bold" FontSize="18" Text="{ll:Str 操作设置}" /><LineBreak />
<Run Text="{ll:Str 游戏操作相关设置}" />
</TextBlock>
<Grid>
<Grid.ColumnDefinitions>
@ -244,13 +248,13 @@
<RowDefinition Height="35" />
<RowDefinition Height="35" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="长按间隔" VerticalAlignment="Center" />
<TextBlock Grid.Row="1" Text="桌宠名字" VerticalAlignment="Center" />
<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="数据计算和互动计算时间间隔,间隔越短需要互动的频率可能会增加.&#13;间隔越大越不容易打扰到当前工作">
ToolTip="{ll:Str '数据计算和互动计算时间间隔,间隔越短需要互动的频率可能会增加\&#13;间隔越大越不容易打扰到当前工作'}">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
@ -260,15 +264,16 @@
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="{Binding ElementName=PressLengthSlider,Path=Value,StringFormat={}{0:f2} 秒}"
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">聊天设置</Run><LineBreak />
<Run>使用ChatGPT进行聊天等相关设置</Run>
<Run FontWeight="Bold" FontSize="18" Text="{ll:Str 聊天设置}" /><LineBreak />
<Run Text="{ll:Str 使用ChatGPT进行聊天等相关设置}" />
</TextBlock>
<Grid>
<Grid.ColumnDefinitions>
@ -280,33 +285,34 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="35" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="使用模式" VerticalAlignment="Center" />
<TextBlock Grid.Row="1" Text="相关功能" VerticalAlignment="Center" />
<TextBlock Grid.Row="0" Text="{ll:Str 使用模式}" VerticalAlignment="Center" />
<TextBlock Grid.Row="1" Text="{ll:Str 相关功能}" VerticalAlignment="Center" />
<Grid Grid.Column="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<RadioButton x:Name="RBCGPTUseAPI" Style="{DynamicResource StandardRadioButtonStyle}"
Content="使用从ChatGPT&#13;申请的的API" ToolTip="需要去OpenAI官网申请" GroupName="cgpttype"
Grid.Column="1" Checked="CGPType_Checked" />
Content="{ll:Str '使用从ChatGPT\&#13;申请的的API'}" ToolTip="{ll:Str 需要去OpenAI官网申请}"
GroupName="cgpttype" Grid.Column="1" Checked="CGPType_Checked" />
<RadioButton x:Name="RBCGPTUseLB" Style="{DynamicResource StandardRadioButtonStyle}"
Content="使用桌宠开发者&#13;提供的免费API" ToolTip="需遵循相关协议法律法规并有聊天字数限制"
GroupName="cgpttype" IsChecked="True" Checked="CGPType_Checked" />
Content="{ll:Str '使用桌宠开发者\&#13;提供的免费API'}"
ToolTip="{ll:Str 需遵循相关协议法律法规并有聊天字数限制}" GroupName="cgpttype" IsChecked="True"
Checked="CGPType_Checked" />
</Grid>
<Button x:Name="BtnCGPTReSet" pu:ButtonHelper.CornerRadius="4" Content="初始化桌宠聊天程序"
<Button x:Name="BtnCGPTReSet" pu:ButtonHelper.CornerRadius="4" Content="{ll:Str 初始化桌宠聊天程序}"
Margin="4" Grid.Column="2" Background="{DynamicResource SecondaryLight}" Padding="1"
Grid.Row="1" Click="ChatGPT_Reset_Click" />
</Grid>
</StackPanel>
</ScrollViewer>
</TabItem>
<TabItem Header="互动" BorderBrush="{DynamicResource PrimaryDarker}">
<TabItem Header="{ll:Str 互动}" BorderBrush="{DynamicResource PrimaryDarker}">
<StackPanel>
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Background="{x:Null}"
TextWrapping="Wrap">
<Run FontWeight="Bold" FontSize="18">互动设置</Run><LineBreak />
<Run>游戏互动相关设置</Run>
<Run FontWeight="Bold" FontSize="18" Text="{ll:Str 互动设置}" /><LineBreak />
<Run Text="{ll:Str 游戏互动相关设置}" />
</TextBlock>
<Grid>
<Grid.ColumnDefinitions>
@ -328,18 +334,21 @@
CheckedBackground="{DynamicResource Primary}"
CheckedBorderBrush="{DynamicResource Primary}" Background="Transparent" BoxWidth="35"
BoxHeight="18" ToggleSize="14" ToggleShadowColor="{x:Null}"
ToggleBrush="{DynamicResource PrimaryDark}" Content="启用后桌宠会有状态变化,需要按时投喂等"
ToggleBrush="{DynamicResource PrimaryDark}" Content="{ll:Str '启用后桌宠会有状态变化,需要按时投喂等'}"
CheckedToggleBrush="{DynamicResource DARKPrimaryText}"
ToolTip="启用数据计算,桌宠会有状态变化,需要按时投喂等.&#13;如果嫌麻烦可以关掉" Checked="CalFunctionBox_Checked"
Unchecked="CalFunctionBox_Checked" />
<Grid Grid.Row="1" Grid.Column="2" ToolTip="当玩家在指定时间未对桌宠进行交互的时候,智能禁用移动功能&#13;将在下次交互时解除">
ToolTip="{ll:Str '启用数据计算,桌宠会有状态变化,需要按时投喂等.\&#13;如果嫌麻烦可以关掉'}"
Checked="CalFunctionBox_Checked" Unchecked="CalFunctionBox_Checked" />
<Grid Grid.Row="1" Grid.Column="2"
ToolTip="{ll:Str '当玩家在指定时间未对桌宠进行交互的时候,智能禁用移动功能\&#13;将在下次交互时解除'}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Text="当关闭数据计算时&#13;桌宠显示的状态" FontSize="14" />
<ComboBox x:Name="combCalFunState" Style="{DynamicResource StandardComboBoxStyle}" ToolTip="当关闭数据计算时&#13;桌宠显示的状态"
SelectionChanged="combCalFunState_SelectionChanged" SelectedIndex="5" Grid.Column="1">
<TextBlock Text="{ll:Str '当关闭数据计算时\&#13;桌宠显示的状态'}" FontSize="14" />
<ComboBox x:Name="combCalFunState" Style="{DynamicResource StandardComboBoxStyle}"
ToolTip="{ll:Str '当关闭数据计算时\&#13;桌宠显示的状态'}"
SelectionChanged="combCalFunState_SelectionChanged" SelectedIndex="5"
Grid.Column="1">
<ComboBoxItem Content="Happy" />
<ComboBoxItem Content="Nomal" />
<ComboBoxItem Content="PoorCondition" />
@ -356,86 +365,87 @@
<RowDefinition Height="35" />
</Grid.RowDefinitions>
<pu:Switch x:Name="MoveEventBox" BorderBrush="{DynamicResource PrimaryDark}"
CheckedBackground="{DynamicResource Primary}" Content="启用桌宠移动"
CheckedBackground="{DynamicResource Primary}" Content="{ll:Str 启用桌宠移动}"
CheckedBorderBrush="{DynamicResource Primary}" Background="Transparent"
BoxWidth="35" BoxHeight="18" ToggleSize="14" ToggleShadowColor="{x:Null}"
ToggleBrush="{DynamicResource PrimaryDark}" IsChecked="True"
CheckedToggleBrush="{DynamicResource DARKPrimaryText}" Margin="10,0,0,0"
ToolTip="启用移动互动,桌宠会在屏幕上乱动,移动互动概率为普通互动的一半.&#13;如果嫌麻烦可以关掉"
ToolTip="{ll:Str '启用移动互动,桌宠会在屏幕上乱动,移动互动概率为普通互动的一半.\&#13;如果嫌麻烦可以关掉'}"
Checked="MoveEventBox_Checked" Unchecked="MoveEventBox_Checked" />
<pu:Switch x:Name="SmartMoveEventBox" BorderBrush="{DynamicResource PrimaryDark}"
IsEnabled="{Binding ElementName=MoveEventBox,Path=IsChecked}"
CheckedBackground="{DynamicResource Primary}" Content="智能移动"
CheckedBackground="{DynamicResource Primary}" Content="{ll:Str '智能移动'}"
CheckedBorderBrush="{DynamicResource Primary}" Background="Transparent"
BoxWidth="35" BoxHeight="18" ToggleSize="14" ToggleShadowColor="{x:Null}"
ToggleBrush="{DynamicResource PrimaryDark}" Grid.Column="1"
CheckedToggleBrush="{DynamicResource DARKPrimaryText}" Margin="10,0,0,0"
ToolTip="当玩家在指定时间未对桌宠进行交互的时候,智能禁用移动功能&#13;将在下次交互时解除"
ToolTip="{ll:Str '当玩家在指定时间未对桌宠进行交互的时候,智能禁用移动功能\&#13;将在下次交互时解除'}"
Checked="SmartMoveEventBox_Checked" Unchecked="SmartMoveEventBox_Checked" />
<TextBlock Text="智能移动判断时间间隔" Grid.Row="1"
ToolTip="当玩家在指定时间未对桌宠进行交互的时候,智能禁用移动功能&#13;将在下次交互时解除"/>
<TextBlock Text="{ll:Str '智能移动判断时间间隔'}" Grid.Row="1"
ToolTip="{ll:Str '当玩家在指定时间未对桌宠进行交互的时候,智能禁用移动功能\&#13;将在下次交互时解除'}" />
<ComboBox x:Name="CBSmartMove" Style="{DynamicResource StandardComboBoxStyle}"
IsEnabled="{Binding ElementName=SmartMoveEventBox,Path=IsChecked}"
SelectionChanged="CBSmartMove_SelectionChanged" SelectedIndex="5" Grid.Column="1"
Grid.Row="1" ToolTip="当玩家在指定时间未对桌宠进行交互的时候,智能禁用移动功能&#13;将在下次交互时解除">
<ComboBoxItem>
Grid.Row="1" ToolTip="{ll:Str '当玩家在指定时间未对桌宠进行交互的时候,智能禁用移动功能\&#13;将在下次交互时解除'}">
<ComboBoxItem Content="{ll:Str '30 秒'}">
<ComboBoxItem.Tag>
<system:Int32>30</system:Int32>
</ComboBoxItem.Tag> 30 秒
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem>
<ComboBoxItem Content="{ll:Str '1 分钟'}">
<ComboBoxItem.Tag>
<system:Int32>60</system:Int32>
</ComboBoxItem.Tag> 1 分钟
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem>
<ComboBoxItem Content="{ll:Str '2 分钟'}">
<ComboBoxItem.Tag>
<system:Int32>120</system:Int32>
</ComboBoxItem.Tag> 2 分钟
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem>
<ComboBoxItem Content="{ll:Str '5 分钟'}">
<ComboBoxItem.Tag>
<system:Int32>300</system:Int32>
</ComboBoxItem.Tag> 5 分钟
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem>
<ComboBoxItem Content="{ll:Str '10 分钟'}">
<ComboBoxItem.Tag>
<system:Int32>600</system:Int32>
</ComboBoxItem.Tag> 10 分钟
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem>
<ComboBoxItem Content="{ll:Str '20 分钟'}">
<ComboBoxItem.Tag>
<system:Int32>1200</system:Int32>
</ComboBoxItem.Tag> 20 分钟
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem>
<ComboBoxItem Content="{ll:Str '30 分钟'}">
<ComboBoxItem.Tag>
<system:Int32>1800</system:Int32>
</ComboBoxItem.Tag> 30 分钟
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem>
<ComboBoxItem Content="{ll:Str '40 分钟'}">
<ComboBoxItem.Tag>
<system:Int32>2400</system:Int32>
</ComboBoxItem.Tag> 40 分钟
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem>
<ComboBoxItem Content="{ll:Str '50 分钟'}">
<ComboBoxItem.Tag>
<system:Int32>3000</system:Int32>
</ComboBoxItem.Tag> 50 分钟
</ComboBoxItem.Tag>
</ComboBoxItem>
<ComboBoxItem>
<ComboBoxItem Content="{ll:Str '60 分钟'}">
<ComboBoxItem.Tag>
<system:Int32>3600</system:Int32>
</ComboBoxItem.Tag> 60 分钟
</ComboBoxItem.Tag>
</ComboBoxItem>
</ComboBox>
</Grid>
<TextBlock Grid.Row="0" Text="数据计算" VerticalAlignment="Center" />
<TextBlock Grid.Row="1" Text="显示状态" VerticalAlignment="Center" />
<TextBlock Grid.Row="5" Text="桌宠移动" VerticalAlignment="Center" />
<TextBlock Grid.Row="2" Text="计算间隔" VerticalAlignment="Center" />
<Grid Grid.Column="2" Grid.Row="2" ToolTip="数据计算和互动计算时间间隔,间隔越短需要互动的频率可能会增加.&#13;间隔越大越不容易打扰到当前工作">
<TextBlock Grid.Row="0" Text="{ll:Str 数据计算}" VerticalAlignment="Center" />
<TextBlock Grid.Row="1" Text="{ll:Str 显示状态}" VerticalAlignment="Center" />
<TextBlock Grid.Row="5" Text="{ll:Str 桌宠移动}" VerticalAlignment="Center" />
<TextBlock Grid.Row="2" Text="{ll:Str 计算间隔}" VerticalAlignment="Center" />
<Grid Grid.Column="2" Grid.Row="2"
ToolTip="{ll:Str '数据计算和互动计算时间间隔,间隔越短需要互动的频率可能会增加.\&#13;间隔越大越不容易打扰到当前工作'}">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
@ -449,12 +459,13 @@
Foreground="{DynamicResource DARKPrimaryDarker}" FontWeight="Bold"
Background="{x:Null}" Width="60" />
</Grid>
<TextBlock Grid.Row="3" Text="互动周期" VerticalAlignment="Center" />
<TextBlock Grid.Row="3" Text="{ll:Str '互动周期'}" VerticalAlignment="Center" />
<TextBlock Grid.Row="4" VerticalAlignment="Top" Grid.Column="2" FontSize="14">
<Run>每分钟计算</Run> <Run x:Name="rTimeMinute">4</Run> <Run>次数值变化</Run><LineBreak />
<Run>大约</Run> <Run x:Name="RInter">4</Run> <Run>分钟左右主动进行一次互动(走路发呆爬墙等)</Run>
<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.Column="2" Grid.Row="3" ToolTip="互动周期决定在交互结束后大约经历多少计算间隔后再次进行自主行动">
<Grid Grid.Column="2" Grid.Row="3" ToolTip="{ll:Str 互动周期决定在交互结束后大约经历多少计算间隔后再次进行自主行动}">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
@ -473,63 +484,65 @@
</Grid>
</StackPanel>
</TabItem>
<TabItem Header="自定" BorderBrush="{DynamicResource PrimaryDarker}">
<TabItem Header="{ll:Str 自定}" BorderBrush="{DynamicResource PrimaryDarker}">
<StackPanel>
<TextBlock Background="{x:Null}" TextWrapping="Wrap">
<Run FontWeight="Bold" FontSize="18">自定义链接</Run><LineBreak />
<Run>在自定栏添加快捷方式/网页/快捷键, 可以便携启动想要的功能</Run><LineBreak />
<Run>键盘快捷键编写方法请参考</Run> <Hyperlink Click="sendkey_click">键盘快捷键 通用注解</Hyperlink><LineBreak />
<Run>右键进行排序/删除等操作</Run>
<Run FontWeight="Bold" FontSize="18" Text="{ll:Str 自定义链接}" /><LineBreak />
<Run Text="{ll:Str '在自定栏添加快捷方式/网页/快捷键, 可以便携启动想要的功能'}" /><LineBreak />
<Run Text="{ll:Str '键盘快捷键编写方法请参考'}" /> <Hyperlink Click="sendkey_click"><Run
Text="{ll:Str '键盘快捷键 通用注解'}" /></Hyperlink><LineBreak />
<Run Text="{ll:Str '右键进行排序/删除等操作'}" />
</TextBlock>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button pu:ButtonHelper.CornerRadius="4" Content="添加新链接" Margin="4"
<Button pu:ButtonHelper.CornerRadius="4" Content="{ll:Str 添加新链接}" Margin="4"
Background="{DynamicResource SecondaryLight}" Padding="1" Click="DIY_ADD_Click" />
<Button pu:ButtonHelper.CornerRadius="4" Content="保存设置" Margin="4" Grid.Column="1"
<Button pu:ButtonHelper.CornerRadius="4" Content="{ll:Str 保存设置}" Margin="4" Grid.Column="1"
Background="{DynamicResource SecondaryLight}" Padding="1" Click="DIY_Save_Click" />
</Grid>
<StackPanel x:Name="StackDIY" />
</StackPanel>
</TabItem>
<TabItem Header="诊断" BorderBrush="{DynamicResource PrimaryDarker}">
<TabItem Header="{ll:Str 诊断}" BorderBrush="{DynamicResource PrimaryDarker}">
<StackPanel>
<TextBlock HorizontalAlignment="Left" FontSize="11" VerticalAlignment="Top" Background="{x:Null}"
TextWrapping="Wrap">
<Run FontWeight="Bold" FontSize="18">诊断与反馈</Run><LineBreak />
<Run>选择要发送给 LBGame 的诊断数据,诊断数据用于保护和及时更新 虚拟桌宠模拟器, 解决问题并改进产品.</Run><LineBreak />
<Run>无论选择哪个选项,游戏都可以安全正常地运行.</Run> <Hyperlink Click="hyper_moreInfo">获取有关这些设置的更多信息</Hyperlink>
<Run FontWeight="Bold" FontSize="18" Text="{ll:Str 诊断与反馈}" /> <LineBreak />
<Run Text="{ll:Str '选择要发送给 LBGame 的诊断数据,诊断数据用于保护和及时更新 虚拟桌宠模拟器, 解决问题并改进产品.'}" /><LineBreak />
<Run Text="{ll:Str '无论选择哪个选项,游戏都可以安全正常地运行.'}" /> <Hyperlink Click="hyper_moreInfo"><Run
Text="{ll:Str 获取有关这些设置的更多信息}" /></Hyperlink>
</TextBlock>
<RadioButton x:Name="RBDiagnosisYES" Style="{DynamicResource StandardRadioButtonStyle}"
Content="发送诊断数据: 发送游戏存档, 包括饱腹,状态等各种游戏内&#13;数据. 可能会包括该游戏内存和CPU使用情况"
Content="{ll:Str '发送诊断数据: 发送游戏存档, 包括饱腹,状态等各种游戏内\&#13;数据. 可能会包括该游戏内存和CPU使用情况'}"
HorizontalAlignment="Left" Margin="10,10,10,0" VerticalAlignment="Top" GroupName="diagnosis"
Checked="RBDiagnosisYES_Checked" IsEnabled="False" />
<RadioButton x:Name="RBDiagnosisNO" Style="{DynamicResource StandardRadioButtonStyle}"
Content="不发送诊断数据: 适用于启用修改器,修改过游戏数据等不&#13;符合分析数据条件. 或不希望提供游戏数据的玩家" HorizontalAlignment="Left"
Margin="10,10,10,0" VerticalAlignment="Top" GroupName="diagnosis"
Content="{ll:Str '不发送诊断数据: 适用于启用修改器,修改过游戏数据等不\&#13;符合分析数据条件. 或不希望提供游戏数据的玩家'}"
HorizontalAlignment="Left" Margin="10,10,10,0" VerticalAlignment="Top" GroupName="diagnosis"
Checked="RBDiagnosisNO_Checked" IsChecked="True" />
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,15,0,0"
Background="{x:Null}" TextWrapping="Wrap">
<Run FontWeight="Bold">反馈频率</Run><LineBreak />
<Run>VOS 应寻求我反馈按以下频率</Run>
<Run FontWeight="Bold" Text="{ll:Str 反馈频率}" /><LineBreak />
<Run Text="{ll:Str 'VOS 应寻求我反馈按以下频率'}" />
</TextBlock>
<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>每 两百 周期一次</ComboBoxItem>
<ComboBoxItem>每 五百 周期一次</ComboBoxItem>
<ComboBoxItem>每 一千 周期一次</ComboBoxItem>
<ComboBoxItem>每 两千 周期一次</ComboBoxItem>
<ComboBoxItem>每 五千 周期一次</ComboBoxItem>
<ComboBoxItem>每 一万 周期一次</ComboBoxItem>
<ComboBoxItem>每 两万 周期一次</ComboBoxItem>
<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>
<TabItem Header="MOD管理" BorderBrush="{DynamicResource PrimaryDarker}">
<TabItem Header="{ll:Str MOD管理}" BorderBrush="{DynamicResource PrimaryDarker}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120" />
@ -553,10 +566,10 @@
VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Background="{x:Null}"
Foreground="{DynamicResource PrimaryText}" />
<TextBlock Margin="0,0,0,0" TextWrapping="Wrap">
<Run Text="模组作者: " /><LineBreak />
<Run Text="{ll:Str '模组作者: '}" /><LineBreak />
<Run x:Name="runMODAuthor" Text="LorisYounger" />
<LineBreak /><Run Text="模组版本: " /><Run x:Name="runMODVer" Text="1.0" />
<LineBreak /><Run Text="游戏版本: " /><Run x:Name="runMODGameVer" Text="1.0" />
<LineBreak /><Run Text="{ll:Str '模组版本: '}" /><Run x:Name="runMODVer" Text="1.0" />
<LineBreak /><Run Text="{ll:Str '游戏版本: '}" /><Run x:Name="runMODGameVer" Text="1.0" />
</TextBlock>
</StackPanel>
</Grid>
@ -572,7 +585,7 @@
<ColumnDefinition />
</Grid.ColumnDefinitions>
<StackPanel>
<Label Content="MOD介绍" HorizontalAlignment="Left" Margin="-5,0,0,0"
<Label Content="{ll:Str MOD介绍}" HorizontalAlignment="Left" Margin="-5,0,0,0"
VerticalAlignment="Center" FontSize="18" FontWeight="Bold" Background="{x:Null}" />
<ScrollViewer VerticalScrollBarVisibility="Auto" Height="140" Margin="0,0,0,0"
pu:ScrollViewerHelper.ScrollBarThickness="10" HorizontalAlignment="Left"
@ -583,26 +596,26 @@
</ScrollViewer>
</StackPanel>
<StackPanel Grid.Column="1">
<Label Content="内容" HorizontalAlignment="Left" Margin="-5,0,0,0" VerticalAlignment="Top"
<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="所在文件夹" VerticalAlignment="Top"
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="启用该模组" VerticalAlignment="Top" FontSize="14"
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="停用该模组" VerticalAlignment="Top" FontSize="14"
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="更新至Steam" VerticalAlignment="Top" FontSize="14"
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="创意工坊页面" VerticalAlignment="Top" FontSize="14"
TextWrapping="Wrap" Text="{ll:Str 创意工坊页面}" VerticalAlignment="Top" FontSize="14"
Foreground="DimGray" TextDecorations="Underline" Cursor="Hand"
MouseDown="ButtonSteam_MouseDown" />
<ProgressBar x:Name="ProgressBarUpload" Margin="0,2,0,0" Visibility="Collapsed"
@ -612,14 +625,14 @@
pu:ProgressBarHelper.IsPercentVisible="True"
Foreground="{DynamicResource DARKPrimary}" BorderThickness="2" />
<TextBlock x:Name="ButtonSetting" HorizontalAlignment="Left" Margin="0,2,0,0"
TextWrapping="Wrap" Text="MOD设置" VerticalAlignment="Top" FontSize="14"
TextWrapping="Wrap" Text="{ll:Str MOD设置}" VerticalAlignment="Top" FontSize="14"
Foreground="{DynamicResource DARKPrimaryDarker}" TextDecorations="Underline"
Cursor="Hand" MouseDown="ButtonSetting_MouseDown" />
<Button x:Name="ButtonAllow" Content="启用代码插件" HorizontalAlignment="Left"
<Button x:Name="ButtonAllow" Content="{ll:Str 启用代码插件}" HorizontalAlignment="Left"
VerticalAlignment="Top" Background="#FFFF2C2C" Foreground="White" FontSize="12"
ToolTip="启用该模组的代码内容,不能保证系统安全性" Click="ButtonAllow_Click" />
ToolTip="{ll:Str '启用该模组的代码内容,不能保证系统安全性'}" Click="ButtonAllow_Click" />
</StackPanel>
<Button x:Name="ButtonRestart" Content="重启软件以应用更改" Margin="0,2,0,0"
<Button x:Name="ButtonRestart" Content="{ll:Str 重启软件以应用更改}" Margin="0,2,0,0"
VerticalAlignment="Bottom" Background="{DynamicResource DARKPrimary}"
Visibility="Collapsed" Foreground="{DynamicResource DARKPrimaryText}"
Click="ButtonRestart_Click" Grid.ColumnSpan="2" />
@ -627,57 +640,60 @@
</StackPanel>
</Grid>
</TabItem>
<TabItem Header="关于" BorderBrush="{DynamicResource PrimaryDarker}"
<TabItem Header="{ll:Str '关于'}" BorderBrush="{DynamicResource PrimaryDarker}"
Foreground="{DynamicResource PrimaryText}">
<Grid>
<Image x:Name="ImageWHY" Width="64" HorizontalAlignment="Right" VerticalAlignment="Top" Height="64"
Source="/Res/TopLogo2019.PNG" Margin="0,325,55,0" />
<TextBlock Margin="0,0,0,0" Text="虚拟主播模拟器 规格" FontSize="20" FontWeight="Bold"
<TextBlock Margin="0,0,0,0" Text="{ll:Str '虚拟主播模拟器 规格'}" FontSize="20" FontWeight="Bold"
VerticalAlignment="Top" />
<TextBlock Margin="0,130,0,0" FontWeight="Bold" VerticalAlignment="Top">
<Run>游戏策划</Run><LineBreak />
<Run>UI&amp;程序</Run><LineBreak />
<Run>动画绘制</Run><LineBreak />
<Run>开源项目</Run><LineBreak /><LineBreak /><LineBreak />
<Run>项目页面</Run><LineBreak />
<Run Text="{ll:Str 游戏策划}" /><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 />
<LineBreak /><LineBreak />
<LineBreak /><Run xml:space="preserve">Power By </Run>
<Hyperlink TextDecorations="Underline" Foreground="Black" Click="VPET_Click">exLB.net</Hyperlink>
<Run> </Run>
<Hyperlink TextDecorations="Underline" Foreground="Black" Click="LB_Click">LBGame</Hyperlink>
<LineBreak /><LineBreak />
<Run xml:space="preserve">相关链接 </Run>
<LineBreak /><LineBreak /> <Run Text="{ll:Str '相关链接'}" />
<Run xml:space="preserve"> </Run>
<Hyperlink TextDecorations="Underline" Foreground="{DynamicResource DARKPrimaryDarker}"
Click="VUP_Click" FontWeight="Normal">虚拟主播模拟器</Hyperlink>
Click="VUP_Click" FontWeight="Normal"><Run Text="{ll:Str 虚拟主播模拟器}" /></Hyperlink>
<Hyperlink TextDecorations="Underline" Foreground="{DynamicResource DARKPrimaryDarker}"
Click="Group_Click" FontWeight="Normal">相关群</Hyperlink>
Click="Group_Click" FontWeight="Normal"><Run Text="{ll:Str 相关群}" /></Hyperlink>
</TextBlock>
<TextBlock Margin="0,30,0,0" FontWeight="Bold" VerticalAlignment="Top">
<Run>用户名</Run><LineBreak />
<Run>版本</Run><LineBreak />
<Run>激活</Run><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 />
<Run x:Name="runabVer">v1.0 (100)</Run><LineBreak />
<Run x:Name="runActivate">已通过Steam[uid]激活服务注册</Run><LineBreak />
</TextBlock>
<TextBlock Margin="0,100,0,0" Text="制作组名单" FontSize="20" FontWeight="Bold"
<TextBlock Margin="0,100,0,0" Text="{ll:Str 制作组名单}" FontSize="20" FontWeight="Bold"
HorizontalAlignment="Left" VerticalAlignment="Top" />
<TextBlock Margin="100,130,0,0" VerticalAlignment="Top" TextWrapping="WrapWithOverflow">
<Run>杨远洛里斯, </Run> <Hyperlink Click="Mod_Click" Foreground="{DynamicResource PrimaryText}">广大MOD作者</Hyperlink><LineBreak />
<Run>洛里斯杨远, トニーちゃん</Run> <Hyperlink Click="Git_Click">Git贡献名单</Hyperlink><LineBreak />
<Run>叶书天, </Run> <Hyperlink Click="Mod_Click" Foreground="{DynamicResource PrimaryText}">广大MOD作者</Hyperlink>
<Run Text="{ll:Str '杨远洛里斯'}" />, <Hyperlink Click="Mod_Click"
Foreground="{DynamicResource PrimaryText}"><Run Text="{ll:Str 广大MOD作者}" /></Hyperlink><LineBreak />
<Run Text="{ll:Str '洛里斯杨远'}" />, トニーちゃん <Hyperlink Click="Git_Click"><Run Text="{ll:Str Git贡献名单}" /></Hyperlink><LineBreak />
<Run Text="{ll:Str '叶书天'}" />, <Hyperlink Click="Mod_Click"
Foreground="{DynamicResource PrimaryText}"><Run Text="{ll:Str 广大MOD作者}" /></Hyperlink>
<LineBreak />
<Hyperlink Foreground="{DynamicResource PrimaryText}">Panuon.WPF.UI</Hyperlink>
<Hyperlink Foreground="{DynamicResource PrimaryText}">LinePutScript</Hyperlink><LineBreak />
<Hyperlink Foreground="{DynamicResource PrimaryText}">Facepunch.Steamworks</Hyperlink>
<Hyperlink Foreground="{DynamicResource PrimaryText}" Click="Using_Click">查看引用名单</Hyperlink><LineBreak /><LineBreak />
<Hyperlink Click="Steam_Click">访问Steam页面</Hyperlink>
<Hyperlink Click="Github_Click">访问Github页面</Hyperlink>
<Hyperlink Foreground="{DynamicResource PrimaryText}" Click="Using_Click"><Run
Text="{ll:Str 查看引用名单}" /></Hyperlink><LineBreak /><LineBreak />
<Hyperlink Click=" Steam_Click"><Run Text="{ll:Str 访问Steam页面}" /></Hyperlink>
<Hyperlink Click="Github_Click"><Run Text="{ll:Str 访问Github页面}" /></Hyperlink>
<LineBreak />
<Run FontStyle="Italic" FontSize="12">由于游戏暂未开发完毕,该名单并非完整名单.将在正式版完成前修改</Run><LineBreak />
<Run FontStyle="Italic" FontSize="12" Text="{ll:Str '由于游戏暂未开发完毕,该名单并非完整名单.将在正式版完成前修改'}" /><LineBreak />
</TextBlock>
</Grid>
</TabItem>

View File

@ -1,4 +1,5 @@
using LinePutScript;
using LinePutScript.Localization.WPF;
using Panuon.WPF.UI;
using Steamworks.Ugc;
using System;
@ -110,20 +111,20 @@ namespace VPet_Simulator.Windows
StackDIY.Children.Add(new DIYViewer(sub));
#if X64
GameVerison.Content = $"游戏版本v{mw.Verison} x64";
GameVerison.Content = "游戏版本v{0} x64".Translate(mw.Verison);
#else
GameVerison.Content = $"游戏版本v{mw.Verison} x86";
GameVerison.Content = "游戏版本v{0} x86".Translate(mw.Verison);
#endif
//关于ui
if (mw.IsSteamUser)
{
runUserName.Text = Steamworks.SteamClient.Name;
runActivate.Text = $"已通过Steam[{Steamworks.SteamClient.SteamId.Value:x}]激活服务注册";
runActivate.Text = "已通过Steam[{0}]激活服务注册".Translate(Steamworks.SteamClient.SteamId.Value.ToString("x").Substring(6));
}
else
{
runUserName.Text = Environment.UserName;
runActivate.Text = "尚未激活 您可能需要启动Steam或去Steam上免费领个";
runActivate.Text = "尚未激活 您可能需要启动Steam或去Steam上免费领个".Translate();
RBCGPTUseLB.IsEnabled = false;
if (!mw.Set["CGPT"][(gbol)"enable"])
BtnCGPTReSet.IsEnabled = false;
@ -131,10 +132,10 @@ namespace VPet_Simulator.Windows
if (mw.Set["CGPT"][(gbol)"enable"])
{
RBCGPTUseAPI.IsChecked = true;
BtnCGPTReSet.Content = "打开 ChatGPT API 设置";
BtnCGPTReSet.Content = "打开 ChatGPT API 设置".Translate();
}
else
BtnCGPTReSet.Content = "初始化桌宠聊天程序";
BtnCGPTReSet.Content = "初始化桌宠聊天程序".Translate();
runabVer.Text = $"v{mw.Verison} ({mw.verison})";
//mod列表
@ -182,11 +183,11 @@ namespace VPet_Simulator.Windows
{
if (mod.GameVer / 10 == mw.verison / 10)
{
runMODGameVer.Text += " (兼容)";
runMODGameVer.Text += " (兼容)".Translate();
}
else
{
runMODGameVer.Text += " (版本低)";
runMODGameVer.Text += " (版本低)".Translate();
runMODGameVer.Foreground = new SolidColorBrush(Color.FromRgb(190, 0, 0));
}
}
@ -194,12 +195,12 @@ namespace VPet_Simulator.Windows
{
if (mod.GameVer / 10 == mw.verison / 10)
{
runMODGameVer.Text += " (兼容)";
runMODGameVer.Text += " (兼容)".Translate();
runMODGameVer.Foreground = Function.ResourcesBrush(Function.BrushType.PrimaryText);
}
else
{
runMODGameVer.Text += " (版本高)";
runMODGameVer.Text += " (版本高)".Translate();
runMODGameVer.Foreground = new SolidColorBrush(Color.FromRgb(190, 0, 0));
}
}
@ -225,19 +226,19 @@ namespace VPet_Simulator.Windows
if (mod.ItemID == 1)
{
ButtonSteam.IsEnabled = false;
ButtonPublish.Text = "系统自带";
ButtonPublish.Text = "系统自带".Translate();
ButtonSteam.Foreground = new SolidColorBrush(Color.FromRgb(100, 100, 100));
}
else if (mod.ItemID == 0)
{
ButtonSteam.IsEnabled = false;
ButtonPublish.Text = "上传至Steam";
ButtonPublish.Text = "上传至Steam".Translate();
ButtonSteam.Foreground = new SolidColorBrush(Color.FromRgb(100, 100, 100));
}
else
{
ButtonSteam.IsEnabled = true;
ButtonPublish.Text = "更新至Steam";
ButtonPublish.Text = "更新至Steam".Translate();
ButtonSteam.Foreground = Function.ResourcesBrush(Function.BrushType.DARKPrimaryDarker);
}
if (mod.ItemID != 1 && (mod.AuthorID == Steamworks.SteamClient.SteamId.AccountId || mod.AuthorID == 0))
@ -254,15 +255,19 @@ namespace VPet_Simulator.Windows
else
{
ButtonSteam.IsEnabled = false;
ButtonPublish.Text = "未登录";
ButtonPublish.Text = "未登录".Translate();
ButtonPublish.IsEnabled = false;
ButtonPublish.Foreground = new SolidColorBrush(Color.FromRgb(100, 100, 100));
ButtonSteam.Foreground = new SolidColorBrush(Color.FromRgb(100, 100, 100));
}
runMODVer.Text = CoreMOD.INTtoVER(mod.Ver);
GameInfo.Text = mod.Intro;
GameHave.Text = mod.Content.Trim('\n');
string content = "";
foreach (string tag in mod.Tag)
{
content += tag.Translate() + "\n";
}
GameHave.Text = content;
ButtonAllow.Visibility = mod.SuccessLoad || mw.Set.IsPassMOD(mod.Name) ? Visibility.Collapsed : Visibility.Visible;
foreach (var mainplug in mw.Plugins)
@ -359,7 +364,7 @@ namespace VPet_Simulator.Windows
{
if (mod.Name.ToLower() == "core")
{
MessageBoxX.Show("模组 Core 为<虚拟桌宠模拟器>核心文件,无法停用", "停用失败");
MessageBoxX.Show("模组 Core 为<虚拟桌宠模拟器>核心文件,无法停用".Translate(), "停用失败".Translate());
return;
}
mw.Set.OnModRemove(mod.Name);
@ -383,17 +388,17 @@ namespace VPet_Simulator.Windows
{
if (!mw.IsSteamUser)
{
MessageBoxX.Show("请先登录Steam后才能上传文件", "上传MOD需要Steam登录", MessageBoxIcon.Warning);
MessageBoxX.Show("请先登录Steam后才能上传文件".Translate(), "上传MOD需要Steam登录".Translate(), MessageBoxIcon.Warning);
return;
}
if (mod.Name.ToLower() == "core")
{
MessageBoxX.Show("模组 Core 为<虚拟桌宠模拟器>核心文件,无法发布\n如需发布自定义内容,请复制并更改名称", "MOD上传失败", MessageBoxIcon.Error);
MessageBoxX.Show("模组 Core 为<虚拟桌宠模拟器>核心文件,无法发布\n如需发布自定义内容,请复制并更改名称".Translate(), "MOD上传失败".Translate(), MessageBoxIcon.Error);
return;
}
if (!File.Exists(mod.Path.FullName + @"\icon.png") || new FileInfo(mod.Path.FullName + @"\icon.png").Length > 524288)
{
MessageBoxX.Show("封面图片(icon.png)大于500kb,请修改后重试", "MOD上传失败", MessageBoxIcon.Error);
MessageBoxX.Show("封面图片(icon.png)大于500kb,请修改后重试".Translate(), "MOD上传失败".Translate(), MessageBoxIcon.Error);
return;
}
#if DEMO
@ -411,7 +416,7 @@ namespace VPet_Simulator.Windows
.WithPublicVisibility()
.WithPreviewFile(mod.Path.FullName + @"\icon.png")
.WithContent(mod.Path.FullName);
foreach (string tag in mod.Content.Trim('\n').Split('\n'))
foreach (string tag in mod.Tag)
result.WithTag(tag);
var r = await result.SubmitAsync(new ProgressClass(ProgressBarUpload));
mod.AuthorID = Steamworks.SteamClient.SteamId.AccountId;
@ -422,7 +427,7 @@ namespace VPet_Simulator.Windows
mod.WriteFile();
//ProgressBarUpload.Value = 0;
//await result.SubmitAsync(new ProgressClass(ProgressBarUpload));
if (MessageBoxX.Show($"{mod.Name} 成功上传至WorkShop服务器\n是否跳转至创意工坊页面进行编辑详细介绍和图标?", "MOD上传成功", MessageBoxButton.YesNo, MessageBoxIcon.Success) == MessageBoxResult.Yes)
if (MessageBoxX.Show("{0} 成功上传至WorkShop服务器\n是否跳转至创意工坊页面进行编辑详细介绍和图标?".Translate(mod.Name), "MOD上传成功".Translate(), MessageBoxButton.YesNo, MessageBoxIcon.Success) == MessageBoxResult.Yes)
{
System.Diagnostics.Process.Start("https://steamcommunity.com/sharedfiles/filedetails/?id=" + r.FileId);
}
@ -430,7 +435,8 @@ namespace VPet_Simulator.Windows
else
{
mod.AuthorID = 0; mod.WriteFile();
MessageBoxX.Show($"{mod.Name} 上传至WorkShop服务器失败\n请检查网络后重试\n请注意:上传和下载工坊物品可能需要良好的网络条件\n失败原因:{r.Result}", $"MOD上传失败 {r.Result}");
MessageBoxX.Show("{0} 上传至WorkShop服务器失败\n请检查网络后重试\n请注意:上传和下载工坊物品可能需要良好的网络条件\n失败原因:{1}"
.Translate(mod.Name, r.Result), "MOD上传失败 {0}".Translate(r.Result));
}
}
else if (mod.AuthorID == Steamworks.SteamClient.SteamId.AccountId)
@ -440,7 +446,7 @@ namespace VPet_Simulator.Windows
.WithDescription(mod.Intro)
.WithPreviewFile(mod.Path.FullName + @"\icon.png")
.WithContent(mod.Path);
foreach (string tag in mod.Content.Trim('\n').Split('\n'))
foreach (string tag in mod.Tag)
result.WithTag(tag);
var r = await result.SubmitAsync(new ProgressClass(ProgressBarUpload));
if (r.Success)
@ -448,14 +454,16 @@ namespace VPet_Simulator.Windows
mod.AuthorID = Steamworks.SteamClient.SteamId.AccountId;
mod.ItemID = r.FileId.Value;
mod.WriteFile();
if (MessageBoxX.Show($"{mod.Name} 成功上传至WorkShop服务器\n是否跳转至创意工坊页面进行编辑新内容?", "MOD更新成功", MessageBoxButton.YesNo, MessageBoxIcon.Success) == MessageBoxResult.Yes)
if (MessageBoxX.Show("{0} 成功上传至WorkShop服务器\n是否跳转至创意工坊页面进行编辑新内容?".Translate(mod.Name)
, "MOD更新成功".Translate(), MessageBoxButton.YesNo, MessageBoxIcon.Success) == MessageBoxResult.Yes)
System.Diagnostics.Process.Start("https://steamcommunity.com/sharedfiles/filedetails/?id=" + r.FileId);
}
else
MessageBoxX.Show($"{mod.Name} 上传至WorkShop服务器失败\n请检查网络后重试\n请注意:上传和下载工坊物品可能需要良好的网络条件\n失败原因:{r.Result}", $"MOD更新失败 {r.Result}");
MessageBoxX.Show("{0} 上传至WorkShop服务器失败\n请检查网络后重试\n请注意:上传和下载工坊物品可能需要良好的网络条件\n失败原因:{1}"
.Translate(mod.Name, r.Result), "MOD上传失败 {0}".Translate(r.Result));
}
ButtonPublish.IsEnabled = true;
ButtonPublish.Text = "任务完成";
ButtonPublish.Text = "任务完成".Translate();
ProgressBarUpload.Visibility = Visibility.Collapsed;
}
@ -470,8 +478,8 @@ namespace VPet_Simulator.Windows
private void ButtonAllow_Click(object sender, RoutedEventArgs e)
{
if (MessageBoxX.Show($"是否启用 {mod.Name} 的代码插件?\n一经启用,该插件将会允许访问该系统(包括外部系统)的所有数据\n如果您不确定,请先使用杀毒软件查杀检查",
$"启用 {mod.Name} 的代码插件?", MessageBoxButton.YesNo, MessageBoxIcon.Warning) == MessageBoxResult.Yes)
if (MessageBoxX.Show("是否启用 {0} 的代码插件?\n一经启用,该插件将会允许访问该系统(包括外部系统)的所有数据\n如果您不确定,请先使用杀毒软件查杀检查".Translate(mod.Name),
"启用 {0} 的代码插件?".Translate(mod.Name), MessageBoxButton.YesNo, MessageBoxIcon.Warning) == MessageBoxResult.Yes)
{
mw.Set.PassMod(mod.Name);
ShowMod((string)LabelModName.Content);
@ -481,7 +489,7 @@ namespace VPet_Simulator.Windows
private void ButtonRestart_Click(object sender, RoutedEventArgs e)
{
if (MessageBoxX.Show("是否退出游戏<虚拟桌宠模拟器>?\n请注意保存游戏", "重启游戏", MessageBoxButton.YesNo, MessageBoxIcon.Warning) == MessageBoxResult.Yes)
if (MessageBoxX.Show("是否退出游戏<虚拟桌宠模拟器>?\n请注意保存游戏".Translate(), "重启游戏".Translate(), MessageBoxButton.YesNo, MessageBoxIcon.Warning) == MessageBoxResult.Yes)
{
mw.Restart();
}
@ -712,11 +720,11 @@ namespace VPet_Simulator.Windows
if (responseString == "SUCCESS")
{
((TalkBox)mw.TalkBox).btn_startup.Visibility = Visibility.Visible;
MessageBoxX.Show("桌宠重置成功");
MessageBoxX.Show("桌宠重置成功".Translate());
}
else
{
MessageBoxX.Show(responseString, "桌宠重置失败");
MessageBoxX.Show(responseString, "桌宠重置失败".Translate());
}
}
}
@ -728,7 +736,7 @@ namespace VPet_Simulator.Windows
mw.Set["CGPT"].SetBool("enable", RBCGPTUseLB.IsChecked == false);
if (mw.Set["CGPT"][(gbol)"enable"])
{
BtnCGPTReSet.Content = "打开 ChatGPT API 设置";
BtnCGPTReSet.Content = "打开 ChatGPT API 设置".Translate();
BtnCGPTReSet.IsEnabled = true;
if (mw.TalkBox != null)
mw.Main.ToolBar.MainGrid.Children.Remove(mw.TalkBox);
@ -737,7 +745,7 @@ namespace VPet_Simulator.Windows
}
else
{
BtnCGPTReSet.Content = "初始化桌宠聊天程序";
BtnCGPTReSet.Content = "初始化桌宠聊天程序".Translate();
if (mw.TalkBox != null)
mw.Main.ToolBar.MainGrid.Children.Remove(mw.TalkBox);
mw.TalkBox = new TalkBox(mw);
@ -860,7 +868,8 @@ namespace VPet_Simulator.Windows
if (File.Exists(path))
{
GameSave gs = GameSave.Load(new Line(File.ReadAllText(path)));
if (MessageBoxX.Show($"存档名称:{gs.Name}\n存档等级:{gs.Level}\n存档金钱:{gs.Money}\n是否加载该备份存档? 当前游戏数据会丢失", "是否加载该备份存档? 当前游戏数据会丢失", MessageBoxButton.YesNo, MessageBoxIcon.Info) == MessageBoxResult.Yes)
if (MessageBoxX.Show("存档名称:{0}\n存档等级:{1}\n存档金钱:{2}\n是否加载该备份存档? 当前游戏数据会丢失"
.Translate(gs.Name, gs.Level, gs.Money), "是否加载该备份存档? 当前游戏数据会丢失".Translate(), MessageBoxButton.YesNo, MessageBoxIcon.Info) == MessageBoxResult.Yes)
{
mw.Core.Save = gs;
}
@ -877,12 +886,12 @@ namespace VPet_Simulator.Windows
list.Add(str.Trim());
}
list = list.Distinct().ToList();
MessageBoxX.Show(string.Join("\n", list), "感谢以下MOD开发人员");
MessageBoxX.Show(string.Join("\n", list), "感谢以下MOD开发人员".Translate());
}
private void Using_Click(object sender, RoutedEventArgs e)
{
MessageBoxX.Show(string.Join("\n", CoreMOD.LoadedDLL), "DLL引用名单");
MessageBoxX.Show(string.Join("\n", CoreMOD.LoadedDLL), "DLL引用名单".Translate());
}
private void combCalFunState_SelectionChanged(object sender, SelectionChangedEventArgs e)

View File

@ -1,46 +1,47 @@
<pu:WindowX x:Class="VPet_Simulator.Windows.winReport" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ll="clr-namespace:LinePutScript.Localization.WPF;assembly=LinePutScript.Localization.WPF"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:VPet_Simulator.Windows"
xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI"
xmlns:system="clr-namespace:System;assembly=mscorlib" mc:Ignorable="d" Title="反馈中心"
xmlns:system="clr-namespace:System;assembly=mscorlib" mc:Ignorable="d" Title="{ll:Str 反馈中心}"
Style="{DynamicResource BaseWindowXStyle}" WindowStartupLocation="CenterScreen" Width="500" MinHeight="250"
Height="Auto" ResizeMode="NoResize" WindowState="Normal"
Icon="../vpeticon.ico" SizeToContent="Height">
Height="Auto" ResizeMode="NoResize" WindowState="Normal" Icon="../vpeticon.ico" SizeToContent="Height">
<StackPanel x:Name="MainGrid" Margin="10,10,15,10" VerticalAlignment="Top">
<Label Background="{x:Null}" VerticalAlignment="Top" HorizontalAlignment="Left" Content="反馈与错误提交" FontSize="24"
Margin="10,0,0,0" />
<pu:FormGroup Header="类型:" HeaderPadding="10,0,10,0" HeaderHeight="20" Orientation="Horizontal" Margin="0,2,0,0"
Padding="1" FontSize="16" ToolTip="需要反馈的类型" HeaderWidth="Auto">
<Label Background="{x:Null}" VerticalAlignment="Top" HorizontalAlignment="Left" Content="{ll:Str 反馈与错误提交}"
FontSize="24" Margin="10,0,0,0" />
<pu:FormGroup Header="{ll:Str '类型:'}" HeaderPadding="10,0,10,0" HeaderHeight="20" Orientation="Horizontal"
Margin="0,2,0,0" Padding="1" FontSize="16" ToolTip="{ll:Str 需要反馈的类型}" HeaderWidth="Auto">
<ComboBox x:Name="tType" SelectedIndex="4">
<ComboBoxItem>游戏内报错</ComboBoxItem>
<ComboBoxItem>逻辑计算错误</ComboBoxItem>
<ComboBoxItem>数值设计不合理</ComboBoxItem>
<ComboBoxItem>玩法与功能建议</ComboBoxItem>
<ComboBoxItem>游玩心得分享</ComboBoxItem>
<ComboBoxItem Content="{ll:Str '游戏内报错'}" />
<ComboBoxItem Content="{ll:Str '逻辑计算错误'}" />
<ComboBoxItem Content="{ll:Str '数值设计不合理'}" />
<ComboBoxItem Content="{ll:Str '玩法与功能建议'}" />
<ComboBoxItem Content="{ll:Str '游玩心得分享'}" />
</ComboBox>
</pu:FormGroup>
<pu:FormGroup Header="描述:" HeaderPadding="10,0,10,0" HeaderHeight="20" Orientation="Horizontal" Margin="0,2,0,0"
Padding="1" FontSize="16" ToolTip="对于反馈的详细描述">
<TextBox x:Name="tDescription" pu:TextBoxHelper.Watermark="详细描述&#13;eg:如何触发这个报错" AcceptsReturn="True"
<pu:FormGroup Header="{ll:Str '描述:'}" HeaderPadding="10,0,10,0" HeaderHeight="20" Orientation="Horizontal"
Margin="0,2,0,0" Padding="1" FontSize="16" ToolTip="{ll:Str 对于反馈的详细描述}">
<TextBox x:Name="tDescription" pu:TextBoxHelper.Watermark="{ll:Str '详细描述\&#13;eg:如何触发这个报错'}" AcceptsReturn="True"
MaxHeight="172" />
</pu:FormGroup>
<pu:FormGroup Header="内容:" HeaderPadding="10,0,10,0" HeaderHeight="20" Orientation="Horizontal" Margin="0,2,0,0"
<pu:FormGroup Header="{ll:Str '内容:'}" HeaderPadding="10,0,10,0" HeaderHeight="20" Orientation="Horizontal" Margin="0,2,0,0"
Padding="1" FontSize="16" ToolTip="详细内容信息">
<TextBox x:Name="tContent" pu:TextBoxHelper.Watermark="详细描述&#13;eg:报错详细信息" AcceptsReturn="True"
MaxHeight="172" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>
MaxHeight="172" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" />
</pu:FormGroup>
<pu:FormGroup Header="提交:" HeaderPadding="10,0,10,0" HeaderHeight="20" Orientation="Horizontal" Margin="0,2,0,0"
<pu:FormGroup Header="{ll:Str '提交:'}" HeaderPadding="10,0,10,0" HeaderHeight="20" Orientation="Horizontal" Margin="0,2,0,0"
Padding="1" FontSize="16" ToolTip="是否上传的确游戏存档">
<CheckBox x:Name="tUpload" Content="上传游戏存档" Margin="5,0,0,0" IsChecked="True" Click="tUpload_Click" />
<CheckBox x:Name="tUpload" Content="{ll:Str '上传游戏存档'}" Margin="5,0,0,0" IsChecked="True" Click="tUpload_Click" />
</pu:FormGroup>
<pu:FormGroup Header="联系:" HeaderPadding="10,0,10,0" HeaderHeight="20" Orientation="Horizontal" Margin="0,2,0,0"
Padding="1" FontSize="16" ToolTip="提供联系方式以获得反馈,可不填">
<TextBox x:Name="tContact" pu:TextBoxHelper.Watermark="提供联系方式以获得反馈,可不填&#13;eg:QQ430081239"
<pu:FormGroup Header="{ll:Str '联系:'}" HeaderPadding="10,0,10,0" HeaderHeight="20" Orientation="Horizontal" Margin="0,2,0,0"
Padding="1" FontSize="16" ToolTip="{ll:Str '提供联系方式以获得反馈,可不填'}">
<TextBox x:Name="tContact" pu:TextBoxHelper.Watermark="{ll:Str '提供联系方式以获得反馈,可不填\&#13;eg:QQ430081239'}"
AcceptsReturn="True" MaxHeight="44" />
</pu:FormGroup>
<Button x:Name="btn_Report" Content="提交" Margin="10,10,0,10" FontSize="16" Background="{DynamicResource DARKPrimary}"
BorderThickness="1" pu:ButtonHelper.CornerRadius="5" BorderBrush="{DynamicResource DARKPrimaryDarker}"
Foreground="{DynamicResource DARKPrimaryText}" Padding="2" Click="btn_upload" />
<Button x:Name="btn_Report" Content="{ll:Str '提交'}" Margin="10,10,0,10" FontSize="16"
Background="{DynamicResource DARKPrimary}" BorderThickness="1" pu:ButtonHelper.CornerRadius="5"
BorderBrush="{DynamicResource DARKPrimaryDarker}" Foreground="{DynamicResource DARKPrimaryText}"
Padding="2" Click="btn_upload" />
</StackPanel>
</pu:WindowX>

View File

@ -5,6 +5,7 @@ using System.Net;
using System.Text;
using System.Windows;
using System.Web;
using LinePutScript.Localization.WPF;
namespace VPet_Simulator.Windows
{
@ -32,7 +33,8 @@ namespace VPet_Simulator.Windows
if (!mw.IsSteamUser)
{
MessageBoxX.Show("您不是Steam用户无法使用反馈中心\n欢迎加入虚拟主播模拟器群430081239反馈问题", "非Steam用户无法使用反馈中心", MessageBoxButton.OK, MessageBoxIcon.Info);
MessageBoxX.Show("您不是Steam用户无法使用反馈中心\n欢迎加入虚拟主播模拟器群430081239反馈问题".Translate(),
"非Steam用户无法使用反馈中心".Translate(), MessageBoxButton.OK, MessageBoxIcon.Info);
}
}
@ -41,19 +43,19 @@ namespace VPet_Simulator.Windows
if (tUpload.IsChecked == true)
save = mw.Core.Save.ToLine().ToString();
else
save = "玩家取消上传存档";
save = "玩家取消上传存档".Translate();
}
private void btn_upload(object sender, RoutedEventArgs e)
{
if (tDescription.Text == "" && tType.SelectedIndex != 0)
{
MessageBoxX.Show("请填写问题描述", "问题详细描述是反馈具体问题\n例如如何触发这个报错,游戏有什么地方不合理等");
MessageBoxX.Show("请填写问题描述".Translate(), "问题详细描述是反馈具体问题\n例如如何触发这个报错,游戏有什么地方不合理等".Translate());
return;
}
if (!mw.IsSteamUser)
{
MessageBoxX.Show("您不是Steam用户无法使用反馈中心\n欢迎加入虚拟主播模拟器群430081239反馈问题", "非Steam用户无法使用反馈中心", MessageBoxButton.OK, MessageBoxIcon.Info);
MessageBoxX.Show("您不是Steam用户无法使用反馈中心\n欢迎加入虚拟主播模拟器群430081239反馈问题".Translate(), "非Steam用户无法使用反馈中心".Translate(), MessageBoxButton.OK, MessageBoxIcon.Info);
return;//不遥测非Steam用户
}
try
@ -90,22 +92,22 @@ namespace VPet_Simulator.Windows
}
if (responseString == "Report Error Success")
{
MessageBoxX.Show("您的反馈已提交成功,感谢您的反馈与提交\nVOS将会尽快处理您的反馈并做的更好", "感谢您的反馈和提交");
MessageBoxX.Show("您的反馈已提交成功,感谢您的反馈与提交\nVOS将会尽快处理您的反馈并做的更好".Translate(), "感谢您的反馈和提交".Translate());
Close();
}
else if (responseString == "IP times Max")
{
mw.Set.DiagnosisDayEnable = false;
MessageBoxX.Show("您今天的反馈次数已达上限,请明天再来反馈.\n或欢迎加入虚拟主播模拟器群430081239反馈问题", "您今天的反馈次数已达上限", MessageBoxButton.OK, MessageBoxIcon.Error);
MessageBoxX.Show("您今天的反馈次数已达上限,请明天再来反馈.\n或欢迎加入虚拟主播模拟器群430081239反馈问题".Translate(), "您今天的反馈次数已达上限".Translate(), MessageBoxButton.OK, MessageBoxIcon.Error);
}
else
{
MessageBoxX.Show("反馈上传失败\n欢迎加入虚拟主播模拟器群430081239手动反馈问题\n服务器消息:" + responseString, "反馈提交失败,遇到错误", MessageBoxButton.OK, MessageBoxIcon.Error);
MessageBoxX.Show("反馈上传失败\n欢迎加入虚拟主播模拟器群430081239手动反馈问题\n服务器消息:".Translate() + responseString, "反馈提交失败,遇到错误".Translate(), MessageBoxButton.OK, MessageBoxIcon.Error);
}
}
catch (Exception exp)
{
MessageBoxX.Show("反馈上传失败,可能是网络或其他问题导致无法上传\n欢迎加入虚拟主播模拟器群430081239手动反馈问题\n" + exp.ToString(), "反馈提交失败,遇到错误", MessageBoxButton.OK, MessageBoxIcon.Error);
MessageBoxX.Show("反馈上传失败,可能是网络或其他问题导致无法上传\n欢迎加入虚拟主播模拟器群430081239手动反馈问题\n".Translate() + exp.ToString(), "反馈提交失败,遇到错误".Translate(), MessageBoxButton.OK, MessageBoxIcon.Error);
}
}

View File

@ -4,6 +4,7 @@
<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="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" />