From 66458e831c9614c0c1ac6a9e90f694f2d74739cc Mon Sep 17 00:00:00 2001 From: lanyizi Date: Sat, 24 Aug 2024 01:54:11 +0200 Subject: [PATCH 1/2] =?UTF-8?q?=E5=B9=B2=E6=8E=89=E4=BA=86=E6=B5=A9?= =?UTF-8?q?=E6=96=B9=E6=9F=A5=E9=A9=AC=E7=94=B2=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- About.xaml.cs | 12 --- AnotherReplayReader.csproj | 14 +-- AnotherReplayReader.sln | 16 +--- Apm/DataRow.cs | 18 +--- ApmWindow.xaml | 7 -- ApmWindow.xaml.cs | 23 +---- Auth.cs | 34 ------- ChineseEncoding.cs | 179 ++++++++++++++++++++++++++++++++++++ MainWindow.xaml.cs | 28 ++---- PlayerIdentity.cs | 184 ------------------------------------- Plugin.cs | 78 ---------------- ReplayFile/Player.cs | 5 + ReplayFile/Replay.cs | 5 +- Utils/ReplayPinyinList.cs | 21 ++--- Window1.xaml.cs | 27 +----- 15 files changed, 217 insertions(+), 434 deletions(-) delete mode 100644 Auth.cs create mode 100644 ChineseEncoding.cs delete mode 100644 PlayerIdentity.cs delete mode 100644 Plugin.cs diff --git a/About.xaml.cs b/About.xaml.cs index 691425f..6a6d2e1 100644 --- a/About.xaml.cs +++ b/About.xaml.cs @@ -52,18 +52,6 @@ namespace AnotherReplayReader return h; }); } - - _ = Auth.Id.ContinueWith(t => Dispatcher.Invoke(() => - { - if (t.Result is { } id) - { - _idBox.Text = id; - } - else - { - _bottom.Visibility = Visibility.Collapsed; - } - })); } private void OnHyperlinkRequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) diff --git a/AnotherReplayReader.csproj b/AnotherReplayReader.csproj index ad2bea9..b24878f 100644 --- a/AnotherReplayReader.csproj +++ b/AnotherReplayReader.csproj @@ -34,10 +34,10 @@ + - @@ -54,14 +54,10 @@ - <_FilesToMove Include="$(OutputPath)*.dll"/> + <_FilesToMove Include="$(OutputPath)*.dll" /> - - - '$(OutputPath)$(ProjectName)Data\%(Filename)%(Extension)')"/> + + + \ No newline at end of file diff --git a/AnotherReplayReader.sln b/AnotherReplayReader.sln index 74283e8..9a0686b 100644 --- a/AnotherReplayReader.sln +++ b/AnotherReplayReader.sln @@ -1,14 +1,10 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30907.101 +# Visual Studio Version 17 +VisualStudioVersion = 17.10.34928.147 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AnotherReplayReader", "AnotherReplayReader.csproj", "{A54AEAB3-D99C-4E29-8C47-3DFD5B1A0FDE}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AnotherReplayReader.PlayerIdentity", "..\AnotherReplayReader.PlayerIdentity\AnotherReplayReader.PlayerIdentity.csproj", "{78678E57-CBA2-46E4-B764-4CB6E66EF156}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AnotherReplayReader.PluginSystem", "..\AnotherReplayReader.PluginSystem\AnotherReplayReader.PluginSystem.csproj", "{0730D7D0-64A3-4F3F-8D8C-46E7676C659F}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -19,14 +15,6 @@ Global {A54AEAB3-D99C-4E29-8C47-3DFD5B1A0FDE}.Debug|Any CPU.Build.0 = Debug|Any CPU {A54AEAB3-D99C-4E29-8C47-3DFD5B1A0FDE}.Release|Any CPU.ActiveCfg = Release|Any CPU {A54AEAB3-D99C-4E29-8C47-3DFD5B1A0FDE}.Release|Any CPU.Build.0 = Release|Any CPU - {78678E57-CBA2-46E4-B764-4CB6E66EF156}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {78678E57-CBA2-46E4-B764-4CB6E66EF156}.Debug|Any CPU.Build.0 = Debug|Any CPU - {78678E57-CBA2-46E4-B764-4CB6E66EF156}.Release|Any CPU.ActiveCfg = Release|Any CPU - {78678E57-CBA2-46E4-B764-4CB6E66EF156}.Release|Any CPU.Build.0 = Release|Any CPU - {0730D7D0-64A3-4F3F-8D8C-46E7676C659F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0730D7D0-64A3-4F3F-8D8C-46E7676C659F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0730D7D0-64A3-4F3F-8D8C-46E7676C659F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0730D7D0-64A3-4F3F-8D8C-46E7676C659F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Apm/DataRow.cs b/Apm/DataRow.cs index b39692f..6ee84e2 100644 --- a/Apm/DataRow.cs +++ b/Apm/DataRow.cs @@ -37,17 +37,14 @@ namespace AnotherReplayReader.Apm public static List GetList(ApmPlotter plotter, ApmPlotterFilterOptions options, - PlayerIdentity identity, TimeSpan begin, TimeSpan end, out int apmRowIndex) { // these commands should appear in this order by default var orderedCommands = new List(); - orderedCommands.AddRange(RA3Commands.UnknownCommands); - orderedCommands.AddRange(RA3Commands.AutoCommands); - orderedCommands.AddRange(new byte[] - { + orderedCommands.AddRange( + [ 0xF5, 0xF8, 0x2A, @@ -83,7 +80,9 @@ namespace AnotherReplayReader.Apm 0x02, 0x0C, 0x10, - }); + ]); + orderedCommands.AddRange(RA3Commands.AutoCommands); + orderedCommands.AddRange(RA3Commands.UnknownCommands); var dataList = new List { @@ -108,13 +107,6 @@ namespace AnotherReplayReader.Apm } dataList.Add(new("存活状态(推测)", plotter.Players.Select(GetStatus))); } - if (plotter.Replay.Type is ReplayType.Lan && identity.IsUsable) - { - string GetIpAndName(Player player) => player.IsComputer - ? "这是 AI" - : identity.QueryRealNameAndIP(player.PlayerIp) ?? string.Empty; - dataList.Add(new("局域网 IP", plotter.Players.Select(GetIpAndName))); - } apmRowIndex = dataList.Count; // kill-death ratio if (plotter.Replay.Footer?.TryGetKillDeathRatios() is { } kdRatios) diff --git a/ApmWindow.xaml b/ApmWindow.xaml index 10a673a..6dfe615 100644 --- a/ApmWindow.xaml +++ b/ApmWindow.xaml @@ -68,13 +68,6 @@ -