支持多语言

This commit is contained in:
ZouJin 2023-08-09 00:17:05 +10:00
parent f7f0a0a5ce
commit c68cd713ea
44 changed files with 5341 additions and 4556 deletions

View File

@ -1,4 +1,7 @@
vupmod#DemoClock:|author#LorisYounger:|gamever#100:|ver#100:|
intro#给桌宠添加一个时钟显示的功能/com这算是代码嵌入类型MOD的DEMO:|
authorid#253101309:|
itemid#2980456794:|
itemid#2980456794:|
lang#en:|给桌宠添加一个时钟显示的功能,这算是代码嵌入类型MOD的DEMO#Add a clock display function to the table pet, which can be considered as a code embedding type of MOD DEMO:|DemoClock#Demo Clock:|
lang#zh-Hans:|给桌宠添加一个时钟显示的功能,这算是代码嵌入类型MOD的DEMO#给桌宠添加一个时钟显示的功能,这算是代码嵌入类型MOD的DEMO:|DemoClock#DEMO 时钟:|
lang#zh-Hant:|给桌宠添加一个时钟显示的功能,这算是代码嵌入类型MOD的DEMO#給桌寵添加一個時鐘顯示的功能,這算是程式碼嵌入類型MOD的DEMO:|DemoClock#DEMO 时钟:|

View File

@ -0,0 +1,66 @@
DM时钟#Demo Clock:|
设置#Setting:|
开始倒计时#Start Countdown:|
开始正计时#Start Timing:|
开始工作#Start working:|
开始休息#Start rest:|
计时: {0:f1} 秒#Timing: {0:f1} seconds:|
计时: {0:f1} 分钟#Timing: {0:f1} minutes:|
计时: {0:f1} 小时#Timing: {0:f1} hours:|
时间到#Time expired:|
计时结束#End of timer:|
点击此处回到时间显示#Click here to go back to the time display:|
剩余: {0:f1} 秒#Remaining: {0:f1} seconds:|
剩余: {0:f1} 分钟#Remaining: {0:f1} minutes:|
剩余: {0:f1} 小时#Remaining: {0:f1} hours:|
工作结束#End of work:|
点击此处开始休息#Click here to start break:|
工作剩{0:f1}秒#{0:f1} seconds remaining:|
工作剩{0:f1}分钟#{0:f1}minutes left to work:|
工作剩{0:f1}小时#{0:f1}hours of work left.:|
休息结束#End of break:|
点击此处开始工作#Click here to start working:|
休息剩{0:f1}秒#Break {0:f1}seconds left:|
休息剩{0:f1}分钟#Minutes left in the rest period:|
休息剩{0:f1}小时#Break left {0:f1}hours:|
长休息结束#End of rest:|
计时暂停#Timeout pause:|
番茄点数 {0} 累计点数 {1}#Tomato Points {0} Cumulative Points {1}:|
暂停倒计时#Pause countdown:|
继续倒计时#Continue countdown:|
暂停计时#Pause Timer:|
继续计时#Continue countdown:|
停止工作#Stop working:|
是否停止当前工作?#Does it stop the current job?:|
停止休息#Stop break:|
是否停止当前休息?#Is the current break stopped?:|
是否停止当前休息?\n扣除的番茄不会被退还#Does it stop the current rest? \n Deducted tomatoes will not be refunded.:|
是否开始休息?\n休息所需番茄 {0}\n当前拥有番茄 {1}#Do you start the break? \nRequired tomatoes for break {0}\nCurrently have tomatoes {1}:|
当前番茄不足,不能开始长休息\n休息所需番茄 {0}\n当前拥有番茄 {1}#We can't start a rest if we don't have enough tomatoes. \nTomatoes needed for break {0}\nCurrently have tomatoes {1}:|
休息失败,请好好工作#Break failed. Please work hard.:|
基本时间设置#Basic Time Setting:|
24小时制#24 hours:|
时钟位置#Clock position:|
闲置透明度#Idle Transparency:|
显示层次#Display level:|
时间偏移#Time Offset:|
默认倒计时#Default countdown:|
倒计时语音#Countdown voice:|
关闭时钟#Clock off:|
显示时间时启用24小时制#Enable 24-hour system when displaying time:|
闲置时置于桌宠后方#Behind desk favor when idle:|
选择位置#Select:|
前往 设置-MOD设置 启用/停用MOD#Go to Settings - MOD Settings:|
番茄钟相关设置#Tomato clock related settings:|
工作时长#Working hours:|
休息时长#Break duration:|
长休息时长#Rest Duration:|
工作语音#Work Voice:|
休息语音#Break Voice:|
结束语音#End voice:|
语音预设#Voice preset:|
setwidth#550:|
Demo Clock 设置#Demo Clock Settings:|
倒计时时间设定#Countdown Time Setting:|
请输入倒计时时间#Please enter the countdown time:|
确定#OK:|

View File

@ -0,0 +1,66 @@
DM时钟#DM时钟:|
设置#设置:|
开始倒计时#开始倒计时:|
开始正计时#开始正计时:|
开始工作#开始工作:|
开始休息#开始休息:|
计时: {0:f1} 秒#计时: {0:f1} 秒:|
计时: {0:f1} 分钟#计时: {0:f1} 分钟:|
计时: {0:f1} 小时#计时: {0:f1} 小时:|
时间到#时间到:|
计时结束#计时结束:|
点击此处回到时间显示#点击此处回到时间显示:|
剩余: {0:f1} 秒#剩余: {0:f1} 秒:|
剩余: {0:f1} 分钟#剩余: {0:f1} 分钟:|
剩余: {0:f1} 小时#剩余: {0:f1} 小时:|
工作结束#工作结束:|
点击此处开始休息#点击此处开始休息:|
工作剩{0:f1}秒#工作剩{0:f1}秒:|
工作剩{0:f1}分钟#工作剩{0:f1}分钟:|
工作剩{0:f1}小时#工作剩{0:f1}小时:|
休息结束#休息结束:|
点击此处开始工作#点击此处开始工作:|
休息剩{0:f1}秒#休息剩{0:f1}秒:|
休息剩{0:f1}分钟#休息剩{0:f1}分钟:|
休息剩{0:f1}小时#休息剩{0:f1}小时:|
长休息结束#长休息结束:|
计时暂停#计时暂停:|
番茄点数 {0} 累计点数 {1}#番茄点数 {0} 累计点数 {1}:|
暂停倒计时#暂停倒计时:|
继续倒计时#继续倒计时:|
暂停计时#暂停计时:|
继续计时#继续计时:|
停止工作#停止工作:|
是否停止当前工作?#是否停止当前工作?:|
停止休息#停止休息:|
是否停止当前休息?#是否停止当前休息?:|
是否停止当前休息?\n扣除的番茄不会被退还#是否停止当前休息?\n扣除的番茄不会被退还:|
是否开始休息?\n休息所需番茄 {0}\n当前拥有番茄 {1}#是否开始休息?\n休息所需番茄 {0}\n当前拥有番茄 {1}:|
当前番茄不足,不能开始长休息\n休息所需番茄 {0}\n当前拥有番茄 {1}#当前番茄不足,不能开始长休息\n休息所需番茄 {0}\n当前拥有番茄 {1}:|
休息失败,请好好工作#休息失败,请好好工作:|
基本时间设置#基本时间设置:|
24小时制#24小时制:|
时钟位置#时钟位置:|
闲置透明度#闲置透明度:|
显示层次#显示层次:|
时间偏移#时间偏移:|
默认倒计时#默认倒计时:|
倒计时语音#倒计时语音:|
关闭时钟#关闭时钟:|
显示时间时启用24小时制#显示时间时启用24小时制:|
闲置时置于桌宠后方#闲置时置于桌宠后方:|
选择位置#选择位置:|
前往 设置-MOD设置 启用/停用MOD#前往 设置-MOD设置 启用/停用MOD:|
番茄钟相关设置#番茄钟相关设置:|
工作时长#工作时长:|
休息时长#休息时长:|
长休息时长#长休息时长:|
工作语音#工作语音:|
休息语音#休息语音:|
结束语音#结束语音:|
语音预设#语音预设:|
setwidth#450:|
Demo Clock 设置#Demo Clock 设置:|
倒计时时间设定#倒计时时间设定:|
请输入倒计时时间#请输入倒计时时间:|
确定#确定:|

