diff --git a/.editorconfig b/.editorconfig index adcd2ed..5f3f6ee 100644 --- a/.editorconfig +++ b/.editorconfig @@ -5,3 +5,5 @@ dotnet_diagnostic.CS1591.severity = suggestion dotnet_diagnostic.CS1573.severity = suggestion dotnet_diagnostic.CS1570.severity = suggestion +# CS8632: 只能在 "#nullable" 注释上下文内的代码中使用可为 null 的引用类型的注释。 +dotnet_diagnostic.CS8632.severity = suggestion diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b31d69a..e8dcbef 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -简体中文 | [English](./CONTRIBUTING_en.md) +简体中文 | [繁體中文](./CONTRIBUTING_zht.md) | [English](./CONTRIBUTING_en.md) ## 参与开发 diff --git a/CONTRIBUTING_en.md b/CONTRIBUTING_en.md index 820a9b4..996ee24 100644 --- a/CONTRIBUTING_en.md +++ b/CONTRIBUTING_en.md @@ -1,6 +1,6 @@ # Contributing -[简体中文](./CONTRIBUTING.md) | English +[简体中文](./CONTRIBUTING.md) | [繁體中文](./CONTRIBUTING_zht.md) | English Welcome to participate in development! To ensure code maintainability and playability, if you wish to develop new features or gameplay, please first contact me (by sending a [mail](mailto:zoujin.dev@exlb.org) or opening an [Issue](https://github.com/LorisYounger/VPet/issues/new)) with your idea. This is to make sure your contribution fits the game, and will not get outright rejected for being unfitting (causing your effort to be wasted). You don't need to contact me regarding fixing errors or bugs - simply send a PR in that case. @@ -88,4 +88,4 @@ You **must** inform users of the source of our animation files, and provide a li * All of the above authorization information **must** be disclosed. * You **must** provide a link to [this page](https://github.com/LorisYounger/VPet). -* **No** profit should be made with our files. \ No newline at end of file +* **No** profit should be made with our files. diff --git a/CONTRIBUTING_zht.md b/CONTRIBUTING_zht.md new file mode 100644 index 0000000..7f0db07 --- /dev/null +++ b/CONTRIBUTING_zht.md @@ -0,0 +1,89 @@ +[简体中文](./CONTRIBUTING.md) | 繁體中文 | [English](./CONTRIBUTING_en.md) + +## 參與開發 + +歡迎參與虛擬桌寵模擬器的開發!為了保證程式碼的可維護性及遊戲性,若想要開發新的功能,請先[電子郵件聯絡](mailto:zoujin.dev@exlb.org)或提交[Issue](https://github.com/LorisYounger/VPet/issues),標題為想要新增的功能/玩法,以確保該功能/玩法適用於虛擬桌寵模擬器,以免在您完成開發後,因不適合而被拒絕(而浪費您的時間)。
+如果是修正錯誤或BUG,則不需要先行聯絡,修好後直接提交即可。 + +當您提供的想法被贊同後,您可以使用[Fork](https://github.com/LorisYounger/VPet/fork)功能,將專案程式碼整個複製至個人的Github上,以便撰寫自己的程式碼。撰寫完畢後,使用[Pull Requests](https://github.com/LorisYounger/VPet/compare)提交。
+若您的想法並未被同意,也可以另起爐灶,開發一個不同版本及功能的桌寵軟體。須遵守[Apache License 2.0](https://github.com/LorisYounger/VPet/blob/main/LICENSE)及[動畫版權聲明與授權](https://github.com/LorisYounger/VPet/blob/main/README_zht.md#%E5%8B%95%E7%95%AB%E7%89%88%E6%AC%8A%E8%81%B2%E6%98%8E%E8%88%87%E6%8E%88%E6%AC%8A)。
+註:一般而言,加入新功能都可以透過撰寫模組來達成,詳情請見:[VPet.Plugin.Demo](https://github.com/LorisYounger/VPet.Plugin.Demo) + +作者可能會修改、刪減部分您所提交的程式碼,以確保該功能/玩法適用於虛擬桌寵模擬器。 + +## 動畫版權聲明與授權 + +在Github中,[桌寵動畫檔案](https://github.com/LorisYounger/VPet/tree/main/VPet-Simulator.Windows/mod/0000_core/pet/vup)之動畫版權歸[虛擬主播模擬器製作組](https://www.exlb.net/VUP-Simulator)所有,在使用本類別庫時,您可能會需要自行準備動畫檔,或遵循下列協定: + +### 非商業用途授權 + +* 需要向使用者告知動畫檔案的來源,並提供造訪[本頁面](https://github.com/LorisYounger/VPet)的連結 +* 當您完成上述要求後,可以免費使用動畫檔案 + +### 商業用途授權(低於10萬) + +* 在使用者第一次使用時,需跳出視窗,並醒目向使用者告知動畫檔案的來源,並提供造訪[本頁面](https://github.com/LorisYounger/VPet)的連結 +* 在對應的頁面上(使用者能快速造訪的),向使用者告知動畫檔案的來源,並提供造訪[本頁面](https://github.com/LorisYounger/VPet)的連結 +* 當您完成上述要求後,可以免費使用動畫檔案 + +### 商業用途授權(高於10萬或其他) + +* 請[電子郵件聯絡](mailto:zoujin.dev@exlb.org)本軟體作者 + +### 轉發動畫檔案 + +* 需要告知上述所有授權資訊 +* 需要提供造訪[本頁面](https://github.com/LorisYounger/VPet)的連結 +* 轉發動畫檔案時,禁止任何付費或收費行為 + +## 桌面應用程式部署方式 + +1. 下載本專案,透過VisualStudio開啟`VPet.sln`檔案 +2. 在「建置」選項中,選擇位元數`x64`及建置專案`Vpet-Simulator.Windows` + ![image-20230208004330895](README.assets/image-20230208004330895.png) +3. 點擊「開始」,若一切順利將會報錯`缺少Core模組,無法啟動桌寵` +4. 以管理員身分執行`mklink.bat`,這會讓模組檔案連結至產生的位置 +5. 再次點擊啟動即可正常執行 + +## 軟體架構 + +* **VPet-Simulator.Windows: 適用於桌面端的虛擬桌寵模擬器** + * *Function 功能性程式碼儲存位置* + * CoreMOD 模組管理 + * MWController 視窗控制器 + + * *WinDesign 視窗及UI設計 + * winBetterBuy 更好買視窗 + * winCGPTSetting ChatGPT設定 + * winSetting 軟體設定、模組視窗 + * winConsole 開發控制台 + * winGameSetting 遊戲設定 + * winReport 意見回饋中心 + + * MainWindows 主視窗、儲存及展示Core + * PetHelper 快速切換圖示 +* **VPet-Simulator.Tool: 方便製作模組的工具(例如:產生動態圖片)** +* **VPet-Simulator.Core: 軟體核心,方便內建至任何的WPF應用程式(例如:VUP-Simulator)** + * Handle 介面及控制項 + * IController 視窗控制(呼叫相關功能及設定,例如:移動到側邊等) + * Function 通用功能 + * GameCore 遊戲核心,包含各種資料數據等內容 + * GameSave 遊戲存檔 + * IFood 食物及物品介面 + * PetLoader 寵物圖片載入器 + * Graph 圖形渲染 + * IGraph 動畫基本介面 + * GraphCore 動畫顯示核心 + * GraphHelper 動畫幫助 + * GraphInfo 動畫資訊 + * FoodAnimation 食物動畫,支援顯示前中後三層夾心動畫,不一定只用於食物,只是叫這個名字 + * PNGAnimation 桌寵動態動畫元件 + * Picture 桌寵靜態動畫元件 + * Display 顯示 + * basestyle/Theme 基礎風格主題 + * Main.xaml 核心顯示元件 + * MainDisplay 核心顯示方法 + * MainLogic 核心顯示邏輯 + * ToolBar 點擊人物時的工具欄 + * MessageBar 人物說話時的對話框 + * WorkTimer 運作計時器 diff --git a/README.md b/README.md index 5c14df4..e10ba54 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # VPet-Simulator -简体中文 | [English](./README_en.md) | [日本語](./README_ja.md) +简体中文 | [繁體中文](./README_zht.md) | [English](./README_en.md) | [日本語](./README_ja.md) 虚拟桌宠模拟器 一个开源的桌宠软件, 可以内置到任何WPF应用程序 @@ -49,6 +49,8 @@ 该游戏支持创意工坊,您可以制作别的人物桌宠动画或者互动,并上传至创意工坊分享给更多人使用. +MOD制作器: https://github.com/LorisYounger/VPet.ModMaker + 创意工坊支持添加/修改以下内容 * 桌宠动画 @@ -163,4 +165,4 @@ ![image-20230208004330895](README.assets/image-20230208004330895.png) 3. 点击启动, 如果一切正常则会报错 `缺少模组Core,无法启动桌宠` 4. 以管理员身份运行 `mklink.bat`, 这会让mod文件链接到生成位置 -5. 再次点击启动即可正常运行 \ No newline at end of file +5. 再次点击启动即可正常运行 diff --git a/README_en.md b/README_en.md index 260e3a9..dcd0f95 100644 --- a/README_en.md +++ b/README_en.md @@ -1,6 +1,6 @@ # VPet -[简体中文](./README.md) | English | [日本語](./README_ja.md) +[简体中文](./README.md) | [繁體中文](./README_zht.md) | English | [日本語](./README_ja.md) ![Header](README.assets/%E4%B8%BB%E5%9B%BE.png) @@ -47,6 +47,8 @@ Feature requests and pull requests are welcome! You can take our code and modify Steam Workshop mods are supported. With mods, you can add your own pets (animations/interactions), and share them with others through the Workshop. +MOD Maker: https://github.com/LorisYounger/VPet.ModMaker + The following contents can be added or modified by Workshop mods: * Pet animations diff --git a/README_ja.md b/README_ja.md index 5afaf78..4e7fa1a 100644 --- a/README_ja.md +++ b/README_ja.md @@ -1,6 +1,6 @@ # VPet -[简体中文](./README.md) | [English](./README_en.md) | 日本語 +[简体中文](./README.md) | [繁體中文](./README_zht.md) | [English](./README_en.md) | 日本語 ![Header](README.assets/%E4%B8%BB%E5%9B%BE.png) @@ -47,6 +47,8 @@ VPet を [Steam で](https://store.steampowered.com/app/1920960/VPet)無料で Steam Workshop の MOD に対応しています。MOD を使用すると、独自のペット(アニメーション/インタラクション)を追加したり、Workshop を通じて他の人と共有したりすることができます。 +MOD プロデューサ: https://github.com/LorisYounger/VPet.ModMaker + 以下のコンテンツは、Workshop の MOD によって追加または変更することができます: * ペットアニメーション diff --git a/README_zht.md b/README_zht.md new file mode 100644 index 0000000..bab1a73 --- /dev/null +++ b/README_zht.md @@ -0,0 +1,167 @@ +# VPet-Simulator + +简体中文(./README.md) | 繁體中文 | [English](./README_en.md) | [日本語](./README_ja.md) + +《虛擬桌寵模擬器》一個開源的桌寵軟體,可以內建至任何WPF應用程式中。 + +![主圖](README.assets/%E4%B8%BB%E5%9B%BE.png) + +在[Steam](https://store.steampowered.com/app/1920960/VPet)上取得虛擬桌寵模擬器(免費),或透過[Nuget](https://www.nuget.org/packages/VPet-Simulator.Core)內建至應用程式中。 + +## 虛擬桌寵模擬器 - 詳細介紹 + +虛擬桌寵模擬器是一款桌寵軟體,支援各種互動,例如投餵等。開源、並支援工作坊。 + +既然都是免費的,那為何不試試呢? + +本遊戲從[虛擬主播模擬器](https://store.steampowered.com/app/1352140/_/)之桌寵功能獨立出來,如果喜歡,歡迎將[虛擬主播模擬器](https://store.steampowered.com/app/1352140/_/)加入至您的願望清單中。 + +### 超多的互動及動畫 + +多達32(種類)×4(狀態)×3(類型)種動畫。
+*註:部分種類並未有生病或循環等內容,實際上會略低於此數值。* + +#### 動畫範例: + +##### 摸頭 + +![ss0](README.assets/ss0.gif) + +##### 提起 + +![ss4](README.assets/ss4.gif)![ss4](README.assets/ss8.gif) + +##### 爬牆 + +![ss7](README.assets/ss7.gif) + +### 免費 + +本遊戲完全免費!既然都不用錢,那就試試看吧!
+本遊戲主要目的為宣傳[虛擬主播模擬器](https://store.steampowered.com/app/1352140/_/)中的Q版人物主角。 + +### 開源 + +本遊戲於Github上開源,歡迎提出自己的想法、創意,或直接參與開發!
+您還可以修改原始碼來製作自己專屬的桌寵!(雖然說大部分內容支援工作坊,毋須修改程式碼)
+專案位置:https://github.com/LorisYounger/VPet + +### 支援工作坊 + +本遊戲支援工作坊,您可以自行製作桌寵角色、動畫或互動內容,並上傳至工作坊中分享給更多人使用。 + +模組製作器:https://github.com/LorisYounger/VPet.ModMaker + +工作坊支援加入/修改下列內容 + +* 桌寵動畫 +* 物品/食品/飲料等 +* 自訂桌寵工作內容 +* 對話內容 +* 主題 +* 程式碼外掛:編撰程式碼來加入新內容 + * 加入新的動畫邏輯或顯示效果(例如:l2d/spine等) + * 加入新功能(鬧鐘、記事本等) + * 幾乎無所不能,範例請見[VPet.Plugin.Demo](https://github.com/LorisYounger/VPet.Plugin.Demo) + +###聯絡我們 + +若有建議或意見,可以在Steam商店、Steam社群中評論,在Github發Issue,使用虛擬桌寵模擬器QQ群(907101442)或電子郵件[mailto:service@exlb.net](mailto:service@exlb.net)聯絡作者。 + + +## 軟體架構 + +* **VPet-Simulator.Windows: 適用於桌面端的虛擬桌寵模擬器** + * *Function 功能性程式碼儲存位置* + * CoreMOD 模組管理 + * MWController 視窗控制器 + + * *WinDesign 視窗及UI設計 + * winBetterBuy 更好買視窗 + * winCGPTSetting ChatGPT設定 + * winSetting 軟體設定、模組視窗 + * winConsole 開發控制台 + * winGameSetting 遊戲設定 + * winReport 意見回饋中心 + + * MainWindows 主視窗、儲存及展示Core + * PetHelper 快速切換圖示 +* **VPet-Simulator.Tool: 方便製作模組的工具(例如:產生動態圖片)** +* **VPet-Simulator.Core: 軟體核心,方便內建至任何的WPF應用程式(例如:VUP-Simulator)** + * Handle 介面及控制項 + * IController 視窗控制(呼叫相關功能及設定,例如:移動到側邊等) + * Function 通用功能 + * GameCore 遊戲核心,包含各種資料數據等內容 + * GameSave 遊戲存檔 + * IFood 食物及物品介面 + * PetLoader 寵物圖片載入器 + * Graph 圖形渲染 + * IGraph 動畫基本介面 + * GraphCore 動畫顯示核心 + * GraphHelper 動畫幫助 + * GraphInfo 動畫資訊 + * FoodAnimation 食物動畫,支援顯示前中後三層夾心動畫,不一定只用於食物,只是叫這個名字 + * PNGAnimation 桌寵動態動畫元件 + * Picture 桌寵靜態動畫元件 + * Display 顯示 + * basestyle/Theme 基礎風格主題 + * Main.xaml 核心顯示元件 + * MainDisplay 核心顯示方法 + * MainLogic 核心顯示邏輯 + * ToolBar 點擊人物時的工具欄 + * MessageBar 人物說話時的對話框 + * WorkTimer 運作計時器 + + +## 參與開發 + +歡迎參與虛擬桌寵模擬器的開發!為了保證程式碼的可維護性及遊戲性,若想要開發新的功能,請先[電子郵件聯絡](mailto:zoujin.dev@exlb.org)或提交[Issue](https://github.com/LorisYounger/VPet/issues),標題為想要新增的功能/玩法,以確保該功能/玩法適用於虛擬桌寵模擬器,以免在您完成開發後,因不適合而被拒絕(而浪費您的時間)。
+如果是修正錯誤或BUG,則不需要先行聯絡,修好後直接提交即可。 + +當您提供的想法被贊同後,您可以使用[Fork](https://github.com/LorisYounger/VPet/fork)功能,將專案程式碼整個複製至個人的Github上,以便撰寫自己的程式碼。撰寫完畢後,使用[Pull Requests](https://github.com/LorisYounger/VPet/compare)提交。
+若您的想法並未被同意,也可以另起爐灶,開發一個不同版本及功能的桌寵軟體。須遵守[Apache License 2.0](https://github.com/LorisYounger/VPet/blob/main/LICENSE)及[動畫版權聲明與授權](https://github.com/LorisYounger/VPet/blob/main/README_zht.md#%E5%8B%95%E7%95%AB%E7%89%88%E6%AC%8A%E8%81%B2%E6%98%8E%E8%88%87%E6%8E%88%E6%AC%8A)。
+註:一般而言,加入新功能都可以透過撰寫模組來達成,詳情請見:[VPet.Plugin.Demo](https://github.com/LorisYounger/VPet.Plugin.Demo) + +作者可能會修改、刪減部分您所提交的程式碼,以確保該功能/玩法適用於虛擬桌寵模擬器。 + + +感謝下列參與的開發及翻譯人員 + + + + + +以及提供社群翻譯與更多內容的工作坊作者 + +## 動畫版權聲明與授權 + +在Github中,[桌寵動畫檔案](https://github.com/LorisYounger/VPet/tree/main/VPet-Simulator.Windows/mod/0000_core/pet/vup)之動畫版權歸[虛擬主播模擬器製作組](https://www.exlb.net/VUP-Simulator)所有,在使用本類別庫時,您可能會需要自行準備動畫檔,或遵循下列協定:
+*註:本聲明只限於桌寵自帶的動畫,其餘經工作坊等方式額外加入的內容並不適用* + +### 非商業用途授權 + +* 需要向使用者告知動畫檔案的來源,並提供造訪[本頁面](https://github.com/LorisYounger/VPet)的連結 +* 當您完成上述要求後,可以免費使用動畫檔案 + +### 商業用途授權(低於10萬) + +* 在使用者第一次使用時,需跳出視窗,並醒目向使用者告知動畫檔案的來源,並提供造訪[本頁面](https://github.com/LorisYounger/VPet)的連結 +* 在對應的頁面上(使用者能快速造訪的),向使用者告知動畫檔案的來源,並提供造訪[本頁面](https://github.com/LorisYounger/VPet)的連結 +* 不得透過出售動畫檔案營利 +* 請[電子郵件聯絡](mailto:zoujin.dev@exlb.org)本軟體作者 +* 當您完成上述要求後,可以免費使用動畫檔案 + +### 轉發動畫檔案 + +* 需要告知上述所有授權資訊 +* 需要提供造訪[本頁面](https://github.com/LorisYounger/VPet)的連結 +* 轉發動畫檔案時,禁止任何付費或收費行為 + +## 桌面應用程式部署方式 + +1. 下載本專案,透過VisualStudio開啟`VPet.sln`檔案 +2. 在「建置」選項中,選擇位元數`x64`及建置專案`Vpet-Simulator.Windows` + ![image-20230208004330895](README.assets/image-20230208004330895.png) +3. 點擊「開始」,若一切順利將會報錯`缺少Core模組,無法啟動桌寵` +4. 以管理員身分執行`mklink.bat`,這會讓模組檔案連結至產生的位置 +5. 再次點擊啟動即可正常執行 diff --git a/VPet-Simulator.Core/Display/Theme.xaml b/VPet-Simulator.Core/Display/Theme.xaml index a3d43df..32e6bd5 100644 --- a/VPet-Simulator.Core/Display/Theme.xaml +++ b/VPet-Simulator.Core/Display/Theme.xaml @@ -1,42 +1,43 @@ - - - - - - + + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - #90caf9 + #90caf9 \ No newline at end of file diff --git a/VPet-Simulator.Core/Display/basestyle.xaml b/VPet-Simulator.Core/Display/basestyle.xaml index a41cbee..3a42767 100644 --- a/VPet-Simulator.Core/Display/basestyle.xaml +++ b/VPet-Simulator.Core/Display/basestyle.xaml @@ -1,305 +1,364 @@ - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - + - + - - - + - + - + - + - + - + - - - - - - + - + + + + + + - + - + + + + + + \ No newline at end of file diff --git a/VPet-Simulator.Core/Handle/Function.cs b/VPet-Simulator.Core/Handle/Function.cs index 943d1d3..1e72700 100644 --- a/VPet-Simulator.Core/Handle/Function.cs +++ b/VPet-Simulator.Core/Handle/Function.cs @@ -5,7 +5,7 @@ using System.Windows.Media; namespace VPet_Simulator.Core { - public static class Function + public static partial class Function { public static Random Rnd = new Random(); /// diff --git a/VPet-Simulator.Core/VPet-Simulator.Core.csproj b/VPet-Simulator.Core/VPet-Simulator.Core.csproj index f719fda..502cf1f 100644 --- a/VPet-Simulator.Core/VPet-Simulator.Core.csproj +++ b/VPet-Simulator.Core/VPet-Simulator.Core.csproj @@ -23,10 +23,10 @@ - + - - + + diff --git a/VPet-Simulator.Tool/VPet-Simulator.Tool.csproj b/VPet-Simulator.Tool/VPet-Simulator.Tool.csproj index d6f7f47..34cee4d 100644 --- a/VPet-Simulator.Tool/VPet-Simulator.Tool.csproj +++ b/VPet-Simulator.Tool/VPet-Simulator.Tool.csproj @@ -8,6 +8,7 @@ 1.0.0.0 VPet-Simulator.Tool Copyright © 2022 + preview diff --git a/VPet-Simulator.Windows.Interface/ExtensionFunction.cs b/VPet-Simulator.Windows.Interface/ExtensionFunction.cs index 01c1213..29370d0 100644 --- a/VPet-Simulator.Windows.Interface/ExtensionFunction.cs +++ b/VPet-Simulator.Windows.Interface/ExtensionFunction.cs @@ -99,7 +99,7 @@ namespace VPet_Simulator.Windows.Interface } } - public static class ExtensionValue + public static partial class ExtensionValue { /// /// 当前运行目录 diff --git a/VPet-Simulator.Windows.Interface/GameSave_v2.cs b/VPet-Simulator.Windows.Interface/GameSave_v2.cs index 50d90cf..6d9dff7 100644 --- a/VPet-Simulator.Windows.Interface/GameSave_v2.cs +++ b/VPet-Simulator.Windows.Interface/GameSave_v2.cs @@ -1,9 +1,12 @@ using LinePutScript; using LinePutScript.Dictionary; +using LinePutScript.Localization.WPF; +using Panuon.WPF.UI; using System; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Security.Cryptography; using System.Security.Policy; using System.Text; using System.Threading.Tasks; @@ -55,9 +58,28 @@ namespace VPet_Simulator.Windows.Interface if (nohashcheck) { hash = lps.GetInt64("hash"); + int ver = lps["hash"].GetInt("ver"); if (lps.Remove("hash")) { - HashCheck = Sub.GetHashCode(lps.ToString()) == hash; + if (ver == 2) + HashCheck = Sub.GetHashCode(lps.ToString()) == hash; + else + { + try + { + using (MD5 md5 = MD5.Create()) + { + HashCheck = BitConverter.ToInt64(md5.ComputeHash(Encoding.UTF8.GetBytes(lps.ToString())), 0) == hash; + } + if (!HashCheck) + HashCheck = Sub.GetHashCode(lps.ToString()) == hash; + } + catch (Exception e) + { + HashCheck = false; + MessageBoxX.Show(e.ToString(), "当前存档Hash验证信息".Translate() + ":" + "失败".Translate()); + } + } } } @@ -109,16 +131,23 @@ namespace VPet_Simulator.Windows.Interface if (HashCheck) { lps[(gi64)"hash"] = Sub.GetHashCode(lps.ToString()); + lps["hash"][(gint)"ver"] = 2; } else + { lps[(gint)"hash"] = -1; + lps["hash"][(gint)"ver"] = 2; + } return lps; } + /// /// Hash检查 /// public bool HashCheck { get; private set; } = true; + FInt64 IGetOBJ.this[gflt subName] { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + /// @@ -132,7 +161,7 @@ namespace VPet_Simulator.Windows.Interface #region GETOBJ public DateTime this[gdat subName] { get => Data[subName]; set => Data[subName] = value; } - public double this[gflt subName] { get => Data[subName]; set => Data[subName] = value; } + public FInt64 this[gflt subName] { get => Data[subName]; set => Data[subName] = value; } public double this[gdbe subName] { get => Data[subName]; set => Data[subName] = value; } public long this[gi64 subName] { get => Data[subName]; set => Data[subName] = value; } public int this[gint subName] { get => Data[subName]; set => Data[subName] = value; } @@ -170,12 +199,12 @@ namespace VPet_Simulator.Windows.Interface Data.SetInt64(subName, value); } - public double GetFloat(string subName, double defaultvalue = 0) + public FInt64 GetFloat(string subName, FInt64 defaultvalue = default) { return Data.GetFloat(subName, defaultvalue); } - public void SetFloat(string subName, double value) + public void SetFloat(string subName, FInt64 value) { Data.SetFloat(subName, value); } diff --git a/VPet-Simulator.Windows.Interface/Mod/Food.cs b/VPet-Simulator.Windows.Interface/Mod/Food.cs index 65c8581..cecf865 100644 --- a/VPet-Simulator.Windows.Interface/Mod/Food.cs +++ b/VPet-Simulator.Windows.Interface/Mod/Food.cs @@ -50,13 +50,9 @@ namespace VPet_Simulator.Windows.Interface /// Drug, /// - /// 礼品 (没做) + /// 礼品 /// Gift, - ///// - ///// 限定食物优先显示 - ///// - //Limit, } /// /// 食物类型 @@ -107,7 +103,6 @@ namespace VPet_Simulator.Windows.Interface /// [Line(ignoreCase: true)] public string Desc { get; set; } - private string desc = null; private string descs = null; /// /// 描述(ToBetterBuy) diff --git a/VPet-Simulator.Windows.Interface/ResourceStyle.xaml b/VPet-Simulator.Windows.Interface/ResourceStyle.xaml index ae97856..8a3c64c 100644 --- a/VPet-Simulator.Windows.Interface/ResourceStyle.xaml +++ b/VPet-Simulator.Windows.Interface/ResourceStyle.xaml @@ -1,212 +1,139 @@ - - - - - + + + + + - - - - - - - - - - - + + + + - + + + + - - - + + + + + + - + + + + + \ No newline at end of file diff --git a/VPet-Simulator.Windows.Interface/Setting.cs b/VPet-Simulator.Windows.Interface/Setting.cs index 68f5b2d..83862b2 100644 --- a/VPet-Simulator.Windows.Interface/Setting.cs +++ b/VPet-Simulator.Windows.Interface/Setting.cs @@ -33,19 +33,20 @@ namespace VPet_Simulator.Windows.Interface allowmove = !this["gameconfig"].GetBool("allowmove"); smartmove = this["gameconfig"].GetBool("smartmove"); enablefunction = !this["gameconfig"].GetBool("nofunction"); - Statistics_OLD = new Statistics(this["statistics"].ToList()); + //Statistics_OLD = new Statistics(this["statistics"].ToList()); autobuy = this["gameconfig"].GetBool("autobuy"); autogift = this["gameconfig"].GetBool("autogift"); } - public override string ToString() - {//留作备份,未来版本删了 - this["statistics"] = new Line("statistics", "", "", Statistics_OLD.ToSubs().ToArray()); - return base.ToString(); - } - /// - /// 统计数据信息(旧) - /// - public Statistics Statistics_OLD; + //public override string ToString() + //{//留作备份,未来版本删了 + // this["statistics"] = new Line("statistics", "", "", Statistics_OLD.ToSubs().ToArray()); + // return base.ToString(); + //} + + ///// + ///// 统计数据信息(旧) + ///// + //public Statistics Statistics_OLD; //public Size WindowsSize //{ @@ -87,7 +88,7 @@ namespace VPet_Simulator.Windows.Interface /// public double VoiceVolume { - get => GetFloat("voicevolume", 0.5); + get => (double)GetFloat("voicevolume", 0.5); set => SetFloat("voicevolume", value); } /// @@ -275,7 +276,7 @@ namespace VPet_Simulator.Windows.Interface /// public double PetHelpLeft { - get => this["pethelp"].GetFloat("left", 0); + get => (double)this["pethelp"].GetFloat("left", 0); set => this["pethelp"].SetFloat("left", value); } /// @@ -283,7 +284,7 @@ namespace VPet_Simulator.Windows.Interface /// public double PetHelpTop { - get => this["pethelp"].GetFloat("top", 0); + get => (double)this["pethelp"].GetFloat("top", 0); set => this["pethelp"].SetFloat("top", value); } diff --git a/VPet-Simulator.Windows.Interface/Statistics.cs b/VPet-Simulator.Windows.Interface/Statistics.cs index a1d0c06..153329f 100644 --- a/VPet-Simulator.Windows.Interface/Statistics.cs +++ b/VPet-Simulator.Windows.Interface/Statistics.cs @@ -45,7 +45,7 @@ namespace VPet_Simulator.Windows.Interface get => GetDateTime((string)subName); set => SetDateTime((string)subName, value); } - public double this[gflt subName] + public FInt64 this[gflt subName] { get => GetFloat((string)subName); set => SetFloat((string)subName, value); @@ -113,9 +113,9 @@ namespace VPet_Simulator.Windows.Interface public void SetInt64(string subName, long value) => Set(subName, value); - public double GetFloat(string subName, double defaultvalue = 0) => Find(subName)?.GetFloat() ?? defaultvalue; + public FInt64 GetFloat(string subName, FInt64 defaultvalue = default) => Find(subName)?.GetFloat() ?? defaultvalue; - public void SetFloat(string subName, double value) => Set(subName, value); + public void SetFloat(string subName, FInt64 value) => Set(subName, new SetObject(value)); public DateTime GetDateTime(string subName, DateTime defaultvalue = default) => Find(subName)?.GetDateTime() ?? defaultvalue; diff --git a/VPet-Simulator.Windows.Interface/VPet-Simulator.Windows.Interface.csproj b/VPet-Simulator.Windows.Interface/VPet-Simulator.Windows.Interface.csproj index e893214..63b2c61 100644 --- a/VPet-Simulator.Windows.Interface/VPet-Simulator.Windows.Interface.csproj +++ b/VPet-Simulator.Windows.Interface/VPet-Simulator.Windows.Interface.csproj @@ -7,6 +7,7 @@ true true true + preview true @@ -15,9 +16,9 @@ - + - - + + \ No newline at end of file diff --git a/VPet-Simulator.Windows/App.xaml b/VPet-Simulator.Windows/App.xaml index 9d1b4f7..c7f2e01 100644 --- a/VPet-Simulator.Windows/App.xaml +++ b/VPet-Simulator.Windows/App.xaml @@ -1,29 +1,31 @@ - - + + + + + - - - - - /VPet-Simulator.Windows;component/Res/Font/#OPPOSans R - - - /VPet-Simulator.Windows;component/Res/#remixicon - - - - - - + + /VPet-Simulator.Windows;component/Res/Font/#OPPOSans R + + + /VPet-Simulator.Windows;component/Res/#remixicon + - + + + + + + diff --git a/VPet-Simulator.Windows/Function/CoreMOD.cs b/VPet-Simulator.Windows/Function/CoreMOD.cs index 206ee33..2a7fc16 100644 --- a/VPet-Simulator.Windows/Function/CoreMOD.cs +++ b/VPet-Simulator.Windows/Function/CoreMOD.cs @@ -9,6 +9,7 @@ using System.IO; using System.Linq; using System.Reflection; using System.Windows; +using System.Xml.Linq; using VPet_Simulator.Core; using VPet_Simulator.Windows.Interface; @@ -104,6 +105,13 @@ namespace VPet_Simulator.Windows LocalizeCore.AddCulture(line.info, ls); } + if (mw.CoreMODs.FirstOrDefault(x => x.Name == Name) != null) + { + Name += $"({"MOD名称重复".Translate()})"; + ErrorMessage = "MOD名称重复".Translate(); + return; + } + if (!IsOnMOD(mw)) { Tag.Add("该模组已停用"); @@ -155,6 +163,8 @@ namespace VPet_Simulator.Windows var tmp = new LpsDocument(File.ReadAllText(fi.FullName)); foreach (ILine li in tmp) { + if (li.Name != "food") + continue; string tmps = li.Find("name").info; mw.Foods.RemoveAll(x => x.Name == tmps); mw.Foods.Add(LPSConvert.DeserializeObject(li)); @@ -313,7 +323,11 @@ namespace VPet_Simulator.Windows } catch { - Process.Start("explorer.exe", url); + ProcessStartInfo startInfo = new ProcessStartInfo(); + startInfo.FileName = "explorer.exe"; + startInfo.UseShellExecute = false; + startInfo.Arguments = url; + Process.Start(startInfo); } } diff --git a/VPet-Simulator.Windows/MainWindow.cs b/VPet-Simulator.Windows/MainWindow.cs index 96ad353..c44223a 100644 --- a/VPet-Simulator.Windows/MainWindow.cs +++ b/VPet-Simulator.Windows/MainWindow.cs @@ -35,6 +35,8 @@ using Line = LinePutScript.Line; using static VPet_Simulator.Windows.Interface.ExtensionFunction; using Image = System.Windows.Controls.Image; +using VPet.Solution; + namespace VPet_Simulator.Windows { public partial class MainWindow : IMainWindow @@ -316,17 +318,37 @@ namespace VPet_Simulator.Windows petHelper.Show(); } - public static void RunDIY(string content) + public void RunDIY(string content) { - if (content.Contains("://") || content.Contains(@":\")) + if (content.Contains(@":\")) { try { - Process.Start(content); + if (!Set["v"][(gbol)"rundiy"]) + { + MessageBoxX.Show("由于操作系统的设计,通过我们软件启动的程序可能会在任务管理器中归类为我们软件的子进程,这可能导致CPU/内存占用显示较高".Translate(), + "关于CPU/内存占用显示较高的一次性提示".Translate()); + Set["v"][(gbol)"rundiy"] = true; + } + ProcessStartInfo startInfo = new ProcessStartInfo(); + startInfo.FileName = content; + startInfo.UseShellExecute = false; + Process.Start(startInfo); } catch (Exception e) { - MessageBox.Show("快捷键运行失败:无法运行指定内容".Translate() + '\n' + e.Message); + MessageBoxX.Show("快捷键运行失败:无法运行指定内容".Translate() + '\n' + e.Message); + } + } + else if (content.Contains("://")) + { + try + { + ExtensionSetting.StartURL(content); + } + catch (Exception e) + { + MessageBoxX.Show("快捷键运行失败:无法运行指定内容".Translate() + '\n' + e.Message); } } else @@ -337,7 +359,7 @@ namespace VPet_Simulator.Windows } catch (Exception e) { - MessageBox.Show("快捷键运行失败:无法运行指定内容".Translate() + '\n' + e.Message); + MessageBoxX.Show("快捷键运行失败:无法运行指定内容".Translate() + '\n' + e.Message); } } } @@ -615,7 +637,7 @@ namespace VPet_Simulator.Windows { var stat = GameSavesData.Statistics; var save = Core.Save; - stat["stat_money"] = save.Money; + stat["stat_money"] = (SetObject)save.Money; stat["stat_level"] = save.Level; stat["stat_likability"] = save.Likability; @@ -690,7 +712,7 @@ namespace VPet_Simulator.Windows else data.Add(new Line(item.Name, item.Info)); } - tmp = new GameSave_v2(lps, Set.Statistics_OLD, olddata: data); + tmp = new GameSave_v2(lps, null, olddata: data); } if (tmp.GameSave == null) return false; @@ -1205,6 +1227,7 @@ namespace VPet_Simulator.Windows public async void GameLoad(List Path) { + Path = Path.Distinct().ToList(); await Dispatcher.InvokeAsync(new Action(() => LoadingText.Content = "Loading MOD")); //加载mod foreach (DirectoryInfo di in Path) @@ -1402,12 +1425,16 @@ namespace VPet_Simulator.Windows await Dispatcher.InvokeAsync(new Action(() => LoadingText.Content = "尝试加载游戏动画".Translate())); await Dispatcher.InvokeAsync(new Action(() => { - LoadingText.Content = "尝试加载动画和生成缓存".Translate(); + LoadingText.Content = "尝试加载动画和生成缓存\n该步骤可能会耗时比较长\n请耐心等待".Translate(); Core.Graph = petloader.Graph(Set.Resolution); Main = new Main(Core); Main.NoFunctionMOD = Set.CalFunState; + + LoadingText.Content = "正在加载游戏".Translate(); + + //加载数据合理化:工作 if (!Set["gameconfig"].GetBool("noAutoCal")) { @@ -1436,7 +1463,6 @@ namespace VPet_Simulator.Windows } - LoadingText.Content = "正在加载游戏".Translate(); var m = new System.Windows.Controls.MenuItem() { Header = "MOD管理".Translate(), @@ -1712,11 +1738,38 @@ namespace VPet_Simulator.Windows Thread.Sleep(2000); Set["SingleTips"].SetBool("helloworld", true); NoticeBox.Show("欢迎使用虚拟桌宠模拟器!\n如果遇到桌宠爬不见了,可以在我这里设置居中或退出桌宠".Translate(), - "你好".Translate() + (IsSteamUser ? SteamClient.Name : Environment.UserName)); + "你好".Translate() + (IsSteamUser ? SteamClient.Name : Environment.UserName), Panuon.WPF.UI.MessageBoxIcon.Info, true, 5000); //Thread.Sleep(2000); //Main.SayRnd("欢迎使用虚拟桌宠模拟器\n这是个中期的测试版,若有bug请多多包涵\n欢迎加群虚拟主播模拟器430081239或在菜单栏-管理-反馈中提交bug或建议".Translate()); }); } + if (Set["v"][(gint)"rank"] != DateTime.Now.Year && GameSavesData.Statistics[(gint)"stat_total_time"] > 3600) + {//年度报告提醒 + Task.Run(() => + { + Thread.Sleep(120000); + Set["v"][(gint)"rank"] = DateTime.Now.Year; + Dispatcher.Invoke(() => + { + var button = new System.Windows.Controls.Button() + { + Content = "点击前往查看".Translate(), + FontSize = 20, + HorizontalAlignment = System.Windows.HorizontalAlignment.Right, + Background = Function.ResourcesBrush(Function.BrushType.Primary), + Foreground = Function.ResourcesBrush(Function.BrushType.PrimaryText), + }; + button.Click += (x, y) => + { + var panelWindow = new winCharacterPanel(this); + panelWindow.MainTab.SelectedIndex = 2; + panelWindow.Show(); + }; + Main.MsgBar.MessageBoxContent.Children.Add(button); + }); + Main.Say("哼哼~主人,我的考试成绩出炉了哦,快来和我一起看我的成绩单喵".Translate(), "shining"); + }); + } #if DEMO else { diff --git a/VPet-Simulator.Windows/MainWindow.xaml.cs b/VPet-Simulator.Windows/MainWindow.xaml.cs index afc6244..7743a00 100644 --- a/VPet-Simulator.Windows/MainWindow.xaml.cs +++ b/VPet-Simulator.Windows/MainWindow.xaml.cs @@ -20,6 +20,7 @@ using Line = LinePutScript.Line; using static VPet_Simulator.Core.GraphInfo; using System.Globalization; using LinePutScript.Dictionary; +using Steamworks.Data; namespace VPet_Simulator.Windows { @@ -111,6 +112,8 @@ namespace VPet_Simulator.Windows { if (IsSteamUser)//如果是steam用户,尝试加载workshop { + //Leaderboard? leaderboard = await SteamUserStats.FindLeaderboardAsync("chatgpt_auth"); + //leaderboard?.ReplaceScore(Function.Rnd.Next()); var workshop = new Line_D("workshop"); await Dispatcher.InvokeAsync(new Action(() => { @@ -126,7 +129,7 @@ namespace VPet_Simulator.Windows int i = 1; while (true) { - var page = await Steamworks.Ugc.Query.ItemsReadyToUse.GetPageAsync(i++); + var page = await Steamworks.Ugc.Query.ItemsReadyToUse.GetPageAsync(i++); if (page.HasValue && page.Value.ResultCount != 0) { foreach (Steamworks.Ugc.Item entry in page.Value.Entries) @@ -260,7 +263,7 @@ namespace VPet_Simulator.Windows if (App.MainWindows.Count <= 1) { try - { + { if (Core != null && Core.Graph != null) { foreach (var igs in Core.Graph.GraphsList.Values) diff --git a/VPet-Simulator.Windows/Res/img/r_autobuy_1.png b/VPet-Simulator.Windows/Res/img/r_autobuy_1.png new file mode 100644 index 0000000..7116d85 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_autobuy_1.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_autobuy_2.png b/VPet-Simulator.Windows/Res/img/r_autobuy_2.png new file mode 100644 index 0000000..b001c41 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_autobuy_2.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_autobuy_3.png b/VPet-Simulator.Windows/Res/img/r_autobuy_3.png new file mode 100644 index 0000000..a26da03 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_autobuy_3.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_autobuy_4.png b/VPet-Simulator.Windows/Res/img/r_autobuy_4.png new file mode 100644 index 0000000..94b473c Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_autobuy_4.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_level_1.png b/VPet-Simulator.Windows/Res/img/r_level_1.png new file mode 100644 index 0000000..e9cdf5c Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_level_1.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_level_2.png b/VPet-Simulator.Windows/Res/img/r_level_2.png new file mode 100644 index 0000000..4801fa1 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_level_2.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_level_3.png b/VPet-Simulator.Windows/Res/img/r_level_3.png new file mode 100644 index 0000000..5a9cc96 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_level_3.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_level_4.png b/VPet-Simulator.Windows/Res/img/r_level_4.png new file mode 100644 index 0000000..29bce4a Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_level_4.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_level_5.png b/VPet-Simulator.Windows/Res/img/r_level_5.png new file mode 100644 index 0000000..e5e7f29 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_level_5.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_mod_1.png b/VPet-Simulator.Windows/Res/img/r_mod_1.png new file mode 100644 index 0000000..c733232 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_mod_1.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_mod_2.png b/VPet-Simulator.Windows/Res/img/r_mod_2.png new file mode 100644 index 0000000..7e647a3 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_mod_2.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_mod_3.png b/VPet-Simulator.Windows/Res/img/r_mod_3.png new file mode 100644 index 0000000..4a80ab3 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_mod_3.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_mostfood_Drink.png b/VPet-Simulator.Windows/Res/img/r_mostfood_Drink.png new file mode 100644 index 0000000..0d53178 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_mostfood_Drink.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_mostfood_Drug.png b/VPet-Simulator.Windows/Res/img/r_mostfood_Drug.png new file mode 100644 index 0000000..7bf6e27 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_mostfood_Drug.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_mostfood_Food.png b/VPet-Simulator.Windows/Res/img/r_mostfood_Food.png new file mode 100644 index 0000000..9ef12b5 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_mostfood_Food.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_mostfood_Functional.png b/VPet-Simulator.Windows/Res/img/r_mostfood_Functional.png new file mode 100644 index 0000000..9ef12b5 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_mostfood_Functional.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_mostfood_Gift.png b/VPet-Simulator.Windows/Res/img/r_mostfood_Gift.png new file mode 100644 index 0000000..433575e Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_mostfood_Gift.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_mostfood_Meal.png b/VPet-Simulator.Windows/Res/img/r_mostfood_Meal.png new file mode 100644 index 0000000..353ae28 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_mostfood_Meal.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_mostfood_Snack.png b/VPet-Simulator.Windows/Res/img/r_mostfood_Snack.png new file mode 100644 index 0000000..9ba3de1 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_mostfood_Snack.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_singleexp_1.png b/VPet-Simulator.Windows/Res/img/r_singleexp_1.png new file mode 100644 index 0000000..ce7aa67 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_singleexp_1.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_singleexp_2.png b/VPet-Simulator.Windows/Res/img/r_singleexp_2.png new file mode 100644 index 0000000..5bb6303 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_singleexp_2.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_singleexp_3.png b/VPet-Simulator.Windows/Res/img/r_singleexp_3.png new file mode 100644 index 0000000..6e2f1ce Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_singleexp_3.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_singleexp_4.png b/VPet-Simulator.Windows/Res/img/r_singleexp_4.png new file mode 100644 index 0000000..ae38407 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_singleexp_4.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_singleexp_5.png b/VPet-Simulator.Windows/Res/img/r_singleexp_5.png new file mode 100644 index 0000000..dc46953 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_singleexp_5.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_singlemoney_1.png b/VPet-Simulator.Windows/Res/img/r_singlemoney_1.png new file mode 100644 index 0000000..1f7366b Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_singlemoney_1.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_singlemoney_2.png b/VPet-Simulator.Windows/Res/img/r_singlemoney_2.png new file mode 100644 index 0000000..50d91ec Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_singlemoney_2.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_singlemoney_3.png b/VPet-Simulator.Windows/Res/img/r_singlemoney_3.png new file mode 100644 index 0000000..5c30f24 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_singlemoney_3.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_singlemoney_4.png b/VPet-Simulator.Windows/Res/img/r_singlemoney_4.png new file mode 100644 index 0000000..bbe5d86 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_singlemoney_4.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_timelength_1.png b/VPet-Simulator.Windows/Res/img/r_timelength_1.png new file mode 100644 index 0000000..fc862ab Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_timelength_1.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_timelength_2.png b/VPet-Simulator.Windows/Res/img/r_timelength_2.png new file mode 100644 index 0000000..2d34bdf Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_timelength_2.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_timelength_3.png b/VPet-Simulator.Windows/Res/img/r_timelength_3.png new file mode 100644 index 0000000..5b8a461 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_timelength_3.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_timelength_4.png b/VPet-Simulator.Windows/Res/img/r_timelength_4.png new file mode 100644 index 0000000..5c75a0e Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_timelength_4.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_timelength_5.png b/VPet-Simulator.Windows/Res/img/r_timelength_5.png new file mode 100644 index 0000000..a9118a0 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_timelength_5.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_worktime_1.png b/VPet-Simulator.Windows/Res/img/r_worktime_1.png new file mode 100644 index 0000000..ff82950 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_worktime_1.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_worktime_2.png b/VPet-Simulator.Windows/Res/img/r_worktime_2.png new file mode 100644 index 0000000..1496830 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_worktime_2.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_worktime_3.png b/VPet-Simulator.Windows/Res/img/r_worktime_3.png new file mode 100644 index 0000000..df9056a Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_worktime_3.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_worktime_4.png b/VPet-Simulator.Windows/Res/img/r_worktime_4.png new file mode 100644 index 0000000..cd30e00 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_worktime_4.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_worktime_5.png b/VPet-Simulator.Windows/Res/img/r_worktime_5.png new file mode 100644 index 0000000..b978651 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_worktime_5.png differ diff --git a/VPet-Simulator.Windows/Res/img/r_worktime_6.png b/VPet-Simulator.Windows/Res/img/r_worktime_6.png new file mode 100644 index 0000000..493bcff Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/r_worktime_6.png differ diff --git a/VPet-Simulator.Windows/Res/img/rank1.png b/VPet-Simulator.Windows/Res/img/rank1.png new file mode 100644 index 0000000..54a5147 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/rank1.png differ diff --git a/VPet-Simulator.Windows/Res/img/rank2.png b/VPet-Simulator.Windows/Res/img/rank2.png new file mode 100644 index 0000000..2ad2cc9 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/rank2.png differ diff --git a/VPet-Simulator.Windows/Res/img/rank3.png b/VPet-Simulator.Windows/Res/img/rank3.png new file mode 100644 index 0000000..468b7d5 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/rank3.png differ diff --git a/VPet-Simulator.Windows/Res/img/rbgb.png b/VPet-Simulator.Windows/Res/img/rbgb.png new file mode 100644 index 0000000..3e13010 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/rbgb.png differ diff --git a/VPet-Simulator.Windows/Res/img/rbgt.png b/VPet-Simulator.Windows/Res/img/rbgt.png new file mode 100644 index 0000000..0fd0254 Binary files /dev/null and b/VPet-Simulator.Windows/Res/img/rbgt.png differ diff --git a/VPet-Simulator.Windows/VPet-Simulator.Windows.csproj b/VPet-Simulator.Windows/VPet-Simulator.Windows.csproj index d344df3..851ce93 100644 --- a/VPet-Simulator.Windows/VPet-Simulator.Windows.csproj +++ b/VPet-Simulator.Windows/VPet-Simulator.Windows.csproj @@ -65,17 +65,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -132,6 +185,50 @@ false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -140,10 +237,10 @@ - + - - + + \ No newline at end of file diff --git a/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml b/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml index 89bf127..9566a2e 100644 --- a/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml +++ b/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml @@ -319,8 +319,19 @@ - + + + + + + + + + + + diff --git a/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml.cs b/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml.cs index 9ba5e50..23846d5 100644 --- a/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml.cs +++ b/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml.cs @@ -353,7 +353,10 @@ namespace VPet_Simulator.Windows private void pagination_CurrentPageChanged(object sender, SelectedValueChangedRoutedEventArgs e) { + if (!AllowChange) + return; Search(); + TbPage.Text = e.NewValue.ToString(); } private void rMoney_Loaded(object sender, RoutedEventArgs e) @@ -408,5 +411,14 @@ namespace VPet_Simulator.Windows ((Button)sender).Content = "更好买".Translate() + mw.PrefixSave; ; } + + private void TbPage_PreviewKeyDown(object sender, KeyEventArgs e) + { + if(e.Key == Key.Enter + && int.TryParse(TbPage.Text?.Trim(), out int page)) + { + pagination.CurrentPage = Math.Max(0, Math.Min(pagination.MaxPage, page)); + } + } } } diff --git a/VPet-Simulator.Windows/WinDesign/winCharacterPanel.xaml b/VPet-Simulator.Windows/WinDesign/winCharacterPanel.xaml index f63c7fe..148ef94 100644 --- a/VPet-Simulator.Windows/WinDesign/winCharacterPanel.xaml +++ b/VPet-Simulator.Windows/WinDesign/winCharacterPanel.xaml @@ -45,16 +45,16 @@ + + IsReadOnly="True" Width="300"> + IsReadOnly="True" Width="160" /> @@ -199,6 +199,254 @@ + + + + + + + + + + + +