mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
添加代码插件相关支持
This commit is contained in:
parent
ccbe0b56cf
commit
508e4af3c0
@ -28,7 +28,7 @@ namespace VPet_Simulator.Core
|
|||||||
/// 说话
|
/// 说话
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="text">说话内容</param>
|
/// <param name="text">说话内容</param>
|
||||||
public void Say(string text, GraphCore.Helper.SayType type)
|
public void Say(string text, GraphCore.Helper.SayType type = GraphCore.Helper.SayType.Shining)
|
||||||
{
|
{
|
||||||
if (type != GraphCore.Helper.SayType.None && DisplayType == GraphCore.GraphType.Default)
|
if (type != GraphCore.Helper.SayType.None && DisplayType == GraphCore.GraphType.Default)
|
||||||
Display(GraphCore.Helper.Convert(type, GraphCore.Helper.AnimatType.A_Start), () =>
|
Display(GraphCore.Helper.Convert(type, GraphCore.Helper.AnimatType.A_Start), () =>
|
||||||
|
@ -529,7 +529,8 @@ namespace VPet_Simulator.Core
|
|||||||
None,
|
None,
|
||||||
Default,
|
Default,
|
||||||
Serious,
|
Serious,
|
||||||
Shining
|
Shining,
|
||||||
|
Error
|
||||||
}
|
}
|
||||||
public static GraphType Convert(SayType sayType, AnimatType type)
|
public static GraphType Convert(SayType sayType, AnimatType type)
|
||||||
{
|
{
|
||||||
|
13
VPet-Simulator.Windows.Interface/IMainWindow.cs
Normal file
13
VPet-Simulator.Windows.Interface/IMainWindow.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace VPet_Simulator.Windows.Interface
|
||||||
|
{
|
||||||
|
public interface IMainWindow
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -5,7 +5,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
|
||||||
namespace VPet_Simulator.Windows
|
namespace VPet_Simulator.Windows.Interface
|
||||||
{
|
{
|
||||||
public interface ITalkBox
|
public interface ITalkBox
|
||||||
{
|
{
|
36
VPet-Simulator.Windows.Interface/Properties/AssemblyInfo.cs
Normal file
36
VPet-Simulator.Windows.Interface/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// 有关程序集的一般信息由以下
|
||||||
|
// 控制。更改这些特性值可修改
|
||||||
|
// 与程序集关联的信息。
|
||||||
|
[assembly: AssemblyTitle("VPet-Simulator.Windows.Interface")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("VPet-Simulator.Windows.Interface")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2023")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||||
|
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||||
|
//请将此类型的 ComVisible 特性设置为 true。
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||||
|
[assembly: Guid("dcad838a-1a02-4bdf-962c-fd47c6006d28")]
|
||||||
|
|
||||||
|
// 程序集的版本信息由下列四个值组成:
|
||||||
|
//
|
||||||
|
// 主版本
|
||||||
|
// 次版本
|
||||||
|
// 生成号
|
||||||
|
// 修订号
|
||||||
|
//
|
||||||
|
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||||
|
//通过使用 "*",如下所示:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@ -6,7 +6,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace VPet_Simulator.Windows
|
namespace VPet_Simulator.Windows.Interface
|
||||||
{
|
{
|
||||||
public class Setting : LpsDocument
|
public class Setting : LpsDocument
|
||||||
{
|
{
|
@ -0,0 +1,55 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{DCAD838A-1A02-4BDF-962C-FD47C6006D28}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>VPet_Simulator.Windows.Interface</RootNamespace>
|
||||||
|
<AssemblyName>VPet-Simulator.Windows.Interface</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="LinePutScript, Version=1.5.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\LinePutScript.1.6.1\lib\net462\LinePutScript.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Class1.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Setting.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
4
VPet-Simulator.Windows.Interface/packages.config
Normal file
4
VPet-Simulator.Windows.Interface/packages.config
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="LinePutScript" version="1.6.1" targetFramework="net462" />
|
||||||
|
</packages>
|
15
VPet-Simulator.Windows/Function/Reply.mbconfig
Normal file
15
VPet-Simulator.Windows/Function/Reply.mbconfig
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"Scenario": "TextClassification",
|
||||||
|
"Environment": {
|
||||||
|
"Type": "LocalCPU",
|
||||||
|
"Version": 1
|
||||||
|
},
|
||||||
|
"Type": "TrainingConfig",
|
||||||
|
"Version": 4,
|
||||||
|
"TrainingOption": {
|
||||||
|
"Version": 0,
|
||||||
|
"Type": "TextClassficationTrainingOption",
|
||||||
|
"TrainingTime": 0,
|
||||||
|
"Seed": 0
|
||||||
|
}
|
||||||
|
}
|
@ -7,11 +7,14 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Controls;
|
||||||
using VPet_Simulator.Core;
|
using VPet_Simulator.Core;
|
||||||
|
using VPet_Simulator.Windows.Interface;
|
||||||
|
using ToolBar = VPet_Simulator.Core.ToolBar;
|
||||||
|
|
||||||
namespace VPet_Simulator.Windows
|
namespace VPet_Simulator.Windows
|
||||||
{
|
{
|
||||||
public partial class MainWindow
|
public partial class MainWindow : IMainWindow
|
||||||
{
|
{
|
||||||
public readonly string ModPath = Environment.CurrentDirectory + @"\mod";
|
public readonly string ModPath = Environment.CurrentDirectory + @"\mod";
|
||||||
public readonly bool IsSteamUser;
|
public readonly bool IsSteamUser;
|
||||||
@ -46,7 +49,7 @@ namespace VPet_Simulator.Windows
|
|||||||
File.WriteAllText(AppDomain.CurrentDomain.BaseDirectory + @"\Setting.lps", Set.ToString());
|
File.WriteAllText(AppDomain.CurrentDomain.BaseDirectory + @"\Setting.lps", Set.ToString());
|
||||||
if (Core != null && Core.Save != null)
|
if (Core != null && Core.Save != null)
|
||||||
File.WriteAllText(AppDomain.CurrentDomain.BaseDirectory + @"\Save.lps", Core.Save.ToLine().ToString());
|
File.WriteAllText(AppDomain.CurrentDomain.BaseDirectory + @"\Save.lps", Core.Save.ToLine().ToString());
|
||||||
if(CGPTClient != null)
|
if (CGPTClient != null)
|
||||||
File.WriteAllText(AppDomain.CurrentDomain.BaseDirectory + @"\ChatGPTSetting.json", CGPTClient.Save());
|
File.WriteAllText(AppDomain.CurrentDomain.BaseDirectory + @"\ChatGPTSetting.json", CGPTClient.Save());
|
||||||
}
|
}
|
||||||
public void LoadDIY()
|
public void LoadDIY()
|
||||||
@ -57,7 +60,7 @@ namespace VPet_Simulator.Windows
|
|||||||
}
|
}
|
||||||
public static void RunDIY(string content)
|
public static void RunDIY(string content)
|
||||||
{
|
{
|
||||||
if(content.Contains("://") || content.Contains(@":\"))
|
if (content.Contains("://") || content.Contains(@":\"))
|
||||||
{
|
{
|
||||||
Process.Start(content);
|
Process.Start(content);
|
||||||
}
|
}
|
||||||
@ -66,5 +69,99 @@ namespace VPet_Simulator.Windows
|
|||||||
System.Windows.Forms.SendKeys.SendWait(content);
|
System.Windows.Forms.SendKeys.SendWait(content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RunAction(string action)
|
||||||
|
{
|
||||||
|
switch (action)
|
||||||
|
{
|
||||||
|
case "DisplayNomal":
|
||||||
|
Main.DisplayNomal();
|
||||||
|
break;
|
||||||
|
case "DisplayTouchHead":
|
||||||
|
Main.DisplayTouchHead();
|
||||||
|
break;
|
||||||
|
case "DisplayTouchBody":
|
||||||
|
Main.DisplayTouchBody();
|
||||||
|
break;
|
||||||
|
case "DisplayBoring":
|
||||||
|
Main.DisplayBoring();
|
||||||
|
break;
|
||||||
|
case "DisplaySquat":
|
||||||
|
Main.DisplaySquat();
|
||||||
|
break;
|
||||||
|
case "DisplaySleep":
|
||||||
|
Main.DisplaySleep();
|
||||||
|
break;
|
||||||
|
case "DisplayRaised":
|
||||||
|
Main.DisplayRaised();
|
||||||
|
break;
|
||||||
|
case "DisplayFalled_Left":
|
||||||
|
Main.DisplayFalled_Left();
|
||||||
|
break;
|
||||||
|
case "DisplayFalled_Right":
|
||||||
|
Main.DisplayFalled_Right();
|
||||||
|
break;
|
||||||
|
case "DisplayWalk":
|
||||||
|
if (Function.Rnd.Next(2) == 0)
|
||||||
|
Main.DisplayWalk_Left();
|
||||||
|
else
|
||||||
|
Main.DisplayWalk_Right();
|
||||||
|
break;
|
||||||
|
case "DisplayWalk_Left":
|
||||||
|
Main.DisplayWalk_Left();
|
||||||
|
break;
|
||||||
|
case "DisplayWalk_Right":
|
||||||
|
Main.DisplayWalk_Right();
|
||||||
|
break;
|
||||||
|
case "DisplayCrawl":
|
||||||
|
if (Function.Rnd.Next(2) == 0)
|
||||||
|
Main.DisplayCrawl_Left();
|
||||||
|
else
|
||||||
|
Main.DisplayCrawl_Right();
|
||||||
|
break;
|
||||||
|
case "DisplayCrawl_Left":
|
||||||
|
Main.DisplayCrawl_Left();
|
||||||
|
break;
|
||||||
|
case "DisplayCrawl_Right":
|
||||||
|
Main.DisplayCrawl_Right();
|
||||||
|
break;
|
||||||
|
case "DisplayClimb_Left_UP":
|
||||||
|
Main.DisplayClimb_Left_UP();
|
||||||
|
break;
|
||||||
|
case "DisplayClimb_Left_DOWN":
|
||||||
|
Main.DisplayClimb_Left_DOWN();
|
||||||
|
break;
|
||||||
|
case "DisplayClimb_Right_UP":
|
||||||
|
Main.DisplayClimb_Right_UP();
|
||||||
|
break;
|
||||||
|
case "DisplayClimb_Right_DOWN":
|
||||||
|
Main.DisplayClimb_Right_DOWN();
|
||||||
|
break;
|
||||||
|
case "DisplayClimb_Top_Right":
|
||||||
|
Main.DisplayClimb_Top_Right();
|
||||||
|
break;
|
||||||
|
case "DisplayClimb_Top_Left":
|
||||||
|
Main.DisplayClimb_Top_Left();
|
||||||
|
break;
|
||||||
|
case "DisplayFall":
|
||||||
|
if (Function.Rnd.Next(2) == 0)
|
||||||
|
Main.DisplayFall_Left();
|
||||||
|
else
|
||||||
|
Main.DisplayFall_Right();
|
||||||
|
break;
|
||||||
|
case "DisplayFall_Left":
|
||||||
|
Main.DisplayFall_Left();
|
||||||
|
break;
|
||||||
|
case "DisplayFall_Right":
|
||||||
|
Main.DisplayFall_Right();
|
||||||
|
break;
|
||||||
|
case "DisplayIdel_StateONE":
|
||||||
|
Main.DisplayIdel_StateONE();
|
||||||
|
break;
|
||||||
|
case "DisplayIdel_StateTWO":
|
||||||
|
Main.DisplayIdel_StateTWO();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
<Window x:Class="VPet_Simulator.Windows.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
<pu:WindowX x:Class="VPet_Simulator.Windows.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" ResizeMode="NoResize"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" ResizeMode="NoResize"
|
||||||
|
xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" ShowInTaskbar="False"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" ShowInTaskbar="False"
|
||||||
xmlns:local="clr-namespace:VPet_Simulator.Windows" mc:Ignorable="d" WindowStyle="None" Title="MainWindow"
|
xmlns:local="clr-namespace:VPet_Simulator.Windows" mc:Ignorable="d" WindowStyle="None" Title="MainWindow"
|
||||||
Height="250" Width="250" Background="{x:Null}" Topmost="True" Closed="Window_Closed">
|
Height="250" Width="250" Background="{x:Null}" Topmost="True" Closed="Window_Closed"
|
||||||
|
pu:WindowXCaption.Height="0">
|
||||||
<WindowChrome.WindowChrome>
|
<WindowChrome.WindowChrome>
|
||||||
<WindowChrome GlassFrameThickness="-1" />
|
<WindowChrome GlassFrameThickness="-1" />
|
||||||
</WindowChrome.WindowChrome>
|
</WindowChrome.WindowChrome>
|
||||||
@ -12,4 +14,4 @@
|
|||||||
Content="桌宠加载中" />
|
Content="桌宠加载中" />
|
||||||
<Border x:Name="DisplayGrid" />
|
<Border x:Name="DisplayGrid" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</pu:WindowX>
|
||||||
|
@ -16,13 +16,15 @@ using LinePutScript;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using ChatGPT.API.Framework;
|
using ChatGPT.API.Framework;
|
||||||
using static VPet_Simulator.Core.GraphCore;
|
using static VPet_Simulator.Core.GraphCore;
|
||||||
|
using Panuon.WPF.UI;
|
||||||
|
using VPet_Simulator.Windows.Interface;
|
||||||
|
|
||||||
namespace VPet_Simulator.Windows
|
namespace VPet_Simulator.Windows
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// MainWindow.xaml 的交互逻辑
|
/// MainWindow.xaml 的交互逻辑
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class MainWindow : Window
|
public partial class MainWindow : WindowX
|
||||||
{
|
{
|
||||||
private NotifyIcon notifyIcon;
|
private NotifyIcon notifyIcon;
|
||||||
public System.Timers.Timer AutoSaveTimer = new System.Timers.Timer();
|
public System.Timers.Timer AutoSaveTimer = new System.Timers.Timer();
|
||||||
@ -160,7 +162,7 @@ namespace VPet_Simulator.Windows
|
|||||||
Dispatcher.Invoke(new Action(() => LoadingText.Content = $"尝试加载 MOD数据: {di.Name}"));
|
Dispatcher.Invoke(new Action(() => LoadingText.Content = $"尝试加载 MOD数据: {di.Name}"));
|
||||||
CoreMODs.Add(new CoreMOD(di, this));
|
CoreMODs.Add(new CoreMOD(di, this));
|
||||||
}
|
}
|
||||||
Dispatcher.Invoke(new Action(() => LoadingText.Content = "尝试加载游戏内容"));
|
Dispatcher.Invoke(new Action(() => LoadingText.Content = "尝试加载游戏存档"));
|
||||||
|
|
||||||
//加载游戏内容
|
//加载游戏内容
|
||||||
Core.Controller = new MWController(this);
|
Core.Controller = new MWController(this);
|
||||||
@ -182,7 +184,7 @@ namespace VPet_Simulator.Windows
|
|||||||
LoadingText.Content = "尝试加载动画和生成缓存";
|
LoadingText.Content = "尝试加载动画和生成缓存";
|
||||||
var pl = Pets.Find(x => x.Name == Set.PetGraph);
|
var pl = Pets.Find(x => x.Name == Set.PetGraph);
|
||||||
Core.Graph = pl == null ? Pets[0].Graph() : pl.Graph();
|
Core.Graph = pl == null ? Pets[0].Graph() : pl.Graph();
|
||||||
LoadingText.Content = "正在加载游戏";
|
LoadingText.Content = "正在加载CGPT";
|
||||||
|
|
||||||
winSetting = new winGameSetting(this);
|
winSetting = new winGameSetting(this);
|
||||||
Main = new Main(Core) { };
|
Main = new Main(Core) { };
|
||||||
@ -191,12 +193,12 @@ namespace VPet_Simulator.Windows
|
|||||||
TalkBox = new TalkBox(this);
|
TalkBox = new TalkBox(this);
|
||||||
Main.ToolBar.MainGrid.Children.Add(TalkBox.This);
|
Main.ToolBar.MainGrid.Children.Add(TalkBox.This);
|
||||||
}
|
}
|
||||||
else if (Set["CGPT"][(gbol)"enable"] && !IsSteamUser)
|
else if (Set["CGPT"][(gbol)"enable"])
|
||||||
{
|
{
|
||||||
TalkBox = new TalkBoxAPI(this);
|
TalkBox = new TalkBoxAPI(this);
|
||||||
Main.ToolBar.MainGrid.Children.Add(TalkBox.This);
|
Main.ToolBar.MainGrid.Children.Add(TalkBox.This);
|
||||||
}
|
}
|
||||||
|
LoadingText.Content = "正在加载游戏";
|
||||||
Main.DefaultClickAction = () =>
|
Main.DefaultClickAction = () =>
|
||||||
{
|
{
|
||||||
if (new TimeSpan(DateTime.Now.Ticks - lastclicktime).TotalSeconds > 20)
|
if (new TimeSpan(DateTime.Now.Ticks - lastclicktime).TotalSeconds > 20)
|
||||||
|
@ -222,6 +222,7 @@
|
|||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<None Include="Function\Reply.mbconfig" />
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
<None Include="Properties\Settings.settings">
|
<None Include="Properties\Settings.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
@ -23,6 +23,7 @@ using System.Windows.Media.Imaging;
|
|||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
using VPet_Simulator.Core;
|
using VPet_Simulator.Core;
|
||||||
|
using VPet_Simulator.Windows.Interface;
|
||||||
using Timer = System.Timers.Timer;
|
using Timer = System.Timers.Timer;
|
||||||
|
|
||||||
namespace VPet_Simulator.Windows
|
namespace VPet_Simulator.Windows
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" Height="500" Width="500">
|
xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" Height="500" Width="500">
|
||||||
<Border Background="{DynamicResource PrimaryLighter}" BorderBrush="{DynamicResource Primary}" BorderThickness="5"
|
<Border Background="{DynamicResource SecondaryLighter}" BorderBrush="{DynamicResource Secondary}" BorderThickness="5"
|
||||||
VerticalAlignment="Top" Margin="5,50,5,5" CornerRadius="5" Padding="5">
|
VerticalAlignment="Top" Margin="5,50,5,5" CornerRadius="5" Padding="5">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@ -15,7 +15,7 @@
|
|||||||
<TextBox x:Name="tbTalk" Style="{DynamicResource StandardTextBoxStyle}" Height="Auto"
|
<TextBox x:Name="tbTalk" Style="{DynamicResource StandardTextBoxStyle}" Height="Auto"
|
||||||
pu:TextBoxHelper.Watermark="和桌宠说" FontSize="30" AcceptsReturn="True" TextWrapping="WrapWithOverflow"/>
|
pu:TextBoxHelper.Watermark="和桌宠说" FontSize="30" AcceptsReturn="True" TextWrapping="WrapWithOverflow"/>
|
||||||
<Button pu:ButtonHelper.CornerRadius="4" Content="发送" BorderThickness="2"
|
<Button pu:ButtonHelper.CornerRadius="4" Content="发送" BorderThickness="2"
|
||||||
Background="{DynamicResource SecondaryLight}" Grid.Column="2" BorderBrush="{DynamicResource DARKPrimaryDarker}"
|
Background="{DynamicResource PrimaryLight}" Grid.Column="2" BorderBrush="{DynamicResource DARKPrimaryDarker}"
|
||||||
FontSize="30" Click="SendMessage_Click" />
|
FontSize="30" Click="SendMessage_Click" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
@ -23,6 +23,7 @@ using System.Windows.Media.Imaging;
|
|||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
using VPet_Simulator.Core;
|
using VPet_Simulator.Core;
|
||||||
|
using VPet_Simulator.Windows.Interface;
|
||||||
using Timer = System.Timers.Timer;
|
using Timer = System.Timers.Timer;
|
||||||
|
|
||||||
namespace VPet_Simulator.Windows
|
namespace VPet_Simulator.Windows
|
||||||
|
@ -73,79 +73,7 @@ namespace VPet_Simulator.Windows
|
|||||||
if (DisplayListBox.SelectedItem == null)
|
if (DisplayListBox.SelectedItem == null)
|
||||||
return;
|
return;
|
||||||
LabelSuccess.Content = $"当前正在运行: {(string)((ListBoxItem)DisplayListBox.SelectedItem).Content}";
|
LabelSuccess.Content = $"当前正在运行: {(string)((ListBoxItem)DisplayListBox.SelectedItem).Content}";
|
||||||
switch ((string)((ListBoxItem)DisplayListBox.SelectedItem).Content)
|
mw.RunAction((string)((ListBoxItem)DisplayListBox.SelectedItem).Content);
|
||||||
{
|
|
||||||
case "DisplayNomal":
|
|
||||||
mw.Main.DisplayNomal();
|
|
||||||
break;
|
|
||||||
case "DisplayTouchHead":
|
|
||||||
mw.Main.DisplayTouchHead();
|
|
||||||
break;
|
|
||||||
case "DisplayTouchBody":
|
|
||||||
mw.Main.DisplayTouchBody();
|
|
||||||
break;
|
|
||||||
case "DisplayBoring":
|
|
||||||
mw.Main.DisplayBoring();
|
|
||||||
break;
|
|
||||||
case "DisplaySquat":
|
|
||||||
mw.Main.DisplaySquat();
|
|
||||||
break;
|
|
||||||
case "DisplaySleep":
|
|
||||||
mw.Main.DisplaySleep();
|
|
||||||
break;
|
|
||||||
case "DisplayRaised":
|
|
||||||
mw.Main.DisplayRaised();
|
|
||||||
break;
|
|
||||||
case "DisplayFalled_Left":
|
|
||||||
mw.Main.DisplayFalled_Left();
|
|
||||||
break;
|
|
||||||
case "DisplayFalled_Right":
|
|
||||||
mw.Main.DisplayFalled_Right();
|
|
||||||
break;
|
|
||||||
case "DisplayWalk_Left":
|
|
||||||
mw.Main.DisplayWalk_Left();
|
|
||||||
break;
|
|
||||||
case "DisplayWalk_Right":
|
|
||||||
mw.Main.DisplayWalk_Right();
|
|
||||||
break;
|
|
||||||
case "DisplayCrawl_Left":
|
|
||||||
mw.Main.DisplayCrawl_Left();
|
|
||||||
break;
|
|
||||||
case "DisplayCrawl_Right":
|
|
||||||
mw.Main.DisplayCrawl_Right();
|
|
||||||
break;
|
|
||||||
case "DisplayClimb_Left_UP":
|
|
||||||
mw.Main.DisplayClimb_Left_UP();
|
|
||||||
break;
|
|
||||||
case "DisplayClimb_Left_DOWN":
|
|
||||||
mw.Main.DisplayClimb_Left_DOWN();
|
|
||||||
break;
|
|
||||||
case "DisplayClimb_Right_UP":
|
|
||||||
mw.Main.DisplayClimb_Right_UP();
|
|
||||||
break;
|
|
||||||
case "DisplayClimb_Right_DOWN":
|
|
||||||
mw.Main.DisplayClimb_Right_DOWN();
|
|
||||||
break;
|
|
||||||
case "DisplayClimb_Top_Right":
|
|
||||||
mw.Main.DisplayClimb_Top_Right();
|
|
||||||
break;
|
|
||||||
case "DisplayClimb_Top_Left":
|
|
||||||
mw.Main.DisplayClimb_Top_Left();
|
|
||||||
break;
|
|
||||||
case "DisplayFall_Left":
|
|
||||||
mw.Main.DisplayFall_Left();
|
|
||||||
break;
|
|
||||||
case "DisplayFall_Right":
|
|
||||||
mw.Main.DisplayFall_Right();
|
|
||||||
break;
|
|
||||||
case "DisplayIdel_StateONE":
|
|
||||||
mw.Main.DisplayIdel_StateONE();
|
|
||||||
break;
|
|
||||||
case "DisplayIdel_StateTWO":
|
|
||||||
mw.Main.DisplayIdel_StateTWO();
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Say_Click(object sender, RoutedEventArgs e)
|
private void Say_Click(object sender, RoutedEventArgs e)
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 189 KiB |
28
VPet.sln
28
VPet.sln
@ -9,38 +9,66 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VPet-Simulator.Tool", "VPet
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VPet-Simulator.Windows", "VPet-Simulator.Windows\VPet-Simulator.Windows.csproj", "{B5C2DD17-735F-4F9F-82E4-B8692AEC03F1}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VPet-Simulator.Windows", "VPet-Simulator.Windows\VPet-Simulator.Windows.csproj", "{B5C2DD17-735F-4F9F-82E4-B8692AEC03F1}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VPet-Simulator.Windows.Interface", "VPet-Simulator.Windows.Interface\VPet-Simulator.Windows.Interface.csproj", "{DCAD838A-1A02-4BDF-962C-FD47C6006D28}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
Debug|x64 = Debug|x64
|
Debug|x64 = Debug|x64
|
||||||
Debug|x86 = Debug|x86
|
Debug|x86 = Debug|x86
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
Release|x64 = Release|x64
|
Release|x64 = Release|x64
|
||||||
Release|x86 = Release|x86
|
Release|x86 = Release|x86
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Debug|x64.ActiveCfg = Debug|x64
|
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Debug|x64.Build.0 = Debug|x64
|
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Debug|x64.Build.0 = Debug|x64
|
||||||
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Debug|x86.ActiveCfg = Debug|x86
|
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Debug|x86.Build.0 = Debug|x86
|
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Release|x64.ActiveCfg = Release|x64
|
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Release|x64.ActiveCfg = Release|x64
|
||||||
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Release|x64.Build.0 = Release|x64
|
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Release|x64.Build.0 = Release|x64
|
||||||
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Release|x86.ActiveCfg = Release|x86
|
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Release|x86.ActiveCfg = Release|x86
|
||||||
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Release|x86.Build.0 = Release|x86
|
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Release|x86.Build.0 = Release|x86
|
||||||
|
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Debug|x64.ActiveCfg = Debug|x64
|
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Debug|x64.Build.0 = Debug|x64
|
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Debug|x64.Build.0 = Debug|x64
|
||||||
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Debug|x86.ActiveCfg = Debug|x86
|
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Debug|x86.Build.0 = Debug|x86
|
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Release|x64.ActiveCfg = Release|x64
|
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Release|x64.ActiveCfg = Release|x64
|
||||||
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Release|x64.Build.0 = Release|x64
|
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Release|x64.Build.0 = Release|x64
|
||||||
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Release|x86.ActiveCfg = Release|x86
|
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Release|x86.ActiveCfg = Release|x86
|
||||||
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Release|x86.Build.0 = Release|x86
|
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Release|x86.Build.0 = Release|x86
|
||||||
|
{B5C2DD17-735F-4F9F-82E4-B8692AEC03F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{B5C2DD17-735F-4F9F-82E4-B8692AEC03F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{B5C2DD17-735F-4F9F-82E4-B8692AEC03F1}.Debug|x64.ActiveCfg = Debug|x64
|
{B5C2DD17-735F-4F9F-82E4-B8692AEC03F1}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{B5C2DD17-735F-4F9F-82E4-B8692AEC03F1}.Debug|x64.Build.0 = Debug|x64
|
{B5C2DD17-735F-4F9F-82E4-B8692AEC03F1}.Debug|x64.Build.0 = Debug|x64
|
||||||
{B5C2DD17-735F-4F9F-82E4-B8692AEC03F1}.Debug|x86.ActiveCfg = Debug|x86
|
{B5C2DD17-735F-4F9F-82E4-B8692AEC03F1}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
{B5C2DD17-735F-4F9F-82E4-B8692AEC03F1}.Debug|x86.Build.0 = Debug|x86
|
{B5C2DD17-735F-4F9F-82E4-B8692AEC03F1}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{B5C2DD17-735F-4F9F-82E4-B8692AEC03F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{B5C2DD17-735F-4F9F-82E4-B8692AEC03F1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{B5C2DD17-735F-4F9F-82E4-B8692AEC03F1}.Release|x64.ActiveCfg = Release|x64
|
{B5C2DD17-735F-4F9F-82E4-B8692AEC03F1}.Release|x64.ActiveCfg = Release|x64
|
||||||
{B5C2DD17-735F-4F9F-82E4-B8692AEC03F1}.Release|x64.Build.0 = Release|x64
|
{B5C2DD17-735F-4F9F-82E4-B8692AEC03F1}.Release|x64.Build.0 = Release|x64
|
||||||
{B5C2DD17-735F-4F9F-82E4-B8692AEC03F1}.Release|x86.ActiveCfg = Release|x86
|
{B5C2DD17-735F-4F9F-82E4-B8692AEC03F1}.Release|x86.ActiveCfg = Release|x86
|
||||||
{B5C2DD17-735F-4F9F-82E4-B8692AEC03F1}.Release|x86.Build.0 = Release|x86
|
{B5C2DD17-735F-4F9F-82E4-B8692AEC03F1}.Release|x86.Build.0 = Release|x86
|
||||||
|
{DCAD838A-1A02-4BDF-962C-FD47C6006D28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{DCAD838A-1A02-4BDF-962C-FD47C6006D28}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{DCAD838A-1A02-4BDF-962C-FD47C6006D28}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{DCAD838A-1A02-4BDF-962C-FD47C6006D28}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{DCAD838A-1A02-4BDF-962C-FD47C6006D28}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{DCAD838A-1A02-4BDF-962C-FD47C6006D28}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{DCAD838A-1A02-4BDF-962C-FD47C6006D28}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{DCAD838A-1A02-4BDF-962C-FD47C6006D28}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{DCAD838A-1A02-4BDF-962C-FD47C6006D28}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{DCAD838A-1A02-4BDF-962C-FD47C6006D28}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{DCAD838A-1A02-4BDF-962C-FD47C6006D28}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{DCAD838A-1A02-4BDF-962C-FD47C6006D28}.Release|x86.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
Loading…
Reference in New Issue
Block a user