View File

@ -0,0 +1,66 @@
DM时钟#DM時鐘:|
设置#設定:|
开始倒计时#開始倒數計時:|
开始正计时#開始正計時:|
开始工作#開始工作:|
开始休息#開始休息:|
计时: {0:f1} 秒#計時:{0:f1}秒:|
计时: {0:f1} 分钟#計時:{0:f1}分鐘:|
计时: {0:f1} 小时#計時:{0:f1}小時:|
时间到#時間到:|
计时结束#計時結束:|
点击此处回到时间显示#點擊此處回到時間顯示:|
剩余: {0:f1} 秒#剩餘:{0:f1}秒:|
剩余: {0:f1} 分钟#剩餘:{0:f1}分鐘:|
剩余: {0:f1} 小时#剩餘:{0:f1}小時:|
工作结束#工作結束:|
点击此处开始休息#點擊此處開始休息:|
工作剩{0:f1}秒#工作剩{0:f1}秒:|
工作剩{0:f1}分钟#工作剩{0:f1}分鐘:|
工作剩{0:f1}小时#工作剩{0:f1}小時:|
休息结束#休息結束:|
点击此处开始工作#點擊此處開始工作:|
休息剩{0:f1}秒#休息剩{0:f1}秒:|
休息剩{0:f1}分钟#休息剩{0:f1}分鐘:|
休息剩{0:f1}小时#休息剩{0:f1}小時:|
长休息结束#長休息結束:|
计时暂停#計時暫停:|
番茄点数 {0} 累计点数 {1}#蕃茄點數{0}累計點數{1}:|
暂停倒计时#暫停倒數計時:|
继续倒计时#繼續倒數計時:|
暂停计时#暫停計時:|
继续计时#繼續計時:|
停止工作#停止工作:|
是否停止当前工作?#是否停止當前工作?:|
停止休息#停止休息:|
是否停止当前休息?#是否停止當前休息?:|
是否停止当前休息?\n扣除的番茄不会被退还#是否停止當前休息? \n扣除的蕃茄不會被退還:|
是否开始休息?\n休息所需番茄 {0}\n当前拥有番茄 {1}#是否開始休息? \n休息所需蕃茄{0}\n當前擁有蕃茄{1}:|
当前番茄不足,不能开始长休息\n休息所需番茄 {0}\n当前拥有番茄 {1}#當前蕃茄不足,不能開始長休息\n休息所需蕃茄{0}\n當前擁有蕃茄{1}:|
休息失败,请好好工作#休息失敗,請好好工作:|
基本时间设置#基本時間設定:|
24小时制#24小時制:|
时钟位置#時鐘位置:|
闲置透明度#閒置透明度:|
显示层次#顯示層次:|
时间偏移#時間偏移:|
默认倒计时#默認倒數計時:|
倒计时语音#倒數計時語音:|
关闭时钟#關閉時鐘:|
显示时间时启用24小时制#顯示時間時啟用24小時制:|
闲置时置于桌宠后方#閒置時置於桌寵後方:|
选择位置#選擇位置:|
前往 设置-MOD设置 启用/停用MOD#前往設定-MOD設定啟用/停用MOD:|
番茄钟相关设置#蕃茄鐘相關設定:|
工作时长#工作時長:|
休息时长#休息時長:|
长休息时长#長休息時長:|
工作语音#工作語音:|
休息语音#休息語音:|
结束语音#結束語音:|
语音预设#語音預設:|
setwidth#450:|
Demo Clock 设置#Demo Clock 設定:|
倒计时时间设定#倒數計時時間設定:|
请输入倒计时时间#請輸入倒數計時時間:|
确定#確定:|

File diff suppressed because it is too large Load Diff

View File

@ -90,11 +90,37 @@
加载DIY内容
</summary>
</member>
<member name="M:VPet_Simulator.Windows.Interface.IMainWindow.RunAction(System.String)">
<member name="M:VPet_Simulator.Windows.Interface.IMainWindow.ShowSetting(System.Int32)">
<summary>
运行动作
显示设置页面
</summary>
<param name="page">设置页</param>
</member>
<member name="M:VPet_Simulator.Windows.Interface.IMainWindow.ShowBetterBuy(VPet_Simulator.Windows.Interface.Food.FoodType)">
<summary>
显示更好买页面
</summary>
<param name="type">食物类型</param>
</member>
<member name="M:VPet_Simulator.Windows.Interface.IMainWindow.Close">
<summary>
关闭桌宠
</summary>
</member>
<member name="M:VPet_Simulator.Windows.Interface.IMainWindow.Restart">
<summary>
重启桌宠
</summary>
</member>
<member name="P:VPet_Simulator.Windows.Interface.IMainWindow.MouseHitThrough">
<summary>
鼠标穿透
</summary>
</member>
<member name="P:VPet_Simulator.Windows.Interface.IMainWindow.HashCheck">
<summary>
存档 Hash检查 是否通过
</summary>
<param name="action">动作名称</param>
</member>
<member name="T:VPet_Simulator.Windows.Interface.LowText">
<summary>
@ -226,6 +252,11 @@
药品
</summary>
</member>
<member name="F:VPet_Simulator.Windows.Interface.Food.FoodType.Gift">
<summary>
礼品 (没做)
</summary>
</member>
<member name="P:VPet_Simulator.Windows.Interface.Food.Type">
<summary>
食物类型
@ -423,7 +454,7 @@
</member>
<member name="P:VPet_Simulator.Windows.Interface.Setting.LogicInterval">
<summary>
计算间隔
计算间隔 (秒)
</summary>
</member>
<member name="P:VPet_Simulator.Windows.Interface.Setting.PetHelpLeft">
@ -584,5 +615,28 @@
图片设置 (eg:定位锚点等)
</summary>
</member>
<member name="T:VPet_Simulator.Windows.Interface.Statistics">
<summary>
统计
</summary>
</member>
<member name="T:VPet_Simulator.Windows.Interface.Statistics.StatisticChangedEventHandler">
<summary>
统计变化通知事件
</summary>
<param name="sender">发送的统计(this)</param>
<param name="name">变动的名称</param>
<param name="value">变动的值</param>
</member>
<member name="F:VPet_Simulator.Windows.Interface.Statistics.Data">
<summary>
统计数据字典
</summary>
</member>
<member name="M:VPet_Simulator.Windows.Interface.Statistics.ToSubs">
<summary>
输出统计数据
</summary>
</member>
</members>
</doc>

View File

