From 760ade48c8e018f5425f431291a83b4ee6c09847 Mon Sep 17 00:00:00 2001 From: B1ackSand Date: Thu, 5 Oct 2023 03:45:12 +0800 Subject: [PATCH] Fix bug; Add Hub mode. --- LiaoTian_Cup/Dictionary/I18n/Lang.Designer.cs | 18 + LiaoTian_Cup/Dictionary/I18n/Lang.resx | 6 + LiaoTian_Cup/Dictionary/I18n/Lang.zh.resx | 6 + LiaoTian_Cup/Helper/FileData.cs | 34 +- LiaoTian_Cup/LiaoTian_Cup.csproj | 72 ++ LiaoTian_Cup/MainPage.xaml.cs | 2 +- LiaoTian_Cup/Mode/DoublesModeWindow.xaml.cs | 1 + LiaoTian_Cup/Mode/HubModeWindow.xaml | 340 +++++++++ LiaoTian_Cup/Mode/HubModeWindow.xaml.cs | 657 ++++++++++++++++++ .../Mode/NegativeFactorWindow.xaml.cs | 1 + LiaoTian_Cup/Mode/USuckModeWindow.xaml.cs | 3 +- LiaoTian_Cup/Overview/ShowHubDetail.xaml | 206 ++++++ LiaoTian_Cup/Overview/ShowHubDetail.xaml.cs | 51 ++ .../commander/\344\270\273\345\256\260.png" | Bin 0 -> 20314 bytes .../\345\215\241\346\213\211\346\226\257.png" | Bin 0 -> 21439 bytes .../\345\220\211\345\250\234\346\213\211.png" | Bin 0 -> 19748 bytes ...4\350\220\250\350\276\276\345\260\224.png" | Bin 0 -> 21496 bytes ...4\351\233\205\345\276\267\346\213\211.png" | Bin 0 -> 21007 bytes .../commander/\346\211\230\344\273\200.png" | Bin 0 -> 20353 bytes .../\346\235\260\346\213\211\345\276\267.png" | Bin 0 -> 23012 bytes ...4\345\274\217\345\241\224\351\233\266.png" | Bin 0 -> 17977 bytes .../\346\254\247\351\233\267\345\212\240.png" | Bin 0 -> 24040 bytes .../commander/\346\261\211\346\243\256.png" | Bin 0 -> 21272 bytes ...6\344\274\246\351\207\214\345\256\211.png" | Bin 0 -> 21651 bytes .../\347\272\263\346\263\225\350\256\270.png" | Bin 0 -> 14183 bytes ...3\345\205\260\350\222\202\346\226\257.png" | Bin 0 -> 24052 bytes LiaoTian_Cup/Resources/database.db | Bin 27648 -> 32768 bytes ...7\351\222\247\347\232\207\346\235\203.png" | Bin 0 -> 16004 bytes ...2\351\255\202\344\271\213\346\211\213.png" | Bin 0 -> 16392 bytes ...2\347\253\257\346\225\231\345\273\267.png" | Bin 0 -> 13604 bytes ...4\351\235\242\345\220\221\346\225\214.png" | Bin 0 -> 13434 bytes ...7\347\213\202\347\203\255\350\200\205.png" | Bin 4847 -> 14429 bytes ...4\345\221\275\344\274\231\344\274\264.png" | Bin 0 -> 15097 bytes ...4\345\221\275\344\274\231\344\274\264.png" | Bin 0 -> 15097 bytes 34 files changed, 1374 insertions(+), 23 deletions(-) create mode 100644 LiaoTian_Cup/Mode/HubModeWindow.xaml create mode 100644 LiaoTian_Cup/Mode/HubModeWindow.xaml.cs create mode 100644 LiaoTian_Cup/Overview/ShowHubDetail.xaml create mode 100644 LiaoTian_Cup/Overview/ShowHubDetail.xaml.cs create mode 100644 "LiaoTian_Cup/Resources/commander/\344\270\273\345\256\260.png" create mode 100644 "LiaoTian_Cup/Resources/commander/\345\215\241\346\213\211\346\226\257.png" create mode 100644 "LiaoTian_Cup/Resources/commander/\345\220\211\345\250\234\346\213\211.png" create mode 100644 "LiaoTian_Cup/Resources/commander/\345\241\224\350\220\250\350\276\276\345\260\224.png" create mode 100644 "LiaoTian_Cup/Resources/commander/\345\260\274\351\233\205\345\276\267\346\213\211.png" create mode 100644 "LiaoTian_Cup/Resources/commander/\346\211\230\344\273\200.png" create mode 100644 "LiaoTian_Cup/Resources/commander/\346\235\260\346\213\211\345\276\267.png" create mode 100644 "LiaoTian_Cup/Resources/commander/\346\240\274\345\274\217\345\241\224\351\233\266.png" create mode 100644 "LiaoTian_Cup/Resources/commander/\346\254\247\351\233\267\345\212\240.png" create mode 100644 "LiaoTian_Cup/Resources/commander/\346\261\211\346\243\256.png" create mode 100644 "LiaoTian_Cup/Resources/commander/\347\223\246\344\274\246\351\207\214\345\256\211.png" create mode 100644 "LiaoTian_Cup/Resources/commander/\347\272\263\346\263\225\350\256\270.png" create mode 100644 "LiaoTian_Cup/Resources/commander/\350\265\233\345\205\260\350\222\202\346\226\257.png" create mode 100644 "LiaoTian_Cup/Resources/factor/\344\270\207\351\222\247\347\232\207\346\235\203.png" create mode 100644 "LiaoTian_Cup/Resources/factor/\345\244\272\351\255\202\344\271\213\346\211\213.png" create mode 100644 "LiaoTian_Cup/Resources/factor/\345\274\202\347\253\257\346\225\231\345\273\267.png" create mode 100644 "LiaoTian_Cup/Resources/factor/\346\255\244\351\235\242\345\220\221\346\225\214.png" create mode 100644 "LiaoTian_Cup/Resources/factor/\350\207\264\345\221\275\344\274\231\344\274\264.png" create mode 100644 "LiaoTian_Cup/Resources/\350\207\264\345\221\275\344\274\231\344\274\264.png" diff --git a/LiaoTian_Cup/Dictionary/I18n/Lang.Designer.cs b/LiaoTian_Cup/Dictionary/I18n/Lang.Designer.cs index f5779d8..8cbf08c 100644 --- a/LiaoTian_Cup/Dictionary/I18n/Lang.Designer.cs +++ b/LiaoTian_Cup/Dictionary/I18n/Lang.Designer.cs @@ -132,6 +132,24 @@ public static string CommanderWarn2 { } } + /// + /// 查找类似 you need to pick 2 Cmdrs. in Hub mode 的本地化字符串。 + /// + public static string CommanderWarnHub { + get { + return ResourceManager.GetString("CommanderWarnHub", resourceCulture); + } + } + + /// + /// 查找类似 you need to pick 2 Cmdrs. in Usuck mode 的本地化字符串。 + /// + public static string CommanderWarnUsuck { + get { + return ResourceManager.GetString("CommanderWarnUsuck", resourceCulture); + } + } + /// /// 查找类似 Confirm base's 的本地化字符串。 /// diff --git a/LiaoTian_Cup/Dictionary/I18n/Lang.resx b/LiaoTian_Cup/Dictionary/I18n/Lang.resx index 5c67d56..39d15f6 100644 --- a/LiaoTian_Cup/Dictionary/I18n/Lang.resx +++ b/LiaoTian_Cup/Dictionary/I18n/Lang.resx @@ -360,4 +360,10 @@ Hub Mode + + you need to pick 2 Cmdrs. in Usuck mode + + + you need to pick 2 Cmdrs. in Hub mode + \ No newline at end of file diff --git a/LiaoTian_Cup/Dictionary/I18n/Lang.zh.resx b/LiaoTian_Cup/Dictionary/I18n/Lang.zh.resx index adc7b77..0710389 100644 --- a/LiaoTian_Cup/Dictionary/I18n/Lang.zh.resx +++ b/LiaoTian_Cup/Dictionary/I18n/Lang.zh.resx @@ -360,4 +360,10 @@ 枢纽模式 + + Usuck模式需选择两名指挥官 + + + Hub模式需选择两名指挥官 + \ No newline at end of file diff --git a/LiaoTian_Cup/Helper/FileData.cs b/LiaoTian_Cup/Helper/FileData.cs index 055c55d..487b65b 100644 --- a/LiaoTian_Cup/Helper/FileData.cs +++ b/LiaoTian_Cup/Helper/FileData.cs @@ -36,6 +36,13 @@ public class FileData public static List usuckMultiFactorInfo = new List(); public static List usuckFactorList = new List(); + //Hub + public static List hubNegativeFactorInfo = new List(); + public static List hubMultiFactorInfo = new List(); + public static List hubFactorList = new List(); + public static List hubBeforeCommanderInfo = new List(); + public static List hubAfterCommanderInfo = new List(); + //存放地图数据 public static List mapsInfo = new List(); @@ -44,27 +51,6 @@ public FileData() ReadDataBase(); } - //读取csv - //private void ReadCsv() - //{ - // //初始化窗口时即拿数据 - // CSVKit.Csv2Dt(Dictionary.FilePath.mutationFilePath, mutationList); - // CSVKit.Csv2Dt(Dictionary.FilePath.scoreFactorPath, scoreFactorList); - // CSVKit.Csv2Dt(Dictionary.FilePath.mutationFactorPath, mutationFactorList); - // CSVKit.Csv2Dt(Dictionary.FilePath.beforeCommanderFilePath, beforeCommanderInfo); - // CSVKit.Csv2Dt(Dictionary.FilePath.afterCommanderFilePath, afterCommanderInfo); - // CSVKit.Csv2Dt(Dictionary.FilePath.aIFilePath, botInfo); - // CSVKit.Csv2Dt(Dictionary.FilePath.baseNegativeFactorFilePath, baseNegativeFactorInfo); - // CSVKit.Csv2Dt(Dictionary.FilePath.baseMultiFactorFilePath, baseMultiFactorInfo); - // CSVKit.Csv2Dt(Dictionary.FilePath.mapsFilePath, mapsInfo); - // CSVKit.Csv2Dt(Dictionary.FilePath.negativeFactorFilePath, negativeFactorInfo); - - // //USuck - // CSVKit.Csv2Dt(Dictionary.FilePath.usuckFactorPath, usuckFactorList); - // CSVKit.Csv2Dt(Dictionary.FilePath.usuckMultiPath, usuckMultiFactorInfo); - // CSVKit.Csv2Dt(Dictionary.FilePath.usuckNegativePath, usuckNegativeFactorInfo); - //} - //读取数据库 private void ReadDataBase() { @@ -85,6 +71,12 @@ private void ReadDataBase() DbHelper.GetColumnData("usuck_multilist", usuckMultiFactorInfo); DbHelper.GetColumnData("usuck_negativelist", usuckNegativeFactorInfo); + //Hub + DbHelper.GetColumnData("hub_mutatorlist", hubFactorList); + DbHelper.GetColumnData("hub_multilist", hubMultiFactorInfo); + DbHelper.GetColumnData("hub_negativelist", hubNegativeFactorInfo); + DbHelper.GetColumnData("hub_cmdroldlist", hubBeforeCommanderInfo); + DbHelper.GetColumnData("hub_cmdrnewlist", hubAfterCommanderInfo); } } } diff --git a/LiaoTian_Cup/LiaoTian_Cup.csproj b/LiaoTian_Cup/LiaoTian_Cup.csproj index 212645e..fdf9e88 100644 --- a/LiaoTian_Cup/LiaoTian_Cup.csproj +++ b/LiaoTian_Cup/LiaoTian_Cup.csproj @@ -30,30 +30,44 @@ + + + + + + + + + + + + + + @@ -73,12 +87,14 @@ + + @@ -105,6 +121,7 @@ + @@ -127,6 +144,7 @@ + @@ -197,15 +215,63 @@ \ Always + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + Always + + Always + Always Always + + Always + Always @@ -218,6 +284,9 @@ Always + + Always + Always @@ -233,6 +302,9 @@ Always + + Always + Always diff --git a/LiaoTian_Cup/MainPage.xaml.cs b/LiaoTian_Cup/MainPage.xaml.cs index ee50fd1..c60c798 100644 --- a/LiaoTian_Cup/MainPage.xaml.cs +++ b/LiaoTian_Cup/MainPage.xaml.cs @@ -62,7 +62,7 @@ private void Button_USuck_Click(object sender, RoutedEventArgs e) private void Button_Hub_Click(object sender, RoutedEventArgs e) { - //this.NavigationService.Navigate(new Uri("/LiaoTian_Cup;component/Mode/HubModeWindow.xaml", UriKind.Relative)); + this.NavigationService.Navigate(new Uri("/LiaoTian_Cup;component/Mode/HubModeWindow.xaml", UriKind.Relative)); } private void AboutMeBtn(object sender, RoutedEventArgs e) diff --git a/LiaoTian_Cup/Mode/DoublesModeWindow.xaml.cs b/LiaoTian_Cup/Mode/DoublesModeWindow.xaml.cs index 871101d..d400cbc 100644 --- a/LiaoTian_Cup/Mode/DoublesModeWindow.xaml.cs +++ b/LiaoTian_Cup/Mode/DoublesModeWindow.xaml.cs @@ -101,6 +101,7 @@ public void ResetFunc() SetBaseFactorEnable(true); hasSelectBase.Clear(); + BaseConfirmBtn.IsEnabled = false; ClearBaseNegativeFactor(); ClearBaseMultiFactor(); FlashSelectBase(); diff --git a/LiaoTian_Cup/Mode/HubModeWindow.xaml b/LiaoTian_Cup/Mode/HubModeWindow.xaml new file mode 100644 index 0000000..4ed7efb --- /dev/null +++ b/LiaoTian_Cup/Mode/HubModeWindow.xaml @@ -0,0 +1,340 @@ + + + + + + + +