From 33e7656415579fc77e10f10f23a8bc7667cd226a Mon Sep 17 00:00:00 2001 From: ZouJin Date: Sun, 5 Mar 2023 03:03:51 +1100 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5ChatGPT=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Windows/MainWindow.xaml.cs | 6 ++ .../VPet-Simulator.Windows.csproj | 7 ++ VPet-Simulator.Windows/WinDesign/TalkBox.xaml | 22 +++++ .../WinDesign/TalkBox.xaml.cs | 94 +++++++++++++++++++ 4 files changed, 129 insertions(+) create mode 100644 VPet-Simulator.Windows/WinDesign/TalkBox.xaml create mode 100644 VPet-Simulator.Windows/WinDesign/TalkBox.xaml.cs diff --git a/VPet-Simulator.Windows/MainWindow.xaml.cs b/VPet-Simulator.Windows/MainWindow.xaml.cs index 2fc95b6..701dd78 100644 --- a/VPet-Simulator.Windows/MainWindow.xaml.cs +++ b/VPet-Simulator.Windows/MainWindow.xaml.cs @@ -24,6 +24,7 @@ namespace VPet_Simulator.Windows { private NotifyIcon notifyIcon; public System.Timers.Timer AutoSaveTimer = new System.Timers.Timer(); + public TalkBox TalkBox; public MainWindow() { //判断是不是Steam用户,因为本软件会发布到Steam @@ -154,6 +155,11 @@ namespace VPet_Simulator.Windows winSetting = new winGameSetting(this); Main = new Main(Core) { }; + if (IsSteamUser) + { + TalkBox = new TalkBox(Main); + Main.ToolBar.MainGrid.Children.Add(TalkBox); + } Main.DefaultClickAction = () => { diff --git a/VPet-Simulator.Windows/VPet-Simulator.Windows.csproj b/VPet-Simulator.Windows/VPet-Simulator.Windows.csproj index 31fee80..79c0ca4 100644 --- a/VPet-Simulator.Windows/VPet-Simulator.Windows.csproj +++ b/VPet-Simulator.Windows/VPet-Simulator.Windows.csproj @@ -116,6 +116,9 @@ + + TalkBox.xaml + winCharacterPanel.xaml @@ -149,6 +152,10 @@ MainWindow.xaml Code + + MSBuild:Compile + Designer + Designer MSBuild:Compile diff --git a/VPet-Simulator.Windows/WinDesign/TalkBox.xaml b/VPet-Simulator.Windows/WinDesign/TalkBox.xaml new file mode 100644 index 0000000..b5ad85d --- /dev/null +++ b/VPet-Simulator.Windows/WinDesign/TalkBox.xaml @@ -0,0 +1,22 @@ + + + + + + + + + +