@ -1,8 +1,10 @@
<Window x:Class="VPet.Plugin.DemoClock.CountDownInput" 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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" xmlns:local="clr-namespace:VPet.Plugin.DemoClock" mc:Ignorable="d" Title="倒计时时间设定" Height="150" Width="400" FontSize="18">
xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" xmlns:local="clr-namespace:VPet.Plugin.DemoClock"
mc:Ignorable="d" Title="{ll:Str 倒计时时间设定}" Height="150" Width="400" FontSize="18">
<Window.Resources>
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
</Window.Resources>
@ -12,7 +14,7 @@
<RowDefinition Height="*" />
<RowDefinition Height="3*" />
<RowDefinition Height="1*" />
<RowDefinition Height=".5*"/>
<RowDefinition Height=".5*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width=".5*" />
@ -24,20 +26,20 @@
<ColumnDefinition Width="auto" />
<ColumnDefinition Width=".5*" />
</Grid.ColumnDefinitions>
<pu:NumberInput x:Name="hh" Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" Margin="5,0,0,0"
Minimum="0" Maximum="40"/>
<TextBlock Text="小时" VerticalAlignment="Center" Grid.Row="2" Grid.Column="2" />
<pu:NumberInput x:Name="hh" Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" Margin="5,0,0,0" Minimum="0"
Maximum="40" />
<TextBlock Text="{ll:Str 小时}" VerticalAlignment="Center" Grid.Row="2" Grid.Column="2" />
<pu:NumberInput x:Name="mm" Grid.Row="2" Grid.Column="3" VerticalAlignment="Center" Margin="5,0,0,0" Minimum="0"
Maximum="2400" />
<TextBlock Text="分钟" VerticalAlignment="Center" Grid.Row="2" Grid.Column="4" />
<TextBlock Text="{ll:Str 分钟}" VerticalAlignment="Center" Grid.Row="2" Grid.Column="4" />
<pu:NumberInput x:Name="ss" Grid.Row="2" Grid.Column="5" VerticalAlignment="Center" Margin="5,0,0,0" Minimum="0"
Maximum="2400" />
<TextBlock Text="秒" VerticalAlignment="Center" Grid.Row="2" Grid.Column="6" Margin="0,0,10,0" />
<TextBlock Text="请输入倒计时时间" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="6" VerticalAlignment="Top"
<TextBlock Text="{ll:Str }" VerticalAlignment="Center" Grid.Row="2" Grid.Column="6" Margin="0,0,10,0" />
<TextBlock Text="{ll:Str 请输入倒计时时间}" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="6" VerticalAlignment="Top"
Grid.RowSpan="2" />
<Button pu:ButtonHelper.CornerRadius="4" Content="确定" Grid.Column="5"
Background="{DynamicResource SecondaryLight}" VerticalAlignment="Bottom"
Height="30" BorderBrush="{DynamicResource SecondaryDark}" BorderThickness="2" Grid.Row="2"
Grid.ColumnSpan="2" Grid.RowSpan="3" Margin="0,0,0,10" Click="OK_Click" IsDefault="True" />
<Button pu:ButtonHelper.CornerRadius="4" Content="{ll:Str 确定}" Grid.Column="5"
Background="{DynamicResource SecondaryLight}" VerticalAlignment="Bottom" Height="30"
BorderBrush="{DynamicResource SecondaryDark}" BorderThickness="2" Grid.Row="2" Grid.ColumnSpan="2"
Grid.RowSpan="3" Margin="0,0,0,10" Click="OK_Click" IsDefault="True" />
</Grid>
</Window>

View File

@ -8,6 +8,7 @@ using System.Windows.Controls;
using System.Windows;
using VPet_Simulator.Windows.Interface;
using System.Windows.Threading;
using LinePutScript.Localization.WPF;
namespace VPet.Plugin.DemoClock
{
@ -85,7 +86,7 @@ namespace VPet.Plugin.DemoClock
menuItem = new MenuItem()
{
Header = "DM时钟",
Header = "DM时钟".Translate(),
HorizontalContentAlignment = HorizontalAlignment.Center
};
//foreach (MenuItem mi in WPFTimeClock.CM.Items)
@ -93,7 +94,7 @@ namespace VPet.Plugin.DemoClock
var mi = new MenuItem()
{
Header = "设置",
Header = "设置".Translate(),
HorizontalContentAlignment = HorizontalAlignment.Center,
};
mi.Click += (s, e) => { Setting(); };
@ -101,7 +102,7 @@ namespace VPet.Plugin.DemoClock
menuItem.Items.Add(new Separator());
mCountDown = new MenuItem()
{
Header = "开始倒计时",
Header = "开始倒计时".Translate(),
HorizontalContentAlignment = HorizontalAlignment.Center,
};
mCountDown.Click += WPFTimeClock.CountDownMenuItem_Click;
@ -109,7 +110,7 @@ namespace VPet.Plugin.DemoClock
mTiming = new MenuItem()
{
Header = "开始正计时",
Header = "开始正计时".Translate(),
HorizontalContentAlignment = HorizontalAlignment.Center,
};
mTiming.Click += WPFTimeClock.TimingMenuItem_Click;
@ -117,7 +118,7 @@ namespace VPet.Plugin.DemoClock
mTotmatoWork = new MenuItem()
{
Header = "开始工作",
Header = "开始工作".Translate(),
HorizontalContentAlignment = HorizontalAlignment.Center,
};
mTotmatoWork.Click += WPFTimeClock.WorkMenuItem_Click;
@ -125,18 +126,18 @@ namespace VPet.Plugin.DemoClock
mTotmatoRest = new MenuItem()
{
Header = "开始休息",
Header = "开始休息".Translate(),
HorizontalContentAlignment = HorizontalAlignment.Center,
};
mTotmatoRest.Click += WPFTimeClock.RestMenuItem_Click;
menuItem.Items.Add(mTotmatoRest);
//这是个临时举措,未来会支持直接调用
MenuItem modset = ((MenuItem)MW.Main.ToolBar.MenuSetting.Items[0]);
MenuItem modset = MW.Main.ToolBar.MenuMODConfig;
modset.Visibility = Visibility.Visible;
var menuset = new MenuItem()
{
Header = "DM时钟",
Header = "DM时钟".Translate(),
HorizontalContentAlignment = HorizontalAlignment.Center,
};
menuset.Click += (s, e) => { Setting(); };

View File

@ -521,25 +521,7 @@ namespace VPet.Plugin.DemoClock
else if (TDates.Text == "工作结束".Translate())
StartRest();
else if(TDates.Text == "休息结束".Translate() || TDates.Text == "长休息结束".Translate())
StartWork();
//switch (TDates.Text)
//{
// case "计时结束".Translate():
// Master.mode = Mode.None;
// CountTimer.IsEnabled = false;
// TOthers.Visibility = Visibility.Collapsed;
// PBTimeLeft.Visibility = Visibility.Collapsed;
// CountDownMenuItem.Header = "开始倒计时";
// Master.mCountDown.Header = "开始倒计时";
// break;
// case "工作结束":
// StartRest();
// break;
// case "休息结束":
// case "长休息结束":
// StartWork();
// break;
//}
StartWork();
}
}
}

View File

@ -33,16 +33,16 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="LinePutScript, Version=1.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LinePutScript.1.8.3\lib\net462\LinePutScript.dll</HintPath>
<HintPath>..\packages\LinePutScript.1.9.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.6\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 Include="Panuon.WPF, Version=1.0.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Panuon.WPF.1.0.2\lib\net462\Panuon.WPF.dll</HintPath>
</Reference>
<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 Include="Panuon.WPF.UI, Version=1.1.15.1, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Panuon.WPF.UI.1.1.15.3\lib\net462\Panuon.WPF.UI.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
@ -56,10 +56,10 @@
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="VPet-Simulator.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\VPet-Simulator.Core.0.3.0\lib\net462\VPet-Simulator.Core.dll</HintPath>
<HintPath>..\packages\VPet-Simulator.Core.0.5.0\lib\net462\VPet-Simulator.Core.dll</HintPath>
</Reference>
<Reference Include="VPet-Simulator.Windows.Interface, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\VPet-Simulator.Windows.Interface.0.3.0\lib\net462\VPet-Simulator.Windows.Interface.dll</HintPath>
<HintPath>..\packages\VPet-Simulator.Windows.Interface.0.5.0\lib\net462\VPet-Simulator.Windows.Interface.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="LinePutScript" version="1.8.3" targetFramework="net462" />
<package id="LinePutScript" version="1.9.2" targetFramework="net462" />
<package id="LinePutScript.Localization.WPF" version="1.0.6" targetFramework="net462" />
<package id="Panuon.WPF" version="1.0.1" targetFramework="net462" />
<package id="Panuon.WPF.UI" version="1.1.14" targetFramework="net462" />
<package id="VPet-Simulator.Core" version="0.3.0" targetFramework="net462" />
<package id="VPet-Simulator.Windows.Interface" version="0.3.0" targetFramework="net462" />
<package id="Panuon.WPF" version="1.0.2" targetFramework="net462" />
<package id="Panuon.WPF.UI" version="1.1.15.3" targetFramework="net462" />
<package id="VPet-Simulator.Core" version="0.5.0" targetFramework="net462" />
<package id="VPet-Simulator.Windows.Interface" version="0.5.0" targetFramework="net462" />
</packages>

View File

@ -2,8 +2,9 @@
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:ll="clr-namespace:LinePutScript.Localization.WPF;assembly=LinePutScript.Localization.WPF"
xmlns:local="clr-namespace:VPet.Plugin.DemoClock" mc:Ignorable="d"
xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" Title="Demo Clock 设置" Width="450" FontSize="16"
xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" Title="{ll:Str Demo Clock 设置}" Width="{ll:Dbe 'setwidth', DefValue=450}" FontSize="16"
Height="Auto" ResizeMode="NoResize" WindowState="Normal" SizeToContent="Height"
Background="{DynamicResource PrimaryLighter}" Closed="Window_Closed">
<Window.Resources>
@ -12,7 +13,7 @@
<TabControl Background="{DynamicResource PrimaryLight}"
pu:TabControlHelper.HeaderPanelBackground="{DynamicResource PrimaryLighter}"
pu:TabControlHelper.ItemsSelectedBackground="{DynamicResource PrimaryLight}">
<TabItem Header="基本时间设置">
<TabItem Header="{ll:Str 基本时间设置}">
<Grid Margin="8" Background="{DynamicResource PrimaryLighter}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@ -30,20 +31,20 @@
<RowDefinition Height="40" />
<RowDefinition Height="40" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="24小时制" VerticalAlignment="Center" />
<TextBlock Grid.Row="1" Text="时钟位置" 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" />
<TextBlock Grid.Row="0" Text="{ll:Str 24小时制}" VerticalAlignment="Center" />
<TextBlock Grid.Row="1" Text="{ll:Str 时钟位置}" 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" />
<pu:Switch x:Name="Switch24h" BorderBrush="{DynamicResource DARKPrimaryDark}"
CheckedBackground="{DynamicResource DARKPrimary}"
CheckedBorderBrush="{DynamicResource DARKPrimary}" Background="Transparent" BoxWidth="35"
BoxHeight="18" ToggleSize="14" ToggleShadowColor="{x:Null}"
ToggleBrush="{DynamicResource DARKPrimaryDark}" Content="显示时间时启用24小时制"
ToggleBrush="{DynamicResource DARKPrimaryDark}" Content="{ll:Str 显示时间时启用24小时制}"
CheckedToggleBrush="{DynamicResource DARKPrimaryText}" Grid.Column="2"
Checked="Switch24h_Checked" Unchecked="Switch24h_Checked" />
<pu:NumberInput Grid.Row="1" Grid.Column="3" Minimum="-100" Maximum="600" Margin="5"
@ -62,20 +63,20 @@
CheckedBackground="{DynamicResource DARKPrimary}" IsChecked="True"
CheckedBorderBrush="{DynamicResource DARKPrimary}" Background="Transparent" BoxWidth="35"
BoxHeight="18" ToggleSize="14" ToggleShadowColor="{x:Null}"
ToggleBrush="{DynamicResource DARKPrimaryDark}" Content="闲置时置于桌宠后方"
ToggleBrush="{DynamicResource DARKPrimaryDark}" Content="{ll:Str 闲置时置于桌宠后方}"
CheckedToggleBrush="{DynamicResource DARKPrimaryText}" Grid.Column="2" Grid.Row="3"
Checked="SwitchAutoLayer_Checked" Unchecked="SwitchAutoLayer_Checked" />
<pu:NumberInput x:Name="NumTimeDiff" Minimum="-2400" Maximum="2400" Margin="5,5,5,5" Value="0"
CornerRadius="3" Grid.Row="4" Grid.Column="2" ValueChanged="NumTimeDiff_ValueChanged" />
<TextBlock Text="分钟" VerticalAlignment="Center" Margin="5,0,0,0" Grid.Row="4" Grid.Column="3" />
<TextBlock Text="{ll:Str 分钟}" VerticalAlignment="Center" Margin="5,0,0,0" Grid.Row="4" Grid.Column="3" />
<pu:NumberInput x:Name="NumDefCountDown" Minimum="0" Maximum="2400" Margin="5,5,5,5" Value="5"
CornerRadius="3" Grid.Row="5" Grid.Column="2" ValueChanged="NumDefCountDown_ValueChanged" />
<TextBlock Text="分钟" VerticalAlignment="Center" Margin="5,0,0,0" Grid.Row="5" Grid.Column="3" />
<TextBlock Text="{ll:Str 分钟}" VerticalAlignment="Center" Margin="5,0,0,0" Grid.Row="5" Grid.Column="3" />
<TextBox x:Name="TextCountDown" Grid.Row="6" Grid.Column="2"
Style="{DynamicResource StandardTextBoxStyle}" FontSize="16" Margin="5"
Text="pack://application:,,,/Res/CountDown.mp3" TextChanged="TextCountDown_TextChanged"
IsEnabled="False" />
<Button pu:ButtonHelper.CornerRadius="4" Content="选择位置" Grid.Column="3" Tag="CountDown"
<Button pu:ButtonHelper.CornerRadius="4" Content="{ll:Str 选择位置}" Grid.Column="3" Tag="CountDown"
Background="{DynamicResource SecondaryLight}" HorizontalAlignment="Center" IsEnabled="False"
VerticalAlignment="Center" Height="30" BorderBrush="{DynamicResource SecondaryDark}"
BorderThickness="2" Grid.Row="6" />
@ -86,12 +87,12 @@
ToggleBrush="{DynamicResource DARKPrimaryDark}" Content="启用或关闭显示时钟"
CheckedToggleBrush="{DynamicResource DARKPrimaryText}" Grid.Column="2" Grid.Row="7"
Checked="SwitchOn_Checked" />-->
<TextBlock Grid.Column="2" Grid.Row="7" Text="前往 设置-MOD设置 启用/停用MOD" HorizontalAlignment="Center"
<TextBlock Grid.Column="2" Grid.Row="7" Text="{ll:Str '前往 设置-MOD设置 启用/停用MOD'}" HorizontalAlignment="Center"
VerticalAlignment="Center" Grid.ColumnSpan="2" TextDecorations="Underline" Cursor="Hand"
Foreground="{DynamicResource DARKPrimaryDark}" MouseDown="TextBlock_MouseDown" />
</Grid>
</TabItem>
<TabItem Header="番茄钟相关设置">
<TabItem Header="{ll:Str 番茄钟相关设置}">
<Grid Margin="8" Background="{DynamicResource PrimaryLighter}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@ -108,28 +109,28 @@
<RowDefinition Height="40" />
<RowDefinition Height="40" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="工作时长" VerticalAlignment="Center" />
<TextBlock Grid.Row="1" Text="休息时长" 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="0" Text="{ll:Str 工作时长}" VerticalAlignment="Center" />
<TextBlock Grid.Row="1" Text="{ll:Str 休息时长}" 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 Text="分钟" VerticalAlignment="Center" Grid.Column="3" HorizontalAlignment="Center" />
<TextBlock Grid.Row="1" Text="分钟" VerticalAlignment="Center" Grid.Column="3"
<TextBlock Text="{ll:Str 分钟}" VerticalAlignment="Center" Grid.Column="3" HorizontalAlignment="Center" />
<TextBlock Grid.Row="1" Text="{ll:Str 分钟}" VerticalAlignment="Center" Grid.Column="3"
HorizontalAlignment="Center" />
<TextBlock Grid.Row="2" Text="分钟" VerticalAlignment="Center" Grid.Column="3"
<TextBlock Grid.Row="2" Text="{ll:Str 分钟}" VerticalAlignment="Center" Grid.Column="3"
HorizontalAlignment="Center" />
<Button pu:ButtonHelper.CornerRadius="4" Content="选择位置" Grid.Column="3" Tag="TomatoWork"
<Button pu:ButtonHelper.CornerRadius="4" Content="{ll:Str 选择位置}" Grid.Column="3" Tag="TomatoWork"
IsEnabled="False" Background="{DynamicResource SecondaryLight}" HorizontalAlignment="Center"
VerticalAlignment="Center" Height="30" BorderBrush="{DynamicResource SecondaryDark}"
BorderThickness="2" Grid.Row="3" Click="btn_path_Click" />
<Button pu:ButtonHelper.CornerRadius="4" Content="选择位置" Grid.Column="3" Tag="TomatoRest"
<Button pu:ButtonHelper.CornerRadius="4" Content="{ll:Str 选择位置}" Grid.Column="3" Tag="TomatoRest"
Background="{DynamicResource SecondaryLight}" HorizontalAlignment="Center" IsEnabled="False"
VerticalAlignment="Center" Height="30" BorderBrush="{DynamicResource SecondaryDark}"
BorderThickness="2" Grid.Row="4" />
<Button pu:ButtonHelper.CornerRadius="4" Content="选择位置" Grid.Column="3" Tag="TomatoEnd"
<Button pu:ButtonHelper.CornerRadius="4" Content="{ll:Str 选择位置}" Grid.Column="3" Tag="TomatoEnd"
Background="{DynamicResource SecondaryLight}" HorizontalAlignment="Center" IsEnabled="False"
VerticalAlignment="Center" Height="30" BorderBrush="{DynamicResource SecondaryDark}"
BorderThickness="2" Grid.Row="5" />

View File

@ -177,7 +177,7 @@ namespace VPet.Plugin.DemoClock
private void TextBlock_MouseDown(object sender, MouseButtonEventArgs e)
{
//Master.MW.
Master.MW.ShowSetting(5);
}
//private void SwitchOn_Checked(object sender, RoutedEventArgs e)

View File

@ -1,2 +1,5 @@
vupmod#EdgeTTS:|author#LorisYounger:|gamever#100:|ver#100:|
intro#桌宠说话的时候附带语音,使用EdgeTTS:|
intro#桌宠说话的时候附带语音,使用EdgeTTS:|
lang#en:|桌宠说话的时候附带语音,使用EdgeTTS#When the desk pet speaks with voice, use EdgeTTS:|EdgeTTS#EdgeTTS:|
lang#zh-Hans:|桌宠说话的时候附带语音,使用EdgeTTS#桌宠说话的时候附带语音,使用EdgeTTS:|EdgeTTS#EdgeTTS:|
lang#zh-Hant:|桌宠说话的时候附带语音,使用EdgeTTS#桌寵說話的時候附帶語音使用EdgeTTS:|EdgeTTS#EdgeTTS:|

View File

@ -0,0 +1,12 @@
EdgeTTSSpeaker#en-US-AnaNeural:|
你好,主人\n现在是#Hello, master \n is now:|
生成失败#Generation Failed:|
错误代码: {0}\n消息: {1}#Error Code: {0}\n Message: {1}:|
EdgeTTS 设置#EdgeTTS Settings:|
启用#Enable:|
音量#Volume:|
音调#Tone:|
语速#Speed of speech:|
讲述人#Narrator:|
启用 EdgeTTS#Enable EdgeTTS:|
测试#Test:|

View File

@ -0,0 +1,12 @@
EdgeTTSSpeaker#zh-CN-XiaoyiNeural:|
你好,主人\n现在是#你好,主人\n现在是:|
生成失败#生成失败:|
错误代码: {0}\n消息: {1}#错误代码: {0}\n消息: {1}:|
EdgeTTS 设置#EdgeTTS 设置:|
启用#启用:|
音量#音量:|
音调#音调:|
语速#语速:|
讲述人#讲述人:|
启用 EdgeTTS#启用 EdgeTTS:|
测试#测试:|

View File

@ -0,0 +1,12 @@
EdgeTTSSpeaker#Zh-CN-XiaoyiNeural:|
你好,主人\n现在是#你好,主人\n現在是:|
生成失败#生成失敗:|
错误代码: {0}\n消息: {1}#錯誤代碼:{0}\n消息{1}:|
EdgeTTS 设置#EdgeTTS設定:|
启用#啟用:|
音量#音量:|
音调#音調:|
语速#語速:|
讲述人#講述人:|
启用 EdgeTTS#啟用EdgeTTS:|
测试#測試:|

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -90,11 +90,37 @@
加载DIY内容
</summary>
</member>
<member name="M:VPet_Simulator.Windows.Interface.IMainWindow.RunAction(System.String)">
<member name="M:VPet_Simulator.Windows.Interface.IMainWindow.ShowSetting(System.Int32)">
<summary>
运行动作
显示设置页面
</summary>
<param name="page">设置页</param>
</member>
<member name="M:VPet_Simulator.Windows.Interface.IMainWindow.ShowBetterBuy(VPet_Simulator.Windows.Interface.Food.FoodType)">
<summary>
显示更好买页面
</summary>
<param name="type">食物类型</param>
</member>
<member name="M:VPet_Simulator.Windows.Interface.IMainWindow.Close">
<summary>
关闭桌宠
</summary>
</member>
<member name="M:VPet_Simulator.Windows.Interface.IMainWindow.Restart">
<summary>
重启桌宠
</summary>
</member>
<member name="P:VPet_Simulator.Windows.Interface.IMainWindow.MouseHitThrough">
<summary>
鼠标穿透
</summary>
</member>
<member name="P:VPet_Simulator.Windows.Interface.IMainWindow.HashCheck">
<summary>
存档 Hash检查 是否通过
</summary>
<param name="action">动作名称</param>
</member>
<member name="T:VPet_Simulator.Windows.Interface.LowText">
<summary>
@ -226,6 +252,11 @@
药品
</summary>
</member>
<member name="F:VPet_Simulator.Windows.Interface.Food.FoodType.Gift">
<summary>
礼品 (没做)
</summary>
</member>
<member name="P:VPet_Simulator.Windows.Interface.Food.Type">
<summary>
食物类型
@ -423,7 +454,7 @@
</member>
<member name="P:VPet_Simulator.Windows.Interface.Setting.LogicInterval">
<summary>
计算间隔
计算间隔 (秒)
</summary>
</member>
<member name="P:VPet_Simulator.Windows.Interface.Setting.PetHelpLeft">
@ -584,5 +615,28 @@
图片设置 (eg:定位锚点等)
</summary>
</member>
<member name="T:VPet_Simulator.Windows.Interface.Statistics">
<summary>
统计
</summary>
</member>
<member name="T:VPet_Simulator.Windows.Interface.Statistics.StatisticChangedEventHandler">
<summary>
统计变化通知事件
</summary>
<param name="sender">发送的统计(this)</param>
<param name="name">变动的名称</param>
<param name="value">变动的值</param>
</member>
<member name="F:VPet_Simulator.Windows.Interface.Statistics.Data">
<summary>
统计数据字典
</summary>
</member>
<member name="M:VPet_Simulator.Windows.Interface.Statistics.ToSubs">
<summary>
输出统计数据
</summary>
</member>
</members>
</doc>

View File

@ -11,6 +11,7 @@ using System.IO;
using VPet_Simulator.Core;
using System.Windows.Controls;
using System.Windows;
using LinePutScript.Localization.WPF;
namespace VPet.Plugin.VPetTTS
{
@ -38,8 +39,14 @@ namespace VPet.Plugin.VPetTTS
if (Set.Enable)
MW.Main.OnSay += Main_OnSay;
//这是个临时举措,未来会支持直接调用
MenuItem modset = ((MenuItem)MW.Main.ToolBar.MenuSetting.Items[0]);
//根据当前语言选择合适的默认发音人
if (string.IsNullOrEmpty(Set.Speaker))
if ("EdgeTTSSpeaker".Translate() == "EdgeTTSSpeaker")
Set.Speaker = "en-US-AnaNeural";
else
Set.Speaker = "EdgeTTSSpeaker".Translate();
MenuItem modset = MW.Main.ToolBar.MenuMODConfig;
modset.Visibility = Visibility.Visible;
var menuItem = new MenuItem()
{

View File

@ -47,7 +47,7 @@ namespace VPet.Plugin.VPetTTS
/// 讲述人
/// </summary>
[Line]
public string Speaker { get; set; } = "zh-CN-XiaoyiNeural";
public string Speaker { get; set; }
/// <summary>
/// 启用EdgeTTS
/// </summary>

View File

@ -35,7 +35,7 @@
<HintPath>..\packages\EdgeTTS.Framework.1.0.1\lib\net462\EdgeTTS.Framework.dll</HintPath>
</Reference>
<Reference Include="LinePutScript, Version=1.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LinePutScript.1.8.3\lib\net462\LinePutScript.dll</HintPath>
<HintPath>..\packages\LinePutScript.1.9.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.6\lib\net462\LinePutScript.Localization.WPF.dll</HintPath>
@ -43,11 +43,11 @@
<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>
<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 Include="Panuon.WPF, Version=1.0.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Panuon.WPF.1.0.2\lib\net462\Panuon.WPF.dll</HintPath>
</Reference>
<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 Include="Panuon.WPF.UI, Version=1.1.15.1, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Panuon.WPF.UI.1.1.15.3\lib\net462\Panuon.WPF.UI.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
@ -67,10 +67,10 @@
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="VPet-Simulator.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\VPet-Simulator.Core.0.3.0\lib\net462\VPet-Simulator.Core.dll</HintPath>
<HintPath>..\packages\VPet-Simulator.Core.0.5.0\lib\net462\VPet-Simulator.Core.dll</HintPath>
</Reference>
<Reference Include="VPet-Simulator.Windows.Interface, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\VPet-Simulator.Windows.Interface.0.3.0\lib\net462\VPet-Simulator.Windows.Interface.dll</HintPath>
<HintPath>..\packages\VPet-Simulator.Windows.Interface.0.5.0\lib\net462\VPet-Simulator.Windows.Interface.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
</ItemGroup>

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EdgeTTS.Framework" version="1.0.1" targetFramework="net462" />
<package id="LinePutScript" version="1.8.3" targetFramework="net462" />
<package id="LinePutScript" version="1.9.2" targetFramework="net462" />
<package id="LinePutScript.Localization.WPF" version="1.0.6" targetFramework="net462" />
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
<package id="Panuon.WPF" version="1.0.1" targetFramework="net462" />
<package id="Panuon.WPF.UI" version="1.1.14" targetFramework="net462" />
<package id="Panuon.WPF" version="1.0.2" targetFramework="net462" />
<package id="Panuon.WPF.UI" version="1.1.15.3" targetFramework="net462" />
<package id="Serilog" version="3.0.1" targetFramework="net462" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
<package id="VPet-Simulator.Core" version="0.3.0" targetFramework="net462" />
<package id="VPet-Simulator.Windows.Interface" version="0.3.0" targetFramework="net462" />
<package id="VPet-Simulator.Core" version="0.5.0" targetFramework="net462" />
<package id="VPet-Simulator.Windows.Interface" version="0.5.0" targetFramework="net462" />
</packages>

View File

@ -2,8 +2,9 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:System="clr-namespace:System;assembly=mscorlib"
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.Plugin.VPetTTS"
mc:Ignorable="d" xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" Title="EdgeTTS 设置" Width="450"
mc:Ignorable="d" xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" Title="{ll:Str EdgeTTS 设置}" Width="450"
FontSize="16" Height="Auto" ResizeMode="NoResize" WindowState="Normal" SizeToContent="Height"
Background="{DynamicResource PrimaryLighter}" Closed="Window_Closed">
<Window.Resources>
@ -24,16 +25,16 @@
<RowDefinition Height="40" />
<RowDefinition Height="40" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="启用" VerticalAlignment="Center" />
<TextBlock Grid.Row="1" Text="音量" 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="0" Text="{ll:Str 启用}" VerticalAlignment="Center" />
<TextBlock Grid.Row="1" Text="{ll:Str 音量}" 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" />
<pu:Switch x:Name="SwitchOn" BorderBrush="{DynamicResource DARKPrimaryDark}"
CheckedBackground="{DynamicResource DARKPrimary}" CheckedBorderBrush="{DynamicResource DARKPrimary}"
Background="Transparent" BoxWidth="35" BoxHeight="18" ToggleSize="14" ToggleShadowColor="{x:Null}"
ToggleBrush="{DynamicResource DARKPrimaryDark}" Content="启用 EdgeTTS"
ToggleBrush="{DynamicResource DARKPrimaryDark}" Content="{ll:Str 启用 EdgeTTS}"
CheckedToggleBrush="{DynamicResource DARKPrimaryText}" Grid.Column="2" />
<pu:NumberInput Grid.Row="1" Grid.Column="3" Minimum="0" MaxHeight="350" Margin="5"
Value="{Binding Value, ElementName=VolumeSilder}" CornerRadius="3" Maximum="100" />
@ -51,7 +52,292 @@
Background="{DynamicResource DARKPrimaryLighter}" LargeChange="5" SmallChange="1"
pu:SliderHelper.CoveredBackground="{DynamicResource DARKPrimaryDarker}" />
<ComboBox x:Name="CombSpeaker" Grid.Row="4" Grid.Column="2" Style="{DynamicResource StandardComboBoxStyle}"
FontSize="16" Margin="5" SelectedIndex="1">
FontSize="16" Margin="5">
<System:String>af-ZA-AdriNeural</System:String>
<System:String>af-ZA-WillemNeural</System:String>
<System:String>am-ET-AmehaNeural</System:String>
<System:String>am-ET-MekdesNeural</System:String>
<System:String>ar-AE-FatimaNeural</System:String>
<System:String>ar-AE-HamdanNeural</System:String>
<System:String>ar-BH-AliNeural</System:String>
<System:String>ar-BH-LailaNeural</System:String>
<System:String>ar-DZ-AminaNeural</System:String>
<System:String>ar-DZ-IsmaelNeural</System:String>
<System:String>ar-EG-SalmaNeural</System:String>
<System:String>ar-EG-ShakirNeural</System:String>
<System:String>ar-IQ-BasselNeural</System:String>
<System:String>ar-IQ-RanaNeural</System:String>
<System:String>ar-JO-SanaNeural</System:String>
<System:String>ar-JO-TaimNeural</System:String>
<System:String>ar-KW-FahedNeural</System:String>
<System:String>ar-KW-NouraNeural</System:String>
<System:String>ar-LB-LaylaNeural</System:String>
<System:String>ar-LB-RamiNeural</System:String>
<System:String>ar-LY-ImanNeural</System:String>
<System:String>ar-LY-OmarNeural</System:String>
<System:String>ar-MA-JamalNeural</System:String>
<System:String>ar-MA-MounaNeural</System:String>
<System:String>ar-OM-AbdullahNeural</System:String>
<System:String>ar-OM-AyshaNeural</System:String>
<System:String>ar-QA-AmalNeural</System:String>
<System:String>ar-QA-MoazNeural</System:String>
<System:String>ar-SA-HamedNeural</System:String>
<System:String>ar-SA-ZariyahNeural</System:String>
<System:String>ar-SY-AmanyNeural</System:String>
<System:String>ar-SY-LaithNeural</System:String>
<System:String>ar-TN-HediNeural</System:String>
<System:String>ar-TN-ReemNeural</System:String>
<System:String>ar-YE-MaryamNeural</System:String>
<System:String>ar-YE-SalehNeural</System:String>
<System:String>az-AZ-BabekNeural</System:String>
<System:String>az-AZ-BanuNeural</System:String>
<System:String>bg-BG-BorislavNeural</System:String>
<System:String>bg-BG-KalinaNeural</System:String>
<System:String>bn-BD-NabanitaNeural</System:String>
<System:String>bn-BD-PradeepNeural</System:String>
<System:String>bn-IN-BashkarNeural</System:String>
<System:String>bn-IN-TanishaaNeural</System:String>
<System:String>bs-BA-GoranNeural</System:String>
<System:String>bs-BA-VesnaNeural</System:String>
<System:String>ca-ES-EnricNeural</System:String>
<System:String>ca-ES-JoanaNeural</System:String>
<System:String>cs-CZ-AntoninNeural</System:String>
<System:String>cs-CZ-VlastaNeural</System:String>
<System:String>cy-GB-AledNeural</System:String>
<System:String>cy-GB-NiaNeural</System:String>
<System:String>da-DK-ChristelNeural</System:String>
<System:String>da-DK-JeppeNeural</System:String>
<System:String>de-AT-IngridNeural</System:String>
<System:String>de-AT-JonasNeural</System:String>
<System:String>de-CH-JanNeural</System:String>
<System:String>de-CH-LeniNeural</System:String>
<System:String>de-DE-AmalaNeural</System:String>
<System:String>de-DE-ConradNeural</System:String>
<System:String>de-DE-KatjaNeural</System:String>
<System:String>de-DE-KillianNeural</System:String>
<System:String>el-GR-AthinaNeural</System:String>
<System:String>el-GR-NestorasNeural</System:String>
<System:String>en-AU-NatashaNeural</System:String>
<System:String>en-AU-WilliamNeural</System:String>
<System:String>en-CA-ClaraNeural</System:String>
<System:String>en-CA-LiamNeural</System:String>
<System:String>en-GB-LibbyNeural</System:String>
<System:String>en-GB-MaisieNeural</System:String>
<System:String>en-GB-RyanNeural</System:String>
<System:String>en-GB-SoniaNeural</System:String>
<System:String>en-GB-ThomasNeural</System:String>
<System:String>en-HK-SamNeural</System:String>
<System:String>en-HK-YanNeural</System:String>
<System:String>en-IE-ConnorNeural</System:String>
<System:String>en-IE-EmilyNeural</System:String>
<System:String>en-IN-NeerjaExpressiveNeural</System:String>
<System:String>en-IN-NeerjaNeural</System:String>
<System:String>en-IN-PrabhatNeural</System:String>
<System:String>en-KE-AsiliaNeural</System:String>
<System:String>en-KE-ChilembaNeural</System:String>
<System:String>en-NG-AbeoNeural</System:String>
<System:String>en-NG-EzinneNeural</System:String>
<System:String>en-NZ-MitchellNeural</System:String>
<System:String>en-NZ-MollyNeural</System:String>
<System:String>en-PH-JamesNeural</System:String>
<System:String>en-PH-RosaNeural</System:String>
<System:String>en-SG-LunaNeural</System:String>
<System:String>en-SG-WayneNeural</System:String>
<System:String>en-TZ-ElimuNeural</System:String>
<System:String>en-TZ-ImaniNeural</System:String>
<System:String>en-US-AnaNeural</System:String>
<System:String>en-US-AriaNeural</System:String>
<System:String>en-US-ChristopherNeural</System:String>
<System:String>en-US-EricNeural</System:String>
<System:String>en-US-GuyNeural</System:String>
<System:String>en-US-JennyNeural</System:String>
<System:String>en-US-MichelleNeural</System:String>
<System:String>en-US-RogerNeural</System:String>
<System:String>en-US-SteffanNeural</System:String>
<System:String>en-ZA-LeahNeural</System:String>
<System:String>en-ZA-LukeNeural</System:String>
<System:String>es-AR-ElenaNeural</System:String>
<System:String>es-AR-TomasNeural</System:String>
<System:String>es-BO-MarceloNeural</System:String>
<System:String>es-BO-SofiaNeural</System:String>
<System:String>es-CL-CatalinaNeural</System:String>
<System:String>es-CL-LorenzoNeural</System:String>
<System:String>es-CO-GonzaloNeural</System:String>
<System:String>es-CO-SalomeNeural</System:String>
<System:String>es-CR-JuanNeural</System:String>
<System:String>es-CR-MariaNeural</System:String>
<System:String>es-CU-BelkysNeural</System:String>
<System:String>es-CU-ManuelNeural</System:String>
<System:String>es-DO-EmilioNeural</System:String>
<System:String>es-DO-RamonaNeural</System:String>
<System:String>es-EC-AndreaNeural</System:String>
<System:String>es-EC-LuisNeural</System:String>
<System:String>es-ES-AlvaroNeural</System:String>
<System:String>es-ES-ElviraNeural</System:String>
<System:String>es-GQ-JavierNeural</System:String>
<System:String>es-GQ-TeresaNeural</System:String>
<System:String>es-GT-AndresNeural</System:String>
<System:String>es-GT-MartaNeural</System:String>
<System:String>es-HN-CarlosNeural</System:String>
<System:String>es-HN-KarlaNeural</System:String>
<System:String>es-MX-DaliaNeural</System:String>
<System:String>es-MX-JorgeNeural</System:String>
<System:String>es-NI-FedericoNeural</System:String>
<System:String>es-NI-YolandaNeural</System:String>
<System:String>es-PA-MargaritaNeural</System:String>
<System:String>es-PA-RobertoNeural</System:String>
<System:String>es-PE-AlexNeural</System:String>
<System:String>es-PE-CamilaNeural</System:String>
<System:String>es-PR-KarinaNeural</System:String>
<System:String>es-PR-VictorNeural</System:String>
<System:String>es-PY-MarioNeural</System:String>
<System:String>es-PY-TaniaNeural</System:String>
<System:String>es-SV-LorenaNeural</System:String>
<System:String>es-SV-RodrigoNeural</System:String>
<System:String>es-US-AlonsoNeural</System:String>
<System:String>es-US-PalomaNeural</System:String>
<System:String>es-UY-MateoNeural</System:String>
<System:String>es-UY-ValentinaNeural</System:String>
<System:String>es-VE-PaolaNeural</System:String>
<System:String>es-VE-SebastianNeural</System:String>
<System:String>et-EE-AnuNeural</System:String>
<System:String>et-EE-KertNeural</System:String>
<System:String>fa-IR-DilaraNeural</System:String>
<System:String>fa-IR-FaridNeural</System:String>
<System:String>fi-FI-HarriNeural</System:String>
<System:String>fi-FI-NooraNeural</System:String>
<System:String>fil-PH-AngeloNeural</System:String>
<System:String>fil-PH-BlessicaNeural</System:String>
<System:String>fr-BE-CharlineNeural</System:String>
<System:String>fr-BE-GerardNeural</System:String>
<System:String>fr-CA-AntoineNeural</System:String>
<System:String>fr-CA-JeanNeural</System:String>
<System:String>fr-CA-SylvieNeural</System:String>
<System:String>fr-CH-ArianeNeural</System:String>
<System:String>fr-CH-FabriceNeural</System:String>
<System:String>fr-FR-DeniseNeural</System:String>
<System:String>fr-FR-EloiseNeural</System:String>
<System:String>fr-FR-HenriNeural</System:String>
<System:String>ga-IE-ColmNeural</System:String>
<System:String>ga-IE-OrlaNeural</System:String>
<System:String>gl-ES-RoiNeural</System:String>
<System:String>gl-ES-SabelaNeural</System:String>
<System:String>gu-IN-DhwaniNeural</System:String>
<System:String>gu-IN-NiranjanNeural</System:String>
<System:String>he-IL-AvriNeural</System:String>
<System:String>he-IL-HilaNeural</System:String>
<System:String>hi-IN-MadhurNeural</System:String>
<System:String>hi-IN-SwaraNeural</System:String>
<System:String>hr-HR-GabrijelaNeural</System:String>
<System:String>hr-HR-SreckoNeural</System:String>
<System:String>hu-HU-NoemiNeural</System:String>
<System:String>hu-HU-TamasNeural</System:String>
<System:String>id-ID-ArdiNeural</System:String>
<System:String>id-ID-GadisNeural</System:String>
<System:String>is-IS-GudrunNeural</System:String>
<System:String>is-IS-GunnarNeural</System:String>
<System:String>it-IT-DiegoNeural</System:String>
<System:String>it-IT-ElsaNeural</System:String>
<System:String>it-IT-IsabellaNeural</System:String>
<System:String>ja-JP-KeitaNeural</System:String>
<System:String>ja-JP-NanamiNeural</System:String>
<System:String>jv-ID-DimasNeural</System:String>
<System:String>jv-ID-SitiNeural</System:String>
<System:String>ka-GE-EkaNeural</System:String>
<System:String>ka-GE-GiorgiNeural</System:String>
<System:String>kk-KZ-AigulNeural</System:String>
<System:String>kk-KZ-DauletNeural</System:String>
<System:String>km-KH-PisethNeural</System:String>
<System:String>km-KH-SreymomNeural</System:String>
<System:String>kn-IN-GaganNeural</System:String>
<System:String>kn-IN-SapnaNeural</System:String>
<System:String>ko-KR-InJoonNeural</System:String>
<System:String>ko-KR-SunHiNeural</System:String>
<System:String>lo-LA-ChanthavongNeural</System:String>
<System:String>lo-LA-KeomanyNeural</System:String>
<System:String>lt-LT-LeonasNeural</System:String>
<System:String>lt-LT-OnaNeural</System:String>
<System:String>lv-LV-EveritaNeural</System:String>
<System:String>lv-LV-NilsNeural</System:String>
<System:String>mk-MK-AleksandarNeural</System:String>
<System:String>mk-MK-MarijaNeural</System:String>
<System:String>ml-IN-MidhunNeural</System:String>
<System:String>ml-IN-SobhanaNeural</System:String>
<System:String>mn-MN-BataaNeural</System:String>
<System:String>mn-MN-YesuiNeural</System:String>
<System:String>mr-IN-AarohiNeural</System:String>
<System:String>mr-IN-ManoharNeural</System:String>
<System:String>ms-MY-OsmanNeural</System:String>
<System:String>ms-MY-YasminNeural</System:String>
<System:String>mt-MT-GraceNeural</System:String>
<System:String>mt-MT-JosephNeural</System:String>
<System:String>my-MM-NilarNeural</System:String>
<System:String>my-MM-ThihaNeural</System:String>
<System:String>nb-NO-FinnNeural</System:String>
<System:String>nb-NO-PernilleNeural</System:String>
<System:String>ne-NP-HemkalaNeural</System:String>
<System:String>ne-NP-SagarNeural</System:String>
<System:String>nl-BE-ArnaudNeural</System:String>
<System:String>nl-BE-DenaNeural</System:String>
<System:String>nl-NL-ColetteNeural</System:String>
<System:String>nl-NL-FennaNeural</System:String>
<System:String>nl-NL-MaartenNeural</System:String>
<System:String>pl-PL-MarekNeural</System:String>
<System:String>pl-PL-ZofiaNeural</System:String>
<System:String>ps-AF-GulNawazNeural</System:String>
<System:String>ps-AF-LatifaNeural</System:String>
<System:String>pt-BR-AntonioNeural</System:String>
<System:String>pt-BR-FranciscaNeural</System:String>
<System:String>pt-PT-DuarteNeural</System:String>
<System:String>pt-PT-RaquelNeural</System:String>
<System:String>ro-RO-AlinaNeural</System:String>
<System:String>ro-RO-EmilNeural</System:String>
<System:String>ru-RU-DmitryNeural</System:String>
<System:String>ru-RU-SvetlanaNeural</System:String>
<System:String>si-LK-SameeraNeural</System:String>
<System:String>si-LK-ThiliniNeural</System:String>
<System:String>sk-SK-LukasNeural</System:String>
<System:String>sk-SK-ViktoriaNeural</System:String>
<System:String>sl-SI-PetraNeural</System:String>
<System:String>sl-SI-RokNeural</System:String>
<System:String>so-SO-MuuseNeural</System:String>
<System:String>so-SO-UbaxNeural</System:String>
<System:String>sq-AL-AnilaNeural</System:String>
<System:String>sq-AL-IlirNeural</System:String>
<System:String>sr-RS-NicholasNeural</System:String>
<System:String>sr-RS-SophieNeural</System:String>
<System:String>su-ID-JajangNeural</System:String>
<System:String>su-ID-TutiNeural</System:String>
<System:String>sv-SE-MattiasNeural</System:String>
<System:String>sv-SE-SofieNeural</System:String>
<System:String>sw-KE-RafikiNeural</System:String>
<System:String>sw-KE-ZuriNeural</System:String>
<System:String>sw-TZ-DaudiNeural</System:String>
<System:String>sw-TZ-RehemaNeural</System:String>
<System:String>ta-IN-PallaviNeural</System:String>
<System:String>ta-IN-ValluvarNeural</System:String>
<System:String>ta-LK-KumarNeural</System:String>
<System:String>ta-LK-SaranyaNeural</System:String>
<System:String>ta-MY-KaniNeural</System:String>
<System:String>ta-MY-SuryaNeural</System:String>
<System:String>ta-SG-AnbuNeural</System:String>
<System:String>ta-SG-VenbaNeural</System:String>
<System:String>te-IN-MohanNeural</System:String>
<System:String>te-IN-ShrutiNeural</System:String>
<System:String>th-TH-NiwatNeural</System:String>
<System:String>th-TH-PremwadeeNeural</System:String>
<System:String>tr-TR-AhmetNeural</System:String>
<System:String>tr-TR-EmelNeural</System:String>
<System:String>uk-UA-OstapNeural</System:String>
<System:String>uk-UA-PolinaNeural</System:String>
<System:String>ur-IN-GulNeural</System:String>
<System:String>ur-IN-SalmanNeural</System:String>
<System:String>ur-PK-AsadNeural</System:String>
<System:String>ur-PK-UzmaNeural</System:String>
<System:String>uz-UZ-MadinaNeural</System:String>
<System:String>uz-UZ-SardorNeural</System:String>
<System:String>vi-VN-HoaiMyNeural</System:String>
<System:String>vi-VN-NamMinhNeural</System:String>
<System:String>zh-CN-XiaoxiaoNeural</System:String>
<System:String>zh-CN-XiaoyiNeural</System:String>
<System:String>zh-CN-YunjianNeural</System:String>
@ -66,12 +352,14 @@
<System:String>zh-TW-HsiaoChenNeural</System:String>
<System:String>zh-TW-HsiaoYuNeural</System:String>
<System:String>zh-TW-YunJheNeural</System:String>
<System:String>zu-ZA-ThandoNeural</System:String>
<System:String>zu-ZA-ThembaNeural</System:String>
</ComboBox>
<Button pu:ButtonHelper.CornerRadius="4" Content="保存设置" Background="{DynamicResource SecondaryLight}"
<Button pu:ButtonHelper.CornerRadius="4" Content="{ll:Str 保存设置}" Background="{DynamicResource SecondaryLight}"
BorderBrush="{DynamicResource SecondaryDark}" BorderThickness="2" Grid.Row="5" Margin="5,5,5,5"
Grid.ColumnSpan="3" Click="Save_Click" />
<Button x:Name="Test" pu:ButtonHelper.CornerRadius="4" Content="测试" Background="{DynamicResource SecondaryLight}"
BorderBrush="{DynamicResource SecondaryDark}" BorderThickness="2" Grid.Row="5" Margin="5,5,5,5"
Grid.ColumnSpan="1" Click="Test_Click" Grid.Column="3" />
<Button x:Name="Test" pu:ButtonHelper.CornerRadius="4" Content="{ll:Str 测试}"
Background="{DynamicResource SecondaryLight}" BorderBrush="{DynamicResource SecondaryDark}"
BorderThickness="2" Grid.Row="5" Margin="5,5,5,5" Grid.ColumnSpan="1" Click="Test_Click" Grid.Column="3" />
</Grid>
</Window>

View File

@ -1,22 +1,10 @@
using EdgeTTS;
using LinePutScript;
using LinePutScript.Converter;
using Newtonsoft.Json.Linq;
using LinePutScript.Localization.WPF;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VPet_Simulator.Core;
namespace VPet.Plugin.VPetTTS
@ -87,7 +75,7 @@ namespace VPet.Plugin.VPetTTS
File.Delete(path);
}
var res = vts.etts.SynthesisAsync($"你好,主人\n现在是 {DateTime.Now}", cbt, pit, rat).Result;
var res = vts.etts.SynthesisAsync("你好,主人\n现在是".Translate() + DateTime.Now, cbt, pit, rat).Result;
if (res.Code == ResultCode.Success)
{
FileStream fs = new FileStream(path, FileMode.OpenOrCreate);
@ -100,7 +88,7 @@ namespace VPet.Plugin.VPetTTS
}
else
{
MessageBox.Show($"错误代码: {res.Code}\n消息: {res.Message}", "生成失败");
MessageBox.Show("错误代码: {0}\n消息: {1}".Translate(res.Code, res.Message), "生成失败".Translate());
}
Dispatcher.Invoke(() => Test.IsEnabled = true);
});