├── README.md
├── Logs Chat Record Extractor WPF
├── Fonts
│ ├── AXIS Std R.otf
│ ├── 华康青花黑 Std W5.otf
│ └── XIV AXIS Std ATK.ttf
├── packages.config
├── chat_128px_1309578_easyicon.net.ico
├── App.config
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── Models
│ ├── Line.cs
│ ├── ChatInfo.cs
│ ├── ChatType.cs
│ ├── ChatTypeHandler.cs
│ └── Chat.cs
├── App.xaml.cs
├── Logs Chat Record Extractor WPF.csproj.user
├── App.xaml
├── Utils
│ ├── FindWord.cs
│ ├── TextChecker.cs
│ └── LogReader.cs
├── FileChooser.xaml
├── MainWindow.xaml
├── FileChooser.xaml.cs
├── Filter.xaml
├── Filter.xaml.cs
├── MainWindow.xaml.cs
└── Logs Chat Record Extractor WPF.csproj
├── Logs chat record extractor
├── chat_128px_1309578_easyicon.net.ico
├── App.config
├── Logs chat record extractor.csproj.user
├── Properties
│ ├── Settings.settings
│ ├── AssemblyInfo.cs
│ ├── Settings.Designer.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── Models
│ ├── Line.cs
│ ├── ChatInfo.cs
│ ├── ChatType.cs
│ ├── ChatTypeHandler.cs
│ └── Chat.cs
├── Program.cs
├── TextChecker.cs
├── Form1.Designer.cs
├── FilterForm.cs
├── Logs chat record extractor.csproj
├── MainForm.cs
├── FilterForm.resx
├── FindForm.cs
├── FindForm.Designer.cs
├── MainForm.Designer.cs
├── Form1.cs
└── FilterForm.Designer.cs
├── LICENSE
├── .gitignore
└── Logs chat record extractor.sln
/README.md:
--------------------------------------------------------------------------------
1 | # 用于最终幻想14的ACT聊天记录加载器
2 |
3 | 此软件可以用于加载由最终幻想14ACT生成的logs文件中的聊天记录,前提是没有勾选ACT解析插件中“不记录聊天”的选项。
4 |
5 | 打开后点击选择文件,选择act生成的logs文件即可
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/Fonts/AXIS Std R.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MadYeling/Logs_Chat_Record_Extractor/HEAD/Logs Chat Record Extractor WPF/Fonts/AXIS Std R.otf
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/Fonts/华康青花黑 Std W5.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MadYeling/Logs_Chat_Record_Extractor/HEAD/Logs Chat Record Extractor WPF/Fonts/华康青花黑 Std W5.otf
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/Fonts/XIV AXIS Std ATK.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MadYeling/Logs_Chat_Record_Extractor/HEAD/Logs Chat Record Extractor WPF/Fonts/XIV AXIS Std ATK.ttf
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Logs chat record extractor/chat_128px_1309578_easyicon.net.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MadYeling/Logs_Chat_Record_Extractor/HEAD/Logs chat record extractor/chat_128px_1309578_easyicon.net.ico
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/chat_128px_1309578_easyicon.net.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MadYeling/Logs_Chat_Record_Extractor/HEAD/Logs Chat Record Extractor WPF/chat_128px_1309578_easyicon.net.ico
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Logs chat record extractor/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Logs chat record extractor/Logs chat record extractor.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ProjectFiles
5 |
6 |
--------------------------------------------------------------------------------
/Logs chat record extractor/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GLWT(Good Luck With That,祝你好运)公共许可证
2 | 版权所有© 每个人,除了作者
3 |
4 | 任何人都被允许复制、分发、修改、合并、销售、出版、再授权或
5 | 任何其它操作,但风险自负。
6 |
7 | 作者对这个项目中的代码一无所知。
8 | 代码处于可用或不可用状态,没有第三种情况。
9 |
10 |
11 | 祝你好运公共许可证
12 | 复制、分发和修改的条款和条件
13 |
14 | 0 :在不导致作者被指责或承担责任的情况下,你可以做任何你想
15 | 要做的事情。
16 |
17 | 无论是在合同行为、侵权行为或其它因使用本软件产生的情形,作
18 | 者不对任何索赔、损害承担责任。
19 |
20 | 祖宗保佑。
21 |
--------------------------------------------------------------------------------
/Logs chat record extractor/Models/Line.cs:
--------------------------------------------------------------------------------
1 | namespace Logs_chat_record_extractor.Models
2 | {
3 | public class Line
4 | {
5 | public string lineText { get; }
6 | public string lineCheck { get; }
7 |
8 | public Line(string lineText, string lineCheck)
9 | {
10 | this.lineText = lineText;
11 | this.lineCheck = lineCheck;
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/Models/Line.cs:
--------------------------------------------------------------------------------
1 | namespace Logs_Chat_Record_Extractor_WPF.Models
2 | {
3 | public class Line
4 | {
5 | public string lineText { get; }
6 | public string lineCheck { get; }
7 |
8 | public Line(string lineText, string lineCheck)
9 | {
10 | this.lineText = lineText;
11 | this.lineCheck = lineCheck;
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace Logs_Chat_Record_Extractor_WPF
10 | {
11 | ///
12 | /// App.xaml 的交互逻辑
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Logs chat record extractor/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms;
3 |
4 | namespace Logs_chat_record_extractor
5 | {
6 | static class Program
7 | {
8 | ///
9 | /// 应用程序的主入口点。
10 | ///
11 | [STAThread]
12 | static void Main()
13 | {
14 | Application.EnableVisualStyles();
15 | Application.SetCompatibleTextRenderingDefault(false);
16 | Application.Run(new FormOpen());
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
3 | ################################################################################
4 |
5 | /Logs chat record extractor/bin
6 | /Logs chat record extractor/obj
7 | /Logs chat record extractor.sln.DotSettings.user
8 | /.vs/Logs chat record extractor
9 | /.idea/.idea.Logs chat record extractor/.idea
10 | /Logs chat record extractor WPF/bin
11 | /Logs chat record extractor WPF/obj
12 | /.vs/Logs chat record extractor WPF
13 | /.idea/.idea.Logs chat record extractor WPF/.idea
--------------------------------------------------------------------------------
/Logs chat record extractor/Models/ChatInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Drawing;
2 |
3 | namespace Logs_chat_record_extractor.Models
4 | {
5 | public class ChatInfo
6 | {
7 | public ChatType ChatType { get; set; }
8 | public Color ChatColor { get; set; }
9 | public string ChatCode { get; set; }
10 |
11 | public ChatInfo(ChatType chatType, Color chatColor, string chatCode)
12 | {
13 | ChatType = chatType;
14 | ChatColor = chatColor;
15 | ChatCode = chatCode;
16 | }
17 |
18 | public ChatInfo()
19 | {
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/Logs Chat Record Extractor WPF.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ProjectFiles
5 | publish\
6 |
7 |
8 |
9 |
10 |
11 | zh-CN
12 | false
13 |
14 |
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/Models/ChatInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Drawing;
2 | using System.Windows.Media;
3 |
4 | namespace Logs_Chat_Record_Extractor_WPF.Models
5 | {
6 | public class ChatInfo
7 | {
8 | public ChatType ChatType { get; set; }
9 | public Color ChatColor { get; set; }
10 | public string ChatCode { get; set; }
11 |
12 | public ChatInfo(ChatType chatType, Color chatColor, string chatCode)
13 | {
14 | ChatType = chatType;
15 | ChatColor = chatColor;
16 | ChatCode = chatCode;
17 | }
18 |
19 | public ChatInfo()
20 | {
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Logs chat record extractor/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // 有关程序集的一般信息由以下
5 | // 控制。更改这些特性值可修改
6 | // 与程序集关联的信息。
7 | [assembly: AssemblyTitle("用于加载由ACT生成的LOGS文件中的聊天内容")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("ACT聊天记录加载器")]
12 | [assembly: AssemblyCopyright("Copyright © 2021")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // 将 ComVisible 设置为 false 会使此程序集中的类型
17 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
18 | //请将此类型的 ComVisible 特性设置为 true。
19 | [assembly: ComVisible(false)]
20 |
21 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
22 | [assembly: Guid("b37f6611-87bc-44cf-a1d5-2fad23c9e412")]
23 |
24 | // 程序集的版本信息由下列四个值组成:
25 | //
26 | // 主版本
27 | // 次版本
28 | // 生成号
29 | // 修订号
30 | //
31 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
32 | //通过使用 "*",如下所示:
33 | // [assembly: AssemblyVersion("1.0.*")]
34 | [assembly: AssemblyVersion("1.3.9.0")]
35 | [assembly: AssemblyFileVersion("1.3.9.0")]
--------------------------------------------------------------------------------
/Logs chat record extractor/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Logs_chat_record_extractor.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.2.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/Utils/FindWord.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Documents;
3 |
4 | namespace Logs_Chat_Record_Extractor_WPF.Utils
5 | {
6 | public static class FindWord
7 | {
8 | public static TextPointer FindWordPosition(TextPointer position, string word)
9 | {
10 | while (position != null)
11 | {
12 | if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text)
13 | {
14 | var textRun = position.GetTextInRun(LogicalDirection.Forward);
15 |
16 | // Find the starting index of any substring that matches "word".
17 | var indexInRun = textRun.IndexOf(word, StringComparison.Ordinal);
18 | if (indexInRun >= 0)
19 | {
20 | position = position.GetPositionAtOffset(indexInRun);
21 | break;
22 | }
23 | }
24 | position = position.GetNextContextPosition(LogicalDirection.Forward);
25 | }
26 | return position;
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/FileChooser.xaml:
--------------------------------------------------------------------------------
1 |
12 |
17 |
18 |
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Logs_Chat_Record_Extractor_WPF.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/Utils/TextChecker.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using System.Security.Cryptography;
5 | using System.Text;
6 |
7 | namespace Logs_Chat_Record_Extractor_WPF.Utils
8 | {
9 | public class TextChecker
10 | {
11 |
12 | public static string Encrypt(string line, int lineNub)
13 | {
14 | var text = Encoding.UTF8.GetBytes($"{line}|{lineNub}");
15 | var sha256 = new SHA256Managed();
16 | var textHash = sha256.ComputeHash(text);
17 | var res = u_49152(textHash);
18 | return res;
19 | }
20 |
21 | private static string u_49152(IReadOnlyList byteStr)
22 | {
23 | var lookup = u_49151();
24 | var res = new List();
25 | for (var i = 0; i < 16; i++)
26 | {
27 | res.Add('\0');
28 | }
29 |
30 | for (var i = 0; i < 8; i++)
31 | {
32 | var num = lookup[byteStr[i]];
33 | res[2 * i] = (char)(num % 128);
34 | res[2 * i + 1] = (char)((num >> 16) % 128);
35 | }
36 |
37 | return string.Join("", res);
38 | }
39 |
40 | private static List u_49151()
41 | {
42 | var numArr = new List();
43 | for (var i = 0; i < 256; i++)
44 | {
45 | var temp = $"{i:x02}";
46 | numArr.Add(temp[0] + (temp[1] << 16));
47 | }
48 |
49 | return numArr;
50 | }
51 | }
52 | }
--------------------------------------------------------------------------------
/Logs chat record extractor/TextChecker.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using System.Security.Cryptography;
5 | using System.Text;
6 | using System.Windows.Forms;
7 |
8 | namespace Logs_chat_record_extractor
9 | {
10 | public class TextChecker
11 | {
12 |
13 | public static string Encrypt(string line, int lineNub)
14 | {
15 | var text = Encoding.UTF8.GetBytes($"{line}|{lineNub}");
16 | var sha256 = new SHA256Managed();
17 | var textHash = sha256.ComputeHash(text);
18 | var res = u_49152(textHash);
19 | return res;
20 | }
21 |
22 | private static string u_49152(IReadOnlyList byteStr)
23 | {
24 | var lookup = u_49151();
25 | var res = new List();
26 | for (var i = 0; i < 16; i++)
27 | {
28 | res.Add('\0');
29 | }
30 |
31 | for (var i = 0; i < 8; i++)
32 | {
33 | var num = lookup[byteStr[i]];
34 | res[2 * i] = (char)(num % 128);
35 | res[2 * i + 1] = (char)((num >> 16) % 128);
36 | }
37 |
38 | return string.Join("", res);
39 | }
40 |
41 | private static List u_49151()
42 | {
43 | var numArr = new List();
44 | for (var i = 0; i < 256; i++)
45 | {
46 | var temp = $"{i:x02}";
47 | numArr.Add(temp[0] + (temp[1] << 16));
48 | }
49 |
50 | return numArr;
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/Logs chat record extractor.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.2.32526.322
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Logs chat record extractor", "Logs chat record extractor\Logs chat record extractor.csproj", "{B37F6611-87BC-44CF-A1D5-2FAD23C9E412}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Logs Chat Record Extractor WPF", "Logs Chat Record Extractor WPF\Logs Chat Record Extractor WPF.csproj", "{B051B027-6F58-40A0-857F-58A227770624}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {B37F6611-87BC-44CF-A1D5-2FAD23C9E412}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {B37F6611-87BC-44CF-A1D5-2FAD23C9E412}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {B37F6611-87BC-44CF-A1D5-2FAD23C9E412}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {B37F6611-87BC-44CF-A1D5-2FAD23C9E412}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {B051B027-6F58-40A0-857F-58A227770624}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {B051B027-6F58-40A0-857F-58A227770624}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {B051B027-6F58-40A0-857F-58A227770624}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {B051B027-6F58-40A0-857F-58A227770624}.Release|Any CPU.Build.0 = Release|Any CPU
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {33439386-7E79-4175-A383-5D810398B7FE}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // 有关程序集的一般信息由以下
8 | // 控制。更改这些特性值可修改
9 | // 与程序集关联的信息。
10 | [assembly: AssemblyTitle("Logs Chat Record Extractor WPF")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("Logs Chat Record Extractor WPF")]
15 | [assembly: AssemblyCopyright("Copyright © 2023")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // 将 ComVisible 设置为 false 会使此程序集中的类型
20 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
21 | //请将此类型的 ComVisible 特性设置为 true。
22 | [assembly: ComVisible(false)]
23 |
24 | //若要开始生成可本地化的应用程序,请设置
25 | //.csproj 文件中的 CultureYouAreCodingWith
26 | //例如,如果您在源文件中使用的是美国英语,
27 | //使用的是美国英语,请将 设置为 en-US。 然后取消
28 | //对以下 NeutralResourceLanguage 特性的注释。 更新
29 | //以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //主题特定资源词典所处位置
36 | //(未在页面中找到资源时使用,
37 | //或应用程序资源字典中找到时使用)
38 | ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
39 | //(未在页面中找到资源时使用,
40 | //、应用程序或任何主题专用资源字典中找到时使用)
41 | )]
42 |
43 |
44 | // 程序集的版本信息由下列四个值组成:
45 | //
46 | // 主版本
47 | // 次版本
48 | // 生成号
49 | // 修订号
50 | //
51 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
52 | //通过使用 "*",如下所示:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("2.0.3.0")]
55 | [assembly: NeutralResourcesLanguage("")]
56 | // [assembly: AssemblyFileVersion("2.0.2.0")]
57 |
--------------------------------------------------------------------------------
/Logs chat record extractor/Models/ChatType.cs:
--------------------------------------------------------------------------------
1 | namespace Logs_chat_record_extractor.Models
2 | {
3 | public enum ChatType
4 | {
5 | ///
6 | /// 小队
7 | ///
8 | Party,
9 |
10 | ///
11 | /// 团队
12 | ///
13 | Alliance,
14 |
15 | ///
16 | /// 部队
17 | ///
18 | FreeCompany,
19 |
20 | ///
21 | /// 说话
22 | ///
23 | Speak,
24 |
25 | ///
26 | /// 呼喊
27 | ///
28 | Yell,
29 |
30 | ///
31 | /// 喊话
32 | ///
33 | Shout,
34 |
35 | ///
36 | /// 悄悄话(别人发过来的)
37 | ///
38 | Tell,
39 |
40 | ///
41 | /// 情感动作
42 | ///
43 | Motion,
44 |
45 | ///
46 | /// 新频
47 | ///
48 | Beginner,
49 |
50 | ///
51 | /// 通讯贝
52 | ///
53 | LinkShell1,
54 | LinkShell2,
55 | LinkShell3,
56 | LinkShell4,
57 | LinkShell5,
58 | LinkShell6,
59 | LinkShell7,
60 | LinkShell8,
61 |
62 | ///
63 | /// 跨服通讯贝
64 | ///
65 | CwLinkShell1,
66 | CwLinkShell2,
67 | CwLinkShell3,
68 | CwLinkShell4,
69 | CwLinkShell5,
70 | CwLinkShell6,
71 | CwLinkShell7,
72 | CwLinkShell8,
73 |
74 | ///
75 | /// 用于计数的END枚举
76 | ///
77 | End,
78 |
79 | // 下面这俩必须得放在End后面,这俩不能计数
80 |
81 | ///
82 | /// 自定义情感动作
83 | ///
84 | MotionCustom,
85 |
86 | ///
87 | /// 给别人发送的悄悄话
88 | ///
89 | TellToOther
90 |
91 | }
92 |
93 | }
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/Models/ChatType.cs:
--------------------------------------------------------------------------------
1 | namespace Logs_Chat_Record_Extractor_WPF.Models
2 | {
3 | public enum ChatType
4 | {
5 | ///
6 | /// 小队
7 | ///
8 | Party,
9 |
10 | ///
11 | /// 团队
12 | ///
13 | Alliance,
14 |
15 | ///
16 | /// 部队
17 | ///
18 | FreeCompany,
19 |
20 | ///
21 | /// 说话
22 | ///
23 | Speak,
24 |
25 | ///
26 | /// 呼喊
27 | ///
28 | Yell,
29 |
30 | ///
31 | /// 喊话
32 | ///
33 | Shout,
34 |
35 | ///
36 | /// 悄悄话(别人发过来的)
37 | ///
38 | Tell,
39 |
40 | ///
41 | /// 情感动作
42 | ///
43 | Motion,
44 |
45 | ///
46 | /// 新频
47 | ///
48 | Beginner,
49 |
50 | ///
51 | /// 通讯贝
52 | ///
53 | LinkShell1,
54 | LinkShell2,
55 | LinkShell3,
56 | LinkShell4,
57 | LinkShell5,
58 | LinkShell6,
59 | LinkShell7,
60 | LinkShell8,
61 |
62 | ///
63 | /// 跨服通讯贝
64 | ///
65 | CwLinkShell1,
66 | CwLinkShell2,
67 | CwLinkShell3,
68 | CwLinkShell4,
69 | CwLinkShell5,
70 | CwLinkShell6,
71 | CwLinkShell7,
72 | CwLinkShell8,
73 |
74 | ///
75 | /// 用于计数的END枚举
76 | ///
77 | End,
78 |
79 | // 下面这俩必须得放在End后面,这俩不能计数
80 |
81 | ///
82 | /// 自定义情感动作
83 | ///
84 | MotionCustom,
85 |
86 | ///
87 | /// 给别人发送的悄悄话
88 | ///
89 | TellToOther
90 |
91 | }
92 |
93 | }
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
30 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/FileChooser.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using System.Windows;
3 | using System.Windows.Shapes;
4 | using HandyControl.Tools.Extension;
5 | using Logs_Chat_Record_Extractor_WPF.Models;
6 | using Microsoft.Win32;
7 |
8 | namespace Logs_Chat_Record_Extractor_WPF
9 | {
10 | ///
11 | /// FileChooser.xaml 的交互逻辑
12 | ///
13 | public partial class FileChooser
14 | {
15 | private OpenFileDialog _openFileDialog;
16 | private string _logFilePath = "";
17 | private MainWindow _mainWindow;
18 |
19 | public FileChooser()
20 | {
21 | InitializeComponent();
22 | Init();
23 | InitChecked();
24 | }
25 |
26 | private void Init()
27 | {
28 | Closing += Window_Closing;
29 | _openFileDialog = new OpenFileDialog
30 | {
31 | Title = "请选择LOG文件",
32 | Filter = "log文件(*.log)|*.log"
33 | };
34 | _mainWindow = new MainWindow(this);
35 | }
36 |
37 | ///
38 | /// 初始化过滤器
39 | ///
40 | private static void InitChecked()
41 | {
42 | for (var i = 0; i < ChatTypeHandler.GetIsShowArrayLength(); i++)
43 | {
44 | if (i == (int)ChatType.Party || i == (int)ChatType.Speak ||
45 | i == (int)ChatType.Yell || i == (int)ChatType.Alliance ||
46 | i == (int)ChatType.Shout || i == (int)ChatType.Motion ||
47 | i == (int)ChatType.Tell)
48 | {
49 | ChatTypeHandler.SetIsShowThisChatType(i, true);
50 | }
51 | }
52 | }
53 |
54 | private void Choose_OnClick(object sender, RoutedEventArgs e)
55 | {
56 | if (_openFileDialog.ShowDialog() != true) return;
57 | filePath.Text = _openFileDialog.FileName;
58 | _logFilePath = _openFileDialog.FileName;
59 | }
60 |
61 | private void Load_OnClick(object sender, RoutedEventArgs e)
62 | {
63 | Hide();
64 | _mainWindow.LoadFile(_logFilePath);
65 | _mainWindow.Show();
66 | }
67 |
68 | private void Window_Closing(object sender, CancelEventArgs e)
69 | {
70 | _mainWindow.Killed();
71 | Application.Current.Shutdown(0);
72 | }
73 | }
74 | }
--------------------------------------------------------------------------------
/Logs chat record extractor/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Logs_chat_record_extractor.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// 一个强类型的资源类,用于查找本地化的字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// 返回此类使用的缓存的 ResourceManager 实例。
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Logs_chat_record_extractor.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// 重写当前线程的 CurrentUICulture 属性,对
51 | /// 使用此强类型资源类的所有资源查找执行重写。
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本: 4.0.30319.42000
5 | //
6 | // 对此文件的更改可能导致不正确的行为,如果
7 | // 重新生成代码,则所做更改将丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Logs_Chat_Record_Extractor_WPF.Properties
12 | {
13 |
14 |
15 | ///
16 | /// 强类型资源类,用于查找本地化字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// 返回此类使用的缓存 ResourceManager 实例。
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Logs_Chat_Record_Extractor_WPF.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// 重写当前线程的 CurrentUICulture 属性,对
56 | /// 使用此强类型资源类的所有资源查找执行重写。
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/Filter.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/Logs chat record extractor/Form1.Designer.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace Logs_chat_record_extractor
3 | {
4 | partial class FormOpen
5 | {
6 | ///
7 | /// 必需的设计器变量。
8 | ///
9 | private System.ComponentModel.IContainer components = null;
10 |
11 | ///
12 | /// 清理所有正在使用的资源。
13 | ///
14 | /// 如果应释放托管资源,为 true;否则为 false。
15 | protected override void Dispose(bool disposing)
16 | {
17 | if (disposing && (components != null))
18 | {
19 | components.Dispose();
20 | }
21 | base.Dispose(disposing);
22 | }
23 |
24 | #region Windows 窗体设计器生成的代码
25 |
26 | ///
27 | /// 设计器支持所需的方法 - 不要修改
28 | /// 使用代码编辑器修改此方法的内容。
29 | ///
30 | private void InitializeComponent()
31 | {
32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormOpen));
33 | this.button1 = new System.Windows.Forms.Button();
34 | this.button2 = new System.Windows.Forms.Button();
35 | this.textBox1 = new System.Windows.Forms.TextBox();
36 | this.label1 = new System.Windows.Forms.Label();
37 | this.SuspendLayout();
38 | //
39 | // button1
40 | //
41 | this.button1.Location = new System.Drawing.Point(392, 31);
42 | this.button1.Name = "button1";
43 | this.button1.Size = new System.Drawing.Size(86, 23);
44 | this.button1.TabIndex = 0;
45 | this.button1.Text = "选择文件(&C)";
46 | this.button1.UseVisualStyleBackColor = true;
47 | this.button1.Click += new System.EventHandler(this.button1_Click);
48 | //
49 | // button2
50 | //
51 | this.button2.Location = new System.Drawing.Point(484, 31);
52 | this.button2.Name = "button2";
53 | this.button2.Size = new System.Drawing.Size(75, 23);
54 | this.button2.TabIndex = 1;
55 | this.button2.Text = "加载(&L)";
56 | this.button2.UseVisualStyleBackColor = true;
57 | this.button2.Click += new System.EventHandler(this.button2_Click);
58 | //
59 | // textBox1
60 | //
61 | this.textBox1.Location = new System.Drawing.Point(24, 33);
62 | this.textBox1.Name = "textBox1";
63 | this.textBox1.Size = new System.Drawing.Size(362, 21);
64 | this.textBox1.TabIndex = 2;
65 | //
66 | // label1
67 | //
68 | this.label1.AutoSize = true;
69 | this.label1.Location = new System.Drawing.Point(22, 57);
70 | this.label1.Name = "label1";
71 | this.label1.Size = new System.Drawing.Size(41, 12);
72 | this.label1.TabIndex = 3;
73 | this.label1.Text = "label1";
74 | //
75 | // FormOpen
76 | //
77 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
78 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
79 | this.ClientSize = new System.Drawing.Size(580, 86);
80 | this.Controls.Add(this.label1);
81 | this.Controls.Add(this.textBox1);
82 | this.Controls.Add(this.button2);
83 | this.Controls.Add(this.button1);
84 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
85 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
86 | this.MaximizeBox = false;
87 | this.Name = "FormOpen";
88 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
89 | this.Text = "ACT聊天记录加载器";
90 | this.Load += new System.EventHandler(this.Form1_Load);
91 | this.ResumeLayout(false);
92 | this.PerformLayout();
93 |
94 | }
95 |
96 | #endregion
97 | private System.Windows.Forms.Button button1;
98 | private System.Windows.Forms.Button button2;
99 | private System.Windows.Forms.TextBox textBox1;
100 | private System.Windows.Forms.Label label1;
101 | }
102 | }
103 |
104 |
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/Filter.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.ComponentModel;
3 | using System.Windows;
4 | using System.Windows.Controls;
5 | using System.Windows.Documents;
6 | using Logs_Chat_Record_Extractor_WPF.Models;
7 |
8 | namespace Logs_Chat_Record_Extractor_WPF
9 | {
10 | ///
11 | /// Filter.xaml 的交互逻辑
12 | ///
13 | public partial class Filter
14 | {
15 | private List _chatList;
16 | private readonly MainWindow _owner;
17 |
18 | ///
19 | /// 数组长度
20 | ///
21 | private static readonly int IsShowArrLength = ChatTypeHandler.GetIsShowArrayLength();
22 |
23 | ///
24 | /// 复选框数组
25 | ///
26 | private readonly CheckBox[] _checkBoxArr = new CheckBox[IsShowArrLength];
27 |
28 | public Filter(List chatList, MainWindow owner)
29 | {
30 | InitializeComponent();
31 | _owner = owner;
32 | _chatList = chatList;
33 | Init();
34 | }
35 |
36 | private void Init()
37 | {
38 | // 加载复选框
39 | for (var i = 0; i < _checkBoxArr.Length; i++)
40 | {
41 | LoadCheckBox(i);
42 | _checkBoxArr[i].IsChecked = ChatTypeHandler.IsShowThisChatType(i);
43 | }
44 |
45 | Owner = _owner;
46 |
47 | NormalAllSelect.Click += (sender, args) => { AllSelect(0, 9); };
48 | LinkAllSelect.Click += (sender, args) => { AllSelect(9, 17); };
49 | CwLinkAllSelect.Click += (sender, args) => { AllSelect(17, 25); };
50 | NormalNoneSelect.Click += (sender, args) => { NoSelect(0, 9); };
51 | LinkNoneSelect.Click += (sender, args) => { NoSelect(9, 17); };
52 | CwLinkNoneSelect.Click += (sender, args) => { NoSelect(17, 25); };
53 | }
54 |
55 | ///
56 | /// 将UI中的复选框装填到复选框数组当中
57 | ///
58 | /// 位置
59 | private void LoadCheckBox(int i)
60 | {
61 | var normalCheckBox = new CheckBox()
62 | {
63 | Content = ChatTypeHandler.ChatTypeToName((ChatType)i)
64 | };
65 | _checkBoxArr[i] = normalCheckBox;
66 | if (i < 9)
67 | {
68 | NormalChannel.Children.Add(normalCheckBox);
69 | }
70 | else if (i < 17)
71 | {
72 | LinkShellChannel.Children.Add(normalCheckBox);
73 | }
74 | else if (i < 25)
75 | {
76 | CwLinkShellChannel.Children.Add(normalCheckBox);
77 | }
78 | }
79 |
80 | ///
81 | /// 全选
82 | ///
83 | /// 起始复选框
84 | /// 结束复选框
85 | private void AllSelect(int start, int end)
86 | {
87 | for (var i = start; i < end; i++)
88 | {
89 | if (_checkBoxArr[i].IsEnabled) _checkBoxArr[i].IsChecked = true;
90 | }
91 | }
92 |
93 | ///
94 | /// 取消选择
95 | ///
96 | /// 起始复选框
97 | /// 结束复选框
98 | private void NoSelect(int start, int end)
99 | {
100 | for (var i = start; i < end; i++)
101 | {
102 | if (_checkBoxArr[i].IsEnabled) _checkBoxArr[i].IsChecked = false;
103 | }
104 | }
105 |
106 | private void Submit_OnClick(object sender, RoutedEventArgs e)
107 | {
108 | // 将储存复选框状态的数组修改为对应复选框的选择状态
109 | for (var i = 0; i < IsShowArrLength; i++)
110 | {
111 | ChatTypeHandler.SetIsShowThisChatType(i, (bool)_checkBoxArr[i].IsChecked);
112 | }
113 |
114 | var newChatList = new List();
115 | foreach (var chat in _chatList)
116 | {
117 | chat.Show = ChatTypeHandler.IsShowThisChatType(chat.ChatInfo.ChatType);
118 | newChatList.Add(chat);
119 | }
120 |
121 | Hide();
122 | _owner.RefreshRichTextBox(newChatList);
123 | }
124 |
125 | private void Cancel_OnClick(object sender, RoutedEventArgs e)
126 | {
127 | Close();
128 | }
129 | }
130 | }
--------------------------------------------------------------------------------
/Logs chat record extractor/FilterForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Windows.Forms;
4 | using Logs_chat_record_extractor.Models;
5 |
6 | namespace Logs_chat_record_extractor
7 | {
8 | public partial class FilterForm : Form
9 | {
10 | ///
11 | /// 数组长度
12 | ///
13 | private static readonly int IsShowArrLength = ChatTypeHandler.GetIsShowArrayLength();
14 |
15 | ///
16 | /// 复选框数组
17 | ///
18 | private readonly CheckBox[] _checkBoxArr = new CheckBox[IsShowArrLength];
19 |
20 | ///
21 | /// 主窗口对象
22 | ///
23 | private MainForm _mainForm;
24 |
25 | ///
26 | /// 聊天集合
27 | ///
28 | private readonly List _chatList;
29 |
30 | public FilterForm(List chatList)
31 | {
32 | InitializeComponent();
33 | _chatList = chatList;
34 | }
35 |
36 | private void FilterForm_Load(object sender, EventArgs e)
37 | {
38 | // 获取主窗口对象
39 | _mainForm = (MainForm) Owner;
40 |
41 | // 加载复选框
42 | for (var i = 0; i < _checkBoxArr.Length; i++)
43 | {
44 | LoadCheckBox(i);
45 | _checkBoxArr[i].Checked = ChatTypeHandler.IsShowThisChatType(i);
46 | }
47 |
48 | // 注册各个全选按钮和取消全选按钮的点击事件
49 | g1AllSelect.Click += (o, args) => { AllSelect(0, 9); };
50 | g2AllSelect.Click += (o, args) => { AllSelect(9, 17); };
51 | g3AllSelect.Click += (o, args) => { AllSelect(17, 25); };
52 | g1NoSelect.Click += (o, args) => { NoSelect(0, 9); };
53 | g2NoSelect.Click += (o, args) => { NoSelect(9, 17); };
54 | g3NoSelect.Click += (o, args) => { NoSelect(17, 25); };
55 | }
56 |
57 | ///
58 | /// 将UI中的复选框装填到复选框数组当中
59 | ///
60 | /// 位置
61 | private void LoadCheckBox(int i)
62 | {
63 | if (!(Controls.Find("checkbox" + (i + 1), true)[0] is CheckBox checkBox)) return;
64 | checkBox.Text = ChatTypeHandler.ChatTypeToName((ChatType) i);
65 | _checkBoxArr[i] = checkBox;
66 | }
67 |
68 | ///
69 | /// 确定
70 | ///
71 | ///
72 | ///
73 | private void button1_Click(object sender, EventArgs e)
74 | {
75 | // 将储存复选框状态的数组修改为对应复选框的选择状态
76 | for (var i = 0; i < IsShowArrLength; i++)
77 | {
78 | ChatTypeHandler.SetIsShowThisChatType(i, _checkBoxArr[i].Checked);
79 | }
80 |
81 | var newChatList = new List();
82 | foreach (var chat in _chatList)
83 | {
84 | chat.Show = ChatTypeHandler.IsShowThisChatType(chat.ChatInfo.ChatType);
85 | newChatList.Add(chat);
86 | }
87 |
88 | Hide();
89 | _mainForm.RefreshRichTextBox(newChatList);
90 | }
91 |
92 | ///
93 | /// 取消
94 | ///
95 | ///
96 | ///
97 | private void button2_Click(object sender, EventArgs e)
98 | {
99 | for (var i = 0; i < IsShowArrLength; i++)
100 | {
101 | _checkBoxArr[i].Checked = ChatTypeHandler.IsShowThisChatType(i);
102 | }
103 |
104 | Hide();
105 | }
106 |
107 | ///
108 | /// 全选
109 | ///
110 | /// 起始复选框
111 | /// 结束复选框
112 | private void AllSelect(int start, int end)
113 | {
114 | for (var i = start; i < end; i++)
115 | {
116 | if (_checkBoxArr[i].Enabled) _checkBoxArr[i].Checked = true;
117 | }
118 | }
119 |
120 | ///
121 | /// 取消选择
122 | ///
123 | /// 起始复选框
124 | /// 结束复选框
125 | private void NoSelect(int start, int end)
126 | {
127 | for (var i = start; i < end; i++)
128 | {
129 | if (_checkBoxArr[i].Enabled) _checkBoxArr[i].Checked = false;
130 | }
131 | }
132 | }
133 | }
--------------------------------------------------------------------------------
/Logs chat record extractor/Models/ChatTypeHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Logs_chat_record_extractor.Models
4 | {
5 | public static class ChatTypeHandler
6 | {
7 | ///
8 | /// 是否显示此条聊天的数组
9 | /// 用于记录过滤器的选择状态
10 | ///
11 | private static readonly bool[] IsShowArray = new bool[GetEnumCount()];
12 |
13 | ///
14 | /// 获取数组的长度
15 | ///
16 | ///
17 | public static int GetIsShowArrayLength()
18 | {
19 | return IsShowArray.Length;
20 | }
21 |
22 | ///
23 | /// 是否显示此类型的聊天记录
24 | ///
25 | /// 聊天类型
26 | /// 是否显示
27 | public static bool IsShowThisChatType(ChatType chatType)
28 | {
29 | return IsShowThisChatType(ChatTypeToInt(chatType));
30 | }
31 |
32 | ///
33 | /// 是否显示此类型的聊天记录
34 | ///
35 | /// int类型的聊天类型
36 | /// 是否显示
37 | public static bool IsShowThisChatType(int chatType)
38 | {
39 | return IsShowArray[chatType];
40 | }
41 |
42 | ///
43 | /// 设置是否显示此类型的聊天记录
44 | ///
45 | /// 聊天信息
46 | public static void SetIsShowThisChatType(Chat chat)
47 | {
48 | SetIsShowThisChatType(chat.ChatInfo.ChatType, chat.Show);
49 | }
50 |
51 | ///
52 | /// 设置是否显示此类型的聊天记录
53 | ///
54 | /// 聊天类型
55 | /// 是否显示
56 | public static void SetIsShowThisChatType(ChatType chatType, bool isShow)
57 | {
58 | SetIsShowThisChatType(ChatTypeToInt(chatType), isShow);
59 | }
60 |
61 | ///
62 | /// 设置是否显示此类型的聊天记录
63 | ///
64 | /// int类型的聊天类型
65 | /// 是否显示
66 | public static void SetIsShowThisChatType(int chatType, bool isShow)
67 | {
68 | IsShowArray[chatType] = isShow;
69 | }
70 |
71 | ///
72 | /// 将聊天类型转换为中文
73 | ///
74 | /// 聊天类型
75 | /// 聊天类型的中文名
76 | /// 超出枚举界限
77 | public static string ChatTypeToName(ChatType chatType)
78 | {
79 | switch (chatType)
80 | {
81 | case ChatType.Party: return "小队";
82 | case ChatType.Alliance: return "团队/PVP";
83 | case ChatType.FreeCompany: return "部队";
84 | case ChatType.Speak: return "说话";
85 | case ChatType.Yell: return "呼喊";
86 | case ChatType.Shout: return "喊话";
87 | case ChatType.Tell:
88 | case ChatType.TellToOther:
89 | return "悄悄话";
90 | case ChatType.Motion:
91 | case ChatType.MotionCustom:
92 | return "情感动作";
93 | case ChatType.LinkShell1: return "通讯贝1";
94 | case ChatType.LinkShell2: return "通讯贝2";
95 | case ChatType.LinkShell3: return "通讯贝3";
96 | case ChatType.LinkShell4: return "通讯贝4";
97 | case ChatType.LinkShell5: return "通讯贝5";
98 | case ChatType.LinkShell6: return "通讯贝6";
99 | case ChatType.LinkShell7: return "通讯贝7";
100 | case ChatType.LinkShell8: return "通讯贝8";
101 | case ChatType.CwLinkShell1: return "跨服贝1";
102 | case ChatType.CwLinkShell2: return "跨服贝2";
103 | case ChatType.CwLinkShell3: return "跨服贝3";
104 | case ChatType.CwLinkShell4: return "跨服贝4";
105 | case ChatType.CwLinkShell5: return "跨服贝5";
106 | case ChatType.CwLinkShell6: return "跨服贝6";
107 | case ChatType.CwLinkShell7: return "跨服贝7";
108 | case ChatType.CwLinkShell8: return "跨服贝8";
109 | case ChatType.Beginner: return "新人频道";
110 | case ChatType.End:
111 | return "";
112 | default:
113 | throw new ArgumentOutOfRangeException(nameof(chatType), chatType, null);
114 | }
115 | }
116 |
117 | ///
118 | /// 获取End枚举所在位置
119 | ///
120 | ///
121 | private static int GetEnumCount()
122 | {
123 | return (int) ChatType.End;
124 | }
125 |
126 | ///
127 | /// 将聊天类型转换为int
128 | ///
129 | /// 聊天类型
130 | /// 聊天类型对应数字
131 | private static int ChatTypeToInt(ChatType chatType)
132 | {
133 | switch (chatType)
134 | {
135 | case ChatType.MotionCustom:
136 | return (int) ChatType.Motion;
137 | case ChatType.TellToOther:
138 | return (int) ChatType.Tell;
139 | default:
140 | return (int) chatType;
141 | }
142 | }
143 | }
144 | }
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/Models/ChatTypeHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Logs_Chat_Record_Extractor_WPF.Models
4 | {
5 | public static class ChatTypeHandler
6 | {
7 | ///
8 | /// 是否显示此条聊天的数组
9 | /// 用于记录过滤器的选择状态
10 | ///
11 | private static readonly bool[] IsShowArray = new bool[GetEnumCount()];
12 |
13 | ///
14 | /// 获取数组的长度
15 | ///
16 | ///
17 | public static int GetIsShowArrayLength()
18 | {
19 | return IsShowArray.Length;
20 | }
21 |
22 | ///
23 | /// 是否显示此类型的聊天记录
24 | ///
25 | /// 聊天类型
26 | /// 是否显示
27 | public static bool IsShowThisChatType(ChatType chatType)
28 | {
29 | return IsShowThisChatType(ChatTypeToInt(chatType));
30 | }
31 |
32 | ///
33 | /// 是否显示此类型的聊天记录
34 | ///
35 | /// int类型的聊天类型
36 | /// 是否显示
37 | public static bool IsShowThisChatType(int chatType)
38 | {
39 | return IsShowArray[chatType];
40 | }
41 |
42 | ///
43 | /// 设置是否显示此类型的聊天记录
44 | ///
45 | /// 聊天信息
46 | public static void SetIsShowThisChatType(Chat chat)
47 | {
48 | SetIsShowThisChatType(chat.ChatInfo.ChatType, chat.Show);
49 | }
50 |
51 | ///
52 | /// 设置是否显示此类型的聊天记录
53 | ///
54 | /// 聊天类型
55 | /// 是否显示
56 | public static void SetIsShowThisChatType(ChatType chatType, bool isShow)
57 | {
58 | SetIsShowThisChatType(ChatTypeToInt(chatType), isShow);
59 | }
60 |
61 | ///
62 | /// 设置是否显示此类型的聊天记录
63 | ///
64 | /// int类型的聊天类型
65 | /// 是否显示
66 | public static void SetIsShowThisChatType(int chatType, bool isShow)
67 | {
68 | IsShowArray[chatType] = isShow;
69 | }
70 |
71 | ///
72 | /// 将聊天类型转换为中文
73 | ///
74 | /// 聊天类型
75 | /// 聊天类型的中文名
76 | /// 超出枚举界限
77 | public static string ChatTypeToName(ChatType chatType)
78 | {
79 | switch (chatType)
80 | {
81 | case ChatType.Party: return "小队";
82 | case ChatType.Alliance: return "团队/PVP";
83 | case ChatType.FreeCompany: return "部队";
84 | case ChatType.Speak: return "说话";
85 | case ChatType.Yell: return "呼喊";
86 | case ChatType.Shout: return "喊话";
87 | case ChatType.Tell:
88 | case ChatType.TellToOther:
89 | return "悄悄话";
90 | case ChatType.Motion:
91 | case ChatType.MotionCustom:
92 | return "情感动作";
93 | case ChatType.LinkShell1: return "通讯贝1";
94 | case ChatType.LinkShell2: return "通讯贝2";
95 | case ChatType.LinkShell3: return "通讯贝3";
96 | case ChatType.LinkShell4: return "通讯贝4";
97 | case ChatType.LinkShell5: return "通讯贝5";
98 | case ChatType.LinkShell6: return "通讯贝6";
99 | case ChatType.LinkShell7: return "通讯贝7";
100 | case ChatType.LinkShell8: return "通讯贝8";
101 | case ChatType.CwLinkShell1: return "跨服贝1";
102 | case ChatType.CwLinkShell2: return "跨服贝2";
103 | case ChatType.CwLinkShell3: return "跨服贝3";
104 | case ChatType.CwLinkShell4: return "跨服贝4";
105 | case ChatType.CwLinkShell5: return "跨服贝5";
106 | case ChatType.CwLinkShell6: return "跨服贝6";
107 | case ChatType.CwLinkShell7: return "跨服贝7";
108 | case ChatType.CwLinkShell8: return "跨服贝8";
109 | case ChatType.Beginner: return "新人频道";
110 | case ChatType.End:
111 | return "";
112 | default:
113 | throw new ArgumentOutOfRangeException(nameof(chatType), chatType, null);
114 | }
115 | }
116 |
117 | ///
118 | /// 获取End枚举所在位置
119 | ///
120 | ///
121 | private static int GetEnumCount()
122 | {
123 | return (int) ChatType.End;
124 | }
125 |
126 | ///
127 | /// 将聊天类型转换为int
128 | ///
129 | /// 聊天类型
130 | /// 聊天类型对应数字
131 | private static int ChatTypeToInt(ChatType chatType)
132 | {
133 | switch (chatType)
134 | {
135 | case ChatType.MotionCustom:
136 | return (int) ChatType.Motion;
137 | case ChatType.TellToOther:
138 | return (int) ChatType.Tell;
139 | default:
140 | return (int) chatType;
141 | }
142 | }
143 | }
144 | }
--------------------------------------------------------------------------------
/Logs chat record extractor/Models/Chat.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Logs_chat_record_extractor.Models
4 | {
5 | public class Chat
6 | {
7 | ///
8 | /// 聊天信息
9 | ///
10 | public ChatInfo ChatInfo { get; set; }
11 |
12 | ///
13 | /// 时间
14 | ///
15 | public string Time { get; set; }
16 |
17 | ///
18 | /// 玩家名称
19 | ///
20 | public string PlayerName { get; set; }
21 |
22 | ///
23 | /// 聊天内容
24 | ///
25 | public string Context { get; set; }
26 |
27 | ///
28 | /// 是否显示
29 | ///
30 | public bool Show { get; set; }
31 |
32 | public override string ToString()
33 | {
34 | if (ChatInfo.ChatType == ChatType.Motion)
35 | {
36 | return TimeToString() + Context;
37 | }
38 |
39 | return TimeToString() + NameToString() + Context;
40 | }
41 |
42 | ///
43 | /// 将聊天类型转文字
44 | ///
45 | /// 是否为固定显示
46 | /// 转换的文字
47 | /// 超出数组界限
48 | public string ChatTypeToString(bool isPrivate)
49 | {
50 | switch (ChatInfo.ChatType)
51 | {
52 | case ChatType.Party:
53 | case ChatType.Alliance:
54 | case ChatType.Speak:
55 | case ChatType.Yell:
56 | case ChatType.Shout:
57 | case ChatType.Tell:
58 | case ChatType.TellToOther:
59 | case ChatType.Motion:
60 | case ChatType.MotionCustom:
61 | return $"[{ChatTypeHandler.ChatTypeToName(ChatInfo.ChatType)}]";
62 | case ChatType.FreeCompany:
63 | case ChatType.LinkShell1:
64 | case ChatType.LinkShell2:
65 | case ChatType.LinkShell3:
66 | case ChatType.LinkShell4:
67 | case ChatType.LinkShell5:
68 | case ChatType.LinkShell6:
69 | case ChatType.LinkShell7:
70 | case ChatType.LinkShell8:
71 | case ChatType.CwLinkShell1:
72 | case ChatType.CwLinkShell2:
73 | case ChatType.CwLinkShell3:
74 | case ChatType.CwLinkShell4:
75 | case ChatType.CwLinkShell5:
76 | case ChatType.CwLinkShell6:
77 | case ChatType.CwLinkShell7:
78 | case ChatType.CwLinkShell8:
79 | return isPrivate ? $"[{ChatTypeHandler.ChatTypeToName(ChatInfo.ChatType)}]" : "";
80 | case ChatType.Beginner:
81 | return isPrivate ? "[新人]" : "";
82 | case ChatType.End:
83 | break;
84 | default:
85 | throw new ArgumentOutOfRangeException();
86 | }
87 |
88 | return "";
89 | }
90 |
91 | ///
92 | /// 处理玩家名称
93 | ///
94 | /// 处理后的名称
95 | public string NameToString()
96 | {
97 | switch (ChatInfo.ChatType)
98 | {
99 | case ChatType.Yell:
100 | case ChatType.Speak:
101 | case ChatType.Shout:
102 | return PlayerName + " : ";
103 | case ChatType.Party:
104 | case ChatType.Alliance:
105 | return "(" + PlayerName + ") ";
106 | case ChatType.Tell:
107 | return ">>" + PlayerName + " : ";
108 | case ChatType.TellToOther:
109 | return PlayerName + ">>";
110 | case ChatType.Motion:
111 | return "";
112 | case ChatType.MotionCustom:
113 | return PlayerName;
114 | case ChatType.FreeCompany:
115 | case ChatType.LinkShell1:
116 | case ChatType.LinkShell2:
117 | case ChatType.LinkShell3:
118 | case ChatType.LinkShell4:
119 | case ChatType.LinkShell5:
120 | case ChatType.LinkShell6:
121 | case ChatType.LinkShell7:
122 | case ChatType.LinkShell8:
123 | case ChatType.CwLinkShell1:
124 | case ChatType.CwLinkShell2:
125 | case ChatType.CwLinkShell3:
126 | case ChatType.CwLinkShell4:
127 | case ChatType.CwLinkShell5:
128 | case ChatType.CwLinkShell6:
129 | case ChatType.CwLinkShell7:
130 | case ChatType.CwLinkShell8:
131 | return ChatTypeToString(true) + "<" + PlayerName + "> ";
132 | case ChatType.Beginner:
133 | return ChatTypeToString(true) + PlayerName + ": ";
134 | case ChatType.End:
135 | return "";
136 | default:
137 | return PlayerName;
138 | }
139 | }
140 |
141 | ///
142 | /// 处理时间
143 | ///
144 | ///
145 | public string TimeToString()
146 | {
147 | return "[" + Time + "]";
148 | }
149 | }
150 | }
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/Models/Chat.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Logs_Chat_Record_Extractor_WPF.Models
4 | {
5 | public class Chat
6 | {
7 | ///
8 | /// 聊天信息
9 | ///
10 | public ChatInfo ChatInfo { get; set; }
11 |
12 | ///
13 | /// 时间
14 | ///
15 | public string Time { get; set; }
16 |
17 | ///
18 | /// 玩家名称
19 | ///
20 | public string PlayerName { get; set; }
21 |
22 | ///
23 | /// 聊天内容
24 | ///
25 | public string Context { get; set; }
26 |
27 | ///
28 | /// 是否显示
29 | ///
30 | public bool Show { get; set; }
31 |
32 | public override string ToString()
33 | {
34 | if (ChatInfo.ChatType == ChatType.Motion)
35 | {
36 | return TimeToString() + Context;
37 | }
38 |
39 | return TimeToString() + NameToString() + Context;
40 | }
41 |
42 | ///
43 | /// 将聊天类型转文字
44 | ///
45 | /// 是否为固定显示
46 | /// 转换的文字
47 | /// 超出数组界限
48 | public string ChatTypeToString(bool isPrivate)
49 | {
50 | switch (ChatInfo.ChatType)
51 | {
52 | case ChatType.Party:
53 | case ChatType.Alliance:
54 | case ChatType.Speak:
55 | case ChatType.Yell:
56 | case ChatType.Shout:
57 | case ChatType.Tell:
58 | case ChatType.TellToOther:
59 | case ChatType.Motion:
60 | case ChatType.MotionCustom:
61 | return $"[{ChatTypeHandler.ChatTypeToName(ChatInfo.ChatType)}]";
62 | case ChatType.FreeCompany:
63 | case ChatType.LinkShell1:
64 | case ChatType.LinkShell2:
65 | case ChatType.LinkShell3:
66 | case ChatType.LinkShell4:
67 | case ChatType.LinkShell5:
68 | case ChatType.LinkShell6:
69 | case ChatType.LinkShell7:
70 | case ChatType.LinkShell8:
71 | case ChatType.CwLinkShell1:
72 | case ChatType.CwLinkShell2:
73 | case ChatType.CwLinkShell3:
74 | case ChatType.CwLinkShell4:
75 | case ChatType.CwLinkShell5:
76 | case ChatType.CwLinkShell6:
77 | case ChatType.CwLinkShell7:
78 | case ChatType.CwLinkShell8:
79 | return isPrivate ? $"[{ChatTypeHandler.ChatTypeToName(ChatInfo.ChatType)}]" : "";
80 | case ChatType.Beginner:
81 | return isPrivate ? "[新人]" : "";
82 | case ChatType.End:
83 | break;
84 | default:
85 | throw new ArgumentOutOfRangeException();
86 | }
87 |
88 | return "";
89 | }
90 |
91 | ///
92 | /// 处理玩家名称
93 | ///
94 | /// 处理后的名称
95 | public string NameToString()
96 | {
97 | switch (ChatInfo.ChatType)
98 | {
99 | case ChatType.Yell:
100 | case ChatType.Speak:
101 | case ChatType.Shout:
102 | return PlayerName + " : ";
103 | case ChatType.Party:
104 | case ChatType.Alliance:
105 | return "(" + PlayerName + ") ";
106 | case ChatType.Tell:
107 | return ">>" + PlayerName + " : ";
108 | case ChatType.TellToOther:
109 | return PlayerName + ">>";
110 | case ChatType.Motion:
111 | return "";
112 | case ChatType.MotionCustom:
113 | return PlayerName;
114 | case ChatType.FreeCompany:
115 | case ChatType.LinkShell1:
116 | case ChatType.LinkShell2:
117 | case ChatType.LinkShell3:
118 | case ChatType.LinkShell4:
119 | case ChatType.LinkShell5:
120 | case ChatType.LinkShell6:
121 | case ChatType.LinkShell7:
122 | case ChatType.LinkShell8:
123 | case ChatType.CwLinkShell1:
124 | case ChatType.CwLinkShell2:
125 | case ChatType.CwLinkShell3:
126 | case ChatType.CwLinkShell4:
127 | case ChatType.CwLinkShell5:
128 | case ChatType.CwLinkShell6:
129 | case ChatType.CwLinkShell7:
130 | case ChatType.CwLinkShell8:
131 | return ChatTypeToString(true) + "<" + PlayerName + "> ";
132 | case ChatType.Beginner:
133 | return ChatTypeToString(true) + PlayerName + ": ";
134 | case ChatType.End:
135 | return "";
136 | default:
137 | return PlayerName;
138 | }
139 | }
140 |
141 | ///
142 | /// 处理时间
143 | ///
144 | ///
145 | public string TimeToString()
146 | {
147 | return "[" + Time + "]";
148 | }
149 | }
150 | }
--------------------------------------------------------------------------------
/Logs chat record extractor/Logs chat record extractor.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {B37F6611-87BC-44CF-A1D5-2FAD23C9E412}
8 | WinExe
9 | Logs_chat_record_extractor
10 | Logs chat record extractor
11 | v4.8
12 | 512
13 | true
14 | true
15 |
16 |
17 |
18 | AnyCPU
19 | true
20 | full
21 | false
22 | bin\Debug\
23 | DEBUG;TRACE
24 | prompt
25 | 4
26 | false
27 |
28 |
29 | AnyCPU
30 | pdbonly
31 | true
32 | bin\Release\
33 | TRACE
34 | prompt
35 | 4
36 | false
37 |
38 |
39 | chat_128px_1309578_easyicon.net.ico
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 | Form
57 |
58 |
59 | FilterForm.cs
60 |
61 |
62 | Form
63 |
64 |
65 | FindForm.cs
66 |
67 |
68 | Form
69 |
70 |
71 | Form1.cs
72 |
73 |
74 | Form
75 |
76 |
77 | MainForm.cs
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 | FilterForm.cs
89 |
90 |
91 | FindForm.cs
92 |
93 |
94 | Form1.cs
95 |
96 |
97 | MainForm.cs
98 |
99 |
100 | ResXFileCodeGenerator
101 | Resources.Designer.cs
102 | Designer
103 |
104 |
105 | True
106 | Resources.resx
107 | True
108 |
109 |
110 | SettingsSingleFileGenerator
111 | Settings.Designer.cs
112 |
113 |
114 | True
115 | Settings.settings
116 | True
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
--------------------------------------------------------------------------------
/Logs chat record extractor/MainForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Windows.Forms;
5 | using Logs_chat_record_extractor.Models;
6 |
7 | namespace Logs_chat_record_extractor
8 | {
9 | public partial class MainForm : Form
10 | {
11 | ///
12 | /// 聊天集合
13 | ///
14 | private readonly List _chatList;
15 |
16 | ///
17 | /// 标题
18 | ///
19 | private readonly string _myTitle;
20 |
21 | ///
22 | /// 过滤器窗口对象
23 | ///
24 | private FilterForm _filterForm;
25 |
26 | ///
27 | /// 显示时间
28 | ///
29 | private bool _showTime = true;
30 |
31 | ///
32 | /// 显示类型
33 | ///
34 | private bool _showHead;
35 |
36 |
37 | public MainForm(List chatList, string myTitle)
38 | {
39 | InitializeComponent();
40 | FormClosed += MainForm_FormClosed;
41 | KeyDown += mainForm_KeyDown;
42 | _chatList = chatList;
43 | _myTitle = myTitle;
44 | }
45 |
46 | public sealed override string Text
47 | {
48 | get => base.Text;
49 | set => base.Text = value;
50 | }
51 |
52 | ///
53 | /// 加载窗口
54 | ///
55 | ///
56 | ///
57 | ///
58 | private void MainForm_Load(object sender, EventArgs e)
59 | {
60 | Text = _myTitle;
61 | RefreshRichTextBox(_chatList);
62 | }
63 |
64 | ///
65 | /// 刷新富文本框
66 | ///
67 | /// 聊天集合
68 | public void RefreshRichTextBox(IEnumerable chatList)
69 | {
70 | // 清空内容
71 | richTextBox1.Text = "";
72 | // 锁定富文本框
73 | richTextBox1.Enabled = false;
74 | // 遍历读取聊天记录集合
75 | foreach (var chat in chatList.Where(chat => chat.Show))
76 | {
77 | // 设置文本颜色
78 | richTextBox1.SelectionColor = chat.ChatInfo.ChatColor;
79 | // 是否显示时间
80 | if (_showTime) richTextBox1.AppendText(chat.TimeToString());
81 | // 是否显示类型
82 | if (_showHead) richTextBox1.AppendText(chat.ChatTypeToString(false));
83 |
84 | richTextBox1.AppendText(chat.NameToString());
85 | richTextBox1.AppendText(chat.Context);
86 | richTextBox1.AppendText("\r\n");
87 | }
88 |
89 | // 从顶部开始浏览
90 | richTextBox1.Select(0, 0);
91 | richTextBox1.ScrollToCaret();
92 | // 解锁富文本框
93 | richTextBox1.Enabled = true;
94 | }
95 |
96 | ///
97 | /// 当关闭此窗口时,显示被隐藏的前一个窗口
98 | ///
99 | ///
100 | ///
101 | private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
102 | {
103 | Owner.Show();
104 | }
105 |
106 | ///
107 | /// 菜单过滤器点击事件
108 | ///
109 | ///
110 | ///
111 | private void filterToolStripMenuItem_Click(object sender, EventArgs e)
112 | {
113 | if (_filterForm == null)
114 | {
115 | _filterForm = new FilterForm(_chatList);
116 | }
117 |
118 | _filterForm.Show(this);
119 | }
120 |
121 | ///
122 | /// 退出程序
123 | ///
124 | ///
125 | ///
126 | private void exitToolStripMenuItem_Click(object sender, EventArgs e)
127 | {
128 | Application.Exit();
129 | }
130 |
131 | ///
132 | /// 菜单显示时间点击事件
133 | ///
134 | ///
135 | ///
136 | private void timeToolStripMenuItem_Click(object sender, EventArgs e)
137 | {
138 | _showTime = !_showTime;
139 | timeToolStripMenuItem.Checked = _showTime;
140 | RefreshRichTextBox(_chatList);
141 | }
142 |
143 | ///
144 | /// 菜单显示消息类型点击事件
145 | ///
146 | ///
147 | ///
148 | private void headToolStripMenuItem_Click(object sender, EventArgs e)
149 | {
150 | _showHead = !_showHead;
151 | headToolStripMenuItem.Checked = _showHead;
152 | RefreshRichTextBox(_chatList);
153 | }
154 |
155 | ///
156 | /// 拦截组合键
157 | ///
158 | ///
159 | ///
160 | private void mainForm_KeyDown(object sender, KeyEventArgs e)
161 | {
162 | // Ctrl+F
163 | if (e.KeyCode == Keys.F && e.Modifiers == Keys.Control)
164 | {
165 | new FindForm(richTextBox1).Show(this);
166 | }
167 | }
168 |
169 | ///
170 | /// 菜单寻找选项点击事件
171 | ///
172 | ///
173 | ///
174 | private void findToolStripMenuItem_Click(object sender, EventArgs e)
175 | {
176 | // 弹出寻找窗口
177 | new FindForm(richTextBox1).Show(this);
178 | }
179 | }
180 | }
--------------------------------------------------------------------------------
/Logs chat record extractor/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/Logs chat record extractor/FilterForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/Logs chat record extractor/FindForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms;
3 |
4 | namespace Logs_chat_record_extractor
5 | {
6 | public partial class FindForm : Form
7 | {
8 | ///
9 | /// 是否大小写
10 | ///
11 | private static bool _isMatchCase = true;
12 |
13 | ///
14 | /// 是否循环
15 | ///
16 | private static bool _isCycle;
17 |
18 | ///
19 | /// 搜索方向,true为向上,false为向下
20 | ///
21 | private static bool _direction;
22 |
23 | ///
24 | /// 上次搜索的内容
25 | ///
26 | private static string _lastFindText = "";
27 |
28 | ///
29 | /// 富文本框对象
30 | ///
31 | private readonly RichTextBox _richTextBox;
32 |
33 | ///
34 | /// 含参的构造函数
35 | ///
36 | /// 富文本框
37 | public FindForm(RichTextBox richTextBox)
38 | {
39 | InitializeComponent();
40 |
41 | // 传入对象
42 | _richTextBox = richTextBox;
43 |
44 | // 注册关闭事件
45 | FormClosed += FindForm_Closed;
46 |
47 | // 先把按钮状态设置一下
48 | checkBox1.Checked = _isMatchCase;
49 | checkBox2.Checked = _isCycle;
50 | radioButton1.Checked = _direction;
51 | radioButton2.Checked = !_direction;
52 |
53 | string clipboardText;
54 |
55 | // 三个优先级,最优先填充选择内容,其次上次搜索内容,最后剪切板内容
56 | // 都没有就把按钮禁掉
57 | if (!"".Equals(richTextBox.SelectedText))
58 | {
59 | textBox1.Text = richTextBox.SelectedText;
60 | }
61 | else if (!"".Equals(_lastFindText))
62 | {
63 | textBox1.Text = _lastFindText;
64 | }
65 | // 当剪切板里面的东西太长的时候,大概是复制到了奇怪的东西,就不填进去了
66 | else if (Clipboard.ContainsText(TextDataFormat.Text) &&
67 | (clipboardText = Clipboard.GetText(TextDataFormat.Text)).Length < 10)
68 | {
69 | textBox1.Text = clipboardText;
70 | }
71 | else
72 | {
73 | button1.Enabled = false;
74 | }
75 | }
76 |
77 | ///
78 | /// 匹配大小写选择框 状态变更
79 | ///
80 | ///
81 | ///
82 | private void checkBox1_CheckedChanged(object sender, EventArgs e)
83 | {
84 | _isMatchCase = checkBox1.Checked;
85 | }
86 |
87 | ///
88 | /// 循环选择框 状态变更
89 | ///
90 | ///
91 | ///
92 | private void checkBox2_CheckedChanged(object sender, EventArgs e)
93 | {
94 | _isCycle = checkBox2.Checked;
95 | }
96 |
97 | ///
98 | /// 搜索文本框 文本变更
99 | ///
100 | ///
101 | ///
102 | private void textBox1_TextChanged(object sender, EventArgs e)
103 | {
104 | button1.Enabled = !"".Equals(textBox1.Text);
105 | }
106 |
107 | ///
108 | /// 取消按钮 点击事件
109 | ///
110 | ///
111 | ///
112 | private void button2_Click(object sender, EventArgs e)
113 | {
114 | Close();
115 | }
116 |
117 | ///
118 | /// 查找按钮 点击事件
119 | ///
120 | ///
121 | ///
122 | private void button1_Click(object sender, EventArgs e)
123 | {
124 | MyFind(textBox1.Text, false);
125 | }
126 |
127 | ///
128 | /// 向上单选按钮 状态变更
129 | ///
130 | ///
131 | ///
132 | private void radioButton1_CheckedChanged(object sender, EventArgs e)
133 | {
134 | _direction = radioButton1.Checked;
135 | }
136 |
137 | ///
138 | /// 向下单选按钮 状态变更
139 | ///
140 | ///
141 | ///
142 | private void radioButton2_CheckedChanged(object sender, EventArgs e)
143 | {
144 | _direction = !radioButton2.Checked;
145 | }
146 |
147 | ///
148 | /// 查找
149 | ///
150 | /// 查找的内容
151 | /// 是否为第二次寻找
152 | private void MyFind(string str, bool seekAgain)
153 | {
154 | // 获取光标位置
155 | var rboxL = _richTextBox.SelectionStart;
156 | // 从上往下搜索需要以选中内容的结尾作为开始,不然会一直搜索到同一个内容
157 | var downStart = _richTextBox.SelectionStart + _richTextBox.SelectionLength;
158 | // 使用自带方法进行查找
159 | // 这是一个带有数个三元运算的神奇语句
160 | // 其实并不是很难读懂嘛
161 | var index = _richTextBox.Find(str,
162 | _direction ? 0 : downStart,
163 | _direction ? rboxL : _richTextBox.MaxLength,
164 | (_direction ? RichTextBoxFinds.Reverse : RichTextBoxFinds.None) |
165 | (_isMatchCase ? RichTextBoxFinds.MatchCase : RichTextBoxFinds.None)
166 | );
167 |
168 | // 找到内容,给予焦点
169 | if (index > -1)
170 | {
171 | _richTextBox.Focus();
172 | }
173 | // 如果开启循环并且没有搜索到需要的内容,就把指针根据方向设置挪到头或尾,然后递归
174 | else if (_isCycle && !seekAgain)
175 | {
176 | _richTextBox.SelectionStart = _direction ? _richTextBox.MaxLength : 0;
177 | // 将二次寻找标志符设置为true防止发生无限递归
178 | MyFind(str, true);
179 | }
180 | // 没有找到内容,发出提示
181 | else
182 | {
183 | MessageBox.Show($"找不到 \"{str}\"", "加载器", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
184 | }
185 | }
186 |
187 | ///
188 | /// 窗体关闭事件
189 | ///
190 | ///
191 | ///
192 | private void FindForm_Closed(object sender, FormClosedEventArgs e)
193 | {
194 | // 把搜索框里面的东西存一下
195 | _lastFindText = textBox1.Text;
196 | }
197 | }
198 | }
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.IO;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Windows;
8 | using System.Windows.Documents;
9 | using System.Windows.Media;
10 | using Logs_Chat_Record_Extractor_WPF.Models;
11 | using Logs_Chat_Record_Extractor_WPF.Utils;
12 |
13 | namespace Logs_Chat_Record_Extractor_WPF
14 | {
15 | ///
16 | /// MainWindow.xaml 的交互逻辑
17 | ///
18 | public partial class MainWindow
19 | {
20 | private readonly Window _owner;
21 | private bool _killed = false;
22 | private LogReader _logReader;
23 |
24 | ///
25 | /// 显示时间
26 | ///
27 | private bool _showTime = true;
28 |
29 | ///
30 | /// 显示类型
31 | ///
32 | private bool _showHead = false;
33 |
34 | private List _chatList;
35 |
36 | private static TextPointer _nextPosition;
37 |
38 | public MainWindow(Window owner)
39 | {
40 | InitializeComponent();
41 | Init();
42 | _owner = owner;
43 | }
44 |
45 | private void Init()
46 | {
47 | Closing += Window_Closing;
48 | var backgroundColor = ColorConverter.ConvertFromString("#555");
49 | if (backgroundColor != null)
50 | RichTextBox.Background = new SolidColorBrush((Color)backgroundColor);
51 | _logReader = new LogReader();
52 | TimeMenuChecker.IsChecked = _showTime;
53 | TypeMenuChecker.IsChecked = _showHead;
54 | RichTextBox.FontFamily = new FontFamily(new Uri("pack://application:,,,/"),
55 | "./Fonts/#XIV AXIS Std ATK, ./Fonts/#AXIS Std R, ./Fonts/#华康青花黑 Std W5");
56 | RichTextBox.FontSize = 18;
57 | }
58 |
59 | private void Window_Closing(object sender, CancelEventArgs e)
60 | {
61 | if (_killed) return;
62 | e.Cancel = true;
63 | Hide();
64 | _owner.Show();
65 | }
66 |
67 | public void Killed()
68 | {
69 | _killed = true;
70 | Close();
71 | }
72 |
73 | public async void LoadFile(string filePath)
74 | {
75 | LoadingCircle.Visibility = Visibility.Visible;
76 | Menu.Visibility = Visibility.Hidden;
77 | RichTextBox.Visibility = Visibility.Hidden;
78 | // 清空内容
79 | RichTextBox.Document.Blocks.Clear();
80 | // 锁定富文本框
81 | RichTextBox.IsEnabled = false;
82 | Title = Path.GetFileName(filePath);
83 | var chatList = await _logReader.LoadFile(filePath);
84 | _chatList = chatList;
85 | if (_chatList.Count == 0)
86 | MessageBox.Show("读取的LOGS中无任何聊天内容!", "注意", MessageBoxButton.OK, MessageBoxImage.Information);
87 | RefreshRichTextBox(chatList);
88 | Menu.Visibility = Visibility.Visible;
89 | RichTextBox.Visibility = Visibility.Visible;
90 | LoadingCircle.Visibility = Visibility.Hidden;
91 | _nextPosition = RichTextBox.Document.ContentStart;
92 | }
93 |
94 | ///
95 | /// 刷新富文本框
96 | ///
97 | public void RefreshRichTextBox(IEnumerable chatList)
98 | {
99 | if (chatList == null)
100 | {
101 | return;
102 | }
103 |
104 | // 清空内容
105 | RichTextBox.Document.Blocks.Clear();
106 | // 锁定富文本框
107 | RichTextBox.IsEnabled = false;
108 | // 遍历读取聊天记录集合
109 | foreach (var chat in chatList.Where(chat => chat.Show))
110 | {
111 | var paragraph = new Paragraph();
112 | var content = new StringBuilder();
113 | // 是否显示时间
114 | if (_showTime) content.Append(chat.TimeToString());
115 | // 是否显示类型
116 | if (_showHead) content.Append(chat.ChatTypeToString(false));
117 |
118 | content.Append(chat.NameToString());
119 | content.Append(chat.Context);
120 | paragraph.Inlines.Add(content.ToString());
121 | paragraph.Foreground = new SolidColorBrush(chat.ChatInfo.ChatColor);
122 | paragraph.LineHeight = 0.1;
123 | paragraph.FontWeight = FontWeights.Black;
124 | RichTextBox.Document.Blocks.Add(paragraph);
125 | }
126 |
127 | // 从顶部开始浏览
128 | RichTextBox.ScrollToHome();
129 | // 解锁富文本框
130 | RichTextBox.IsEnabled = true;
131 | }
132 |
133 | private void Time_OnChecked(object sender, RoutedEventArgs e)
134 | {
135 | _showTime = true;
136 | RefreshRichTextBox(_chatList);
137 | }
138 |
139 | private void Time_OnUnchecked(object sender, RoutedEventArgs e)
140 | {
141 | _showTime = false;
142 | RefreshRichTextBox(_chatList);
143 | }
144 |
145 | private void Type_OnChecked(object sender, RoutedEventArgs e)
146 | {
147 | _showHead = true;
148 | RefreshRichTextBox(_chatList);
149 | }
150 |
151 | private void Type_OnUnchecked(object sender, RoutedEventArgs e)
152 | {
153 | _showHead = false;
154 | RefreshRichTextBox(_chatList);
155 | }
156 |
157 | private void Quit_OnClick(object sender, RoutedEventArgs e)
158 | {
159 | Application.Current.Shutdown(0);
160 | }
161 |
162 | private void Filter_OnClick(object sender, RoutedEventArgs e)
163 | {
164 | new Filter(_chatList, this).Show();
165 | }
166 |
167 | private void FindNext_OnClick(object sender, RoutedEventArgs e)
168 | {
169 | var word = SearchBar.Text;
170 | if (SearchBar.Text == "")
171 | {
172 | return;
173 | }
174 | var start = FindWord.FindWordPosition(_nextPosition, word);
175 | if (start == null)
176 | {
177 | _nextPosition = RichTextBox.Document.ContentStart;
178 | start = FindWord.FindWordPosition(_nextPosition, word);
179 | }
180 |
181 | var end = start.GetPositionAtOffset(word.Length);
182 | _nextPosition = end;
183 | RichTextBox.Selection.Select(start, end);
184 | RichTextBox.Focus();
185 | }
186 | }
187 | }
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/Utils/LogReader.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.IO;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Media;
6 | using HandyControl.Controls;
7 | using Logs_Chat_Record_Extractor_WPF.Models;
8 |
9 | namespace Logs_Chat_Record_Extractor_WPF.Utils
10 | {
11 | public class LogReader
12 | {
13 | private readonly List _chatList;
14 | private static List _chatInfoList;
15 | private static string _timeZone = "+08:00";
16 |
17 | public LogReader()
18 | {
19 | InitChatInfoList();
20 | InitChecked();
21 | _chatList = new List();
22 | }
23 |
24 |
25 | ///
26 | /// 初始化过滤器
27 | ///
28 | private static void InitChecked()
29 | {
30 | for (var i = 0; i < ChatTypeHandler.GetIsShowArrayLength(); i++)
31 | {
32 | if (i == (int)ChatType.Party || i == (int)ChatType.Speak ||
33 | i == (int)ChatType.Yell || i == (int)ChatType.Alliance ||
34 | i == (int)ChatType.Shout || i == (int)ChatType.Motion ||
35 | i == (int)ChatType.Tell)
36 | {
37 | ChatTypeHandler.SetIsShowThisChatType(i, true);
38 | }
39 | }
40 | }
41 |
42 | public async Task> LoadFile(string filePath)
43 | {
44 | _chatList.Clear();
45 | using (
46 | var sr = new StreamReader(
47 | new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)
48 | )
49 | )
50 | {
51 | var line = await sr.ReadLineAsync();
52 | if (line != null && line.Trim() != "")
53 | {
54 | var tempZoneStr = line.Split('|')[1];
55 | _timeZone = tempZoneStr.Substring(tempZoneStr.Length - 6);
56 | }
57 |
58 | // 读取文件
59 | do
60 | {
61 | var chatInfo = IsAChatMessage(line);
62 | if (chatInfo != null)
63 | {
64 | // 装载内容
65 | _chatList.Add(LoadChat(chatInfo, line));
66 | }
67 | } while ((line = await sr.ReadLineAsync()) != null);
68 | }
69 |
70 | return _chatList;
71 | }
72 |
73 | ///
74 | /// 校验读取的目标是否为聊天内容
75 | /// 是则返回聊天信息对象,不是则返回null
76 | /// 更新对6.0log支持,同时支持5.0log
77 | ///
78 | /// 需要校验的内容
79 | /// 返回对象
80 | private static ChatInfo IsAChatMessage(string line)
81 | {
82 | return _chatInfoList.FirstOrDefault(chatInfo =>
83 | line.Contains(_timeZone + chatInfo.ChatCode) || line.Contains(_timeZone + chatInfo.ChatCode.ToUpper()));
84 | }
85 |
86 | ///
87 | /// 装载聊天信息
88 | ///
89 | /// 聊天信息详情
90 | /// 内容
91 | /// 装载完成的聊天信息
92 | private static Chat LoadChat(ChatInfo chatInfo, string line)
93 | {
94 | // 替换小队前面的乱码字符
95 | // line = line.Replace("", "①").Replace("", "②")
96 | // .Replace("", "③").Replace("", "④")
97 | // .Replace("", "⑤").Replace("", "⑥")
98 | // .Replace("", "⑦").Replace("", "⑧")
99 | // // 替换物品乱码
100 | // .Replace("", "")
101 | // // 替换团本乱码
102 | // .Replace("", "Ⓐ").Replace("", "Ⓑ")
103 | // .Replace("", "Ⓒ");->(跨服前面的花瓣)
104 | var sp = line.Split('|');
105 | var time = sp[1].Substring(11, 5);
106 | var chat = new Chat
107 | {
108 | Show = ChatTypeHandler.IsShowThisChatType(chatInfo.ChatType),
109 | ChatInfo = chatInfo,
110 | Time = time,
111 | PlayerName = sp[3],
112 | Context = sp[4]
113 | };
114 | return chat;
115 | }
116 |
117 |
118 | private static void InitChatInfoList()
119 | {
120 | _chatInfoList = new List
121 | {
122 | new ChatInfo(ChatType.Speak, Color.FromRgb(249, 249, 249), "|000a|"),
123 | new ChatInfo(ChatType.Yell, Color.FromRgb(255, 255, 0), "|001e|"),
124 | new ChatInfo(ChatType.Shout, Color.FromRgb(255, 181, 122), "|000b|"),
125 | new ChatInfo(ChatType.Party, Color.FromRgb(122, 234, 255), "|000e|"),
126 | new ChatInfo(ChatType.CwLinkShell1, Color.FromRgb(220, 255, 144), "|0025|"),
127 | new ChatInfo(ChatType.CwLinkShell2, Color.FromRgb(220, 255, 144), "|0065|"),
128 | new ChatInfo(ChatType.CwLinkShell3, Color.FromRgb(220, 255, 144), "|0066|"),
129 | new ChatInfo(ChatType.CwLinkShell4, Color.FromRgb(220, 255, 144), "|0067|"),
130 | new ChatInfo(ChatType.CwLinkShell5, Color.FromRgb(220, 255, 144), "|0068|"),
131 | new ChatInfo(ChatType.CwLinkShell6, Color.FromRgb(220, 255, 144), "|0069|"),
132 | new ChatInfo(ChatType.CwLinkShell7, Color.FromRgb(220, 255, 144), "|006a|"),
133 | new ChatInfo(ChatType.CwLinkShell8, Color.FromRgb(220, 255, 144), "|006b|"),
134 | new ChatInfo(ChatType.LinkShell1, Color.FromRgb(220, 255, 144), "|0010|"),
135 | new ChatInfo(ChatType.LinkShell2, Color.FromRgb(220, 255, 144), "|0011|"),
136 | new ChatInfo(ChatType.LinkShell3, Color.FromRgb(220, 255, 144), "|0012|"),
137 | new ChatInfo(ChatType.LinkShell4, Color.FromRgb(220, 255, 144), "|0013|"),
138 | new ChatInfo(ChatType.LinkShell5, Color.FromRgb(220, 255, 144), "|0014|"),
139 | new ChatInfo(ChatType.LinkShell6, Color.FromRgb(220, 255, 144), "|0015|"),
140 | new ChatInfo(ChatType.LinkShell7, Color.FromRgb(220, 255, 144), "|0016|"),
141 | new ChatInfo(ChatType.LinkShell8, Color.FromRgb(220, 255, 144), "|0017|"),
142 | new ChatInfo(ChatType.Beginner, Color.FromRgb(220, 255, 144), "|001b|"),
143 | new ChatInfo(ChatType.Tell, Color.FromRgb(255, 196, 228), "|000d|"),
144 | new ChatInfo(ChatType.TellToOther, Color.FromRgb(255, 196, 228), "|000c|"),
145 | //官方情感动作
146 | new ChatInfo(ChatType.Motion, Color.FromRgb(198, 255, 243), "|001d|"),
147 | //自定义的情感动作
148 | new ChatInfo(ChatType.MotionCustom, Color.FromRgb(198, 255, 243), "|001c|"),
149 | new ChatInfo(ChatType.FreeCompany, Color.FromRgb(185, 226, 234), "|0018|"),
150 | new ChatInfo(ChatType.Alliance, Color.FromRgb(255, 146, 0), "|000f|"),
151 | };
152 | }
153 | }
154 | }
--------------------------------------------------------------------------------
/Logs Chat Record Extractor WPF/Logs Chat Record Extractor WPF.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {B051B027-6F58-40A0-857F-58A227770624}
8 | WinExe
9 | Logs_Chat_Record_Extractor_WPF
10 | Logs Chat Record Extractor WPF
11 | v4.7.2
12 | 512
13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
14 | 4
15 | true
16 | true
17 | publish\
18 | true
19 | Disk
20 | false
21 | Foreground
22 | 7
23 | Days
24 | false
25 | false
26 | true
27 | 0
28 | 1.0.0.%2a
29 | false
30 | false
31 | true
32 |
33 |
34 | AnyCPU
35 | true
36 | full
37 | false
38 | bin\Debug\
39 | DEBUG;TRACE
40 | prompt
41 | 4
42 |
43 |
44 | AnyCPU
45 | pdbonly
46 | true
47 | bin\Release\
48 | TRACE
49 | prompt
50 | 4
51 |
52 |
53 | chat_128px_1309578_easyicon.net.ico
54 |
55 |
56 |
57 | ..\packages\HandyControl.3.4.0\lib\net472\HandyControl.dll
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | 4.0
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | MSBuild:Compile
77 | Designer
78 |
79 |
80 | FileChooser.xaml
81 |
82 |
83 | Filter.xaml
84 |
85 |
86 |
87 |
88 |
89 | Designer
90 | MSBuild:Compile
91 |
92 |
93 | Designer
94 | MSBuild:Compile
95 |
96 |
97 | MSBuild:Compile
98 | Designer
99 |
100 |
101 | App.xaml
102 | Code
103 |
104 |
105 | MainWindow.xaml
106 | Code
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 | Code
117 |
118 |
119 | True
120 | True
121 | Resources.resx
122 |
123 |
124 | True
125 | Settings.settings
126 | True
127 |
128 |
129 | ResXFileCodeGenerator
130 | Resources.Designer.cs
131 |
132 |
133 | Always
134 |
135 |
136 | Always
137 |
138 |
139 | Always
140 |
141 |
142 |
143 | SettingsSingleFileGenerator
144 | Settings.Designer.cs
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 | False
156 | Microsoft .NET Framework 4.7.2 %28x86 和 x64%29
157 | true
158 |
159 |
160 | False
161 | .NET Framework 3.5 SP1
162 | false
163 |
164 |
165 |
166 |
--------------------------------------------------------------------------------
/Logs chat record extractor/FindForm.Designer.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace Logs_chat_record_extractor
3 | {
4 | partial class FindForm
5 | {
6 | ///
7 | /// Required designer variable.
8 | ///
9 | private System.ComponentModel.IContainer components = null;
10 |
11 | ///
12 | /// Clean up any resources being used.
13 | ///
14 | /// true if managed resources should be disposed; otherwise, false.
15 | protected override void Dispose(bool disposing)
16 | {
17 | if (disposing && (components != null))
18 | {
19 | components.Dispose();
20 | }
21 | base.Dispose(disposing);
22 | }
23 |
24 | #region Windows Form Designer generated code
25 |
26 | ///
27 | /// Required method for Designer support - do not modify
28 | /// the contents of this method with the code editor.
29 | ///
30 | private void InitializeComponent()
31 | {
32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FindForm));
33 | this.label1 = new System.Windows.Forms.Label();
34 | this.textBox1 = new System.Windows.Forms.TextBox();
35 | this.button1 = new System.Windows.Forms.Button();
36 | this.button2 = new System.Windows.Forms.Button();
37 | this.checkBox1 = new System.Windows.Forms.CheckBox();
38 | this.checkBox2 = new System.Windows.Forms.CheckBox();
39 | this.groupBox1 = new System.Windows.Forms.GroupBox();
40 | this.radioButton2 = new System.Windows.Forms.RadioButton();
41 | this.radioButton1 = new System.Windows.Forms.RadioButton();
42 | this.groupBox1.SuspendLayout();
43 | this.SuspendLayout();
44 | //
45 | // label1
46 | //
47 | this.label1.AutoSize = true;
48 | this.label1.Location = new System.Drawing.Point(5, 14);
49 | this.label1.Name = "label1";
50 | this.label1.Size = new System.Drawing.Size(77, 17);
51 | this.label1.TabIndex = 0;
52 | this.label1.Text = "查找内容(&N):";
53 | //
54 | // textBox1
55 | //
56 | this.textBox1.Location = new System.Drawing.Point(86, 11);
57 | this.textBox1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
58 | this.textBox1.Name = "textBox1";
59 | this.textBox1.Size = new System.Drawing.Size(225, 23);
60 | this.textBox1.TabIndex = 1;
61 | this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
62 | //
63 | // button1
64 | //
65 | this.button1.Location = new System.Drawing.Point(327, 8);
66 | this.button1.Name = "button1";
67 | this.button1.Size = new System.Drawing.Size(90, 28);
68 | this.button1.TabIndex = 2;
69 | this.button1.Text = "查找下一个(&F)";
70 | this.button1.UseVisualStyleBackColor = true;
71 | this.button1.Click += new System.EventHandler(this.button1_Click);
72 | //
73 | // button2
74 | //
75 | this.button2.Location = new System.Drawing.Point(327, 42);
76 | this.button2.Name = "button2";
77 | this.button2.Size = new System.Drawing.Size(90, 28);
78 | this.button2.TabIndex = 3;
79 | this.button2.Text = "取消";
80 | this.button2.UseVisualStyleBackColor = true;
81 | this.button2.Click += new System.EventHandler(this.button2_Click);
82 | //
83 | // checkBox1
84 | //
85 | this.checkBox1.AutoSize = true;
86 | this.checkBox1.Location = new System.Drawing.Point(8, 96);
87 | this.checkBox1.Name = "checkBox1";
88 | this.checkBox1.Size = new System.Drawing.Size(103, 21);
89 | this.checkBox1.TabIndex = 4;
90 | this.checkBox1.Text = "区分大小写(&C)";
91 | this.checkBox1.UseVisualStyleBackColor = true;
92 | this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
93 | //
94 | // checkBox2
95 | //
96 | this.checkBox2.AutoSize = true;
97 | this.checkBox2.Location = new System.Drawing.Point(8, 128);
98 | this.checkBox2.Name = "checkBox2";
99 | this.checkBox2.Size = new System.Drawing.Size(67, 21);
100 | this.checkBox2.TabIndex = 5;
101 | this.checkBox2.Text = "循环(&R)";
102 | this.checkBox2.UseVisualStyleBackColor = true;
103 | this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
104 | //
105 | // groupBox1
106 | //
107 | this.groupBox1.Controls.Add(this.radioButton2);
108 | this.groupBox1.Controls.Add(this.radioButton1);
109 | this.groupBox1.Location = new System.Drawing.Point(163, 57);
110 | this.groupBox1.Name = "groupBox1";
111 | this.groupBox1.Size = new System.Drawing.Size(160, 60);
112 | this.groupBox1.TabIndex = 6;
113 | this.groupBox1.TabStop = false;
114 | this.groupBox1.Text = "方向";
115 | //
116 | // radioButton2
117 | //
118 | this.radioButton2.AutoSize = true;
119 | this.radioButton2.Location = new System.Drawing.Point(81, 27);
120 | this.radioButton2.Name = "radioButton2";
121 | this.radioButton2.Size = new System.Drawing.Size(67, 21);
122 | this.radioButton2.TabIndex = 1;
123 | this.radioButton2.TabStop = true;
124 | this.radioButton2.Text = "向下(&D)";
125 | this.radioButton2.UseVisualStyleBackColor = true;
126 | this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);
127 | //
128 | // radioButton1
129 | //
130 | this.radioButton1.AutoSize = true;
131 | this.radioButton1.Location = new System.Drawing.Point(8, 27);
132 | this.radioButton1.Name = "radioButton1";
133 | this.radioButton1.Size = new System.Drawing.Size(67, 21);
134 | this.radioButton1.TabIndex = 0;
135 | this.radioButton1.TabStop = true;
136 | this.radioButton1.Text = "向上(&U)";
137 | this.radioButton1.UseVisualStyleBackColor = true;
138 | this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
139 | //
140 | // FindForm
141 | //
142 | this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
143 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
144 | this.ClientSize = new System.Drawing.Size(424, 161);
145 | this.Controls.Add(this.groupBox1);
146 | this.Controls.Add(this.checkBox2);
147 | this.Controls.Add(this.checkBox1);
148 | this.Controls.Add(this.button2);
149 | this.Controls.Add(this.button1);
150 | this.Controls.Add(this.textBox1);
151 | this.Controls.Add(this.label1);
152 | this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
153 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
154 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
155 | this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
156 | this.MaximizeBox = false;
157 | this.MinimizeBox = false;
158 | this.Name = "FindForm";
159 | this.ShowIcon = false;
160 | this.ShowInTaskbar = false;
161 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
162 | this.Text = " 查找";
163 | this.groupBox1.ResumeLayout(false);
164 | this.groupBox1.PerformLayout();
165 | this.ResumeLayout(false);
166 | this.PerformLayout();
167 |
168 | }
169 |
170 | #endregion
171 |
172 | private System.Windows.Forms.Label label1;
173 | private System.Windows.Forms.TextBox textBox1;
174 | private System.Windows.Forms.Button button1;
175 | private System.Windows.Forms.Button button2;
176 | private System.Windows.Forms.CheckBox checkBox1;
177 | private System.Windows.Forms.CheckBox checkBox2;
178 | private System.Windows.Forms.GroupBox groupBox1;
179 | private System.Windows.Forms.RadioButton radioButton2;
180 | private System.Windows.Forms.RadioButton radioButton1;
181 | }
182 | }
--------------------------------------------------------------------------------
/Logs chat record extractor/MainForm.Designer.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace Logs_chat_record_extractor
3 | {
4 | partial class MainForm
5 | {
6 | ///
7 | /// Required designer variable.
8 | ///
9 | private System.ComponentModel.IContainer components = null;
10 |
11 | ///
12 | /// Clean up any resources being used.
13 | ///
14 | /// true if managed resources should be disposed; otherwise, false.
15 | protected override void Dispose(bool disposing)
16 | {
17 | if (disposing && (components != null))
18 | {
19 | components.Dispose();
20 | }
21 | base.Dispose(disposing);
22 | }
23 |
24 | #region Windows Form Designer generated code
25 |
26 | ///
27 | /// Required method for Designer support - do not modify
28 | /// the contents of this method with the code editor.
29 | ///
30 | private void InitializeComponent()
31 | {
32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
33 | this.richTextBox1 = new System.Windows.Forms.RichTextBox();
34 | this.menuStrip1 = new System.Windows.Forms.MenuStrip();
35 | this.optionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
36 | this.showContextToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
37 | this.timeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
38 | this.headToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
39 | this.filterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
40 | this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
41 | this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
42 | this.findToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
43 | this.menuStrip1.SuspendLayout();
44 | this.SuspendLayout();
45 | //
46 | // richTextBox1
47 | //
48 | this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
49 | this.richTextBox1.Font = new System.Drawing.Font("微软雅黑", 12.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
50 | this.richTextBox1.Location = new System.Drawing.Point(0, 25);
51 | this.richTextBox1.Name = "richTextBox1";
52 | this.richTextBox1.ReadOnly = true;
53 | this.richTextBox1.Size = new System.Drawing.Size(804, 686);
54 | this.richTextBox1.TabIndex = 0;
55 | this.richTextBox1.Text = "";
56 | //
57 | // menuStrip1
58 | //
59 | this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
60 | this.optionToolStripMenuItem,
61 | this.editToolStripMenuItem});
62 | this.menuStrip1.Location = new System.Drawing.Point(0, 0);
63 | this.menuStrip1.Name = "menuStrip1";
64 | this.menuStrip1.Size = new System.Drawing.Size(804, 25);
65 | this.menuStrip1.TabIndex = 1;
66 | this.menuStrip1.Text = "menuStrip1";
67 | //
68 | // optionToolStripMenuItem
69 | //
70 | this.optionToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
71 | this.showContextToolStripMenuItem,
72 | this.filterToolStripMenuItem,
73 | this.exitToolStripMenuItem});
74 | this.optionToolStripMenuItem.Name = "optionToolStripMenuItem";
75 | this.optionToolStripMenuItem.Size = new System.Drawing.Size(62, 21);
76 | this.optionToolStripMenuItem.Text = "选项(&O)";
77 | //
78 | // showContextToolStripMenuItem
79 | //
80 | this.showContextToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
81 | this.timeToolStripMenuItem,
82 | this.headToolStripMenuItem});
83 | this.showContextToolStripMenuItem.Name = "showContextToolStripMenuItem";
84 | this.showContextToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
85 | this.showContextToolStripMenuItem.Text = "显示内容(&C)";
86 | //
87 | // timeToolStripMenuItem
88 | //
89 | this.timeToolStripMenuItem.Checked = true;
90 | this.timeToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
91 | this.timeToolStripMenuItem.Name = "timeToolStripMenuItem";
92 | this.timeToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
93 | this.timeToolStripMenuItem.Text = "时间(&T)";
94 | this.timeToolStripMenuItem.Click += new System.EventHandler(this.timeToolStripMenuItem_Click);
95 | //
96 | // headToolStripMenuItem
97 | //
98 | this.headToolStripMenuItem.Name = "headToolStripMenuItem";
99 | this.headToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
100 | this.headToolStripMenuItem.Text = "消息类型(&Y)";
101 | this.headToolStripMenuItem.Click += new System.EventHandler(this.headToolStripMenuItem_Click);
102 | //
103 | // filterToolStripMenuItem
104 | //
105 | this.filterToolStripMenuItem.Name = "filterToolStripMenuItem";
106 | this.filterToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
107 | this.filterToolStripMenuItem.Text = "消息过滤(&S)";
108 | this.filterToolStripMenuItem.Click += new System.EventHandler(this.filterToolStripMenuItem_Click);
109 | //
110 | // exitToolStripMenuItem
111 | //
112 | this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
113 | this.exitToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
114 | this.exitToolStripMenuItem.Text = "退出(&E)";
115 | this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
116 | //
117 | // editToolStripMenuItem
118 | //
119 | this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
120 | this.findToolStripMenuItem});
121 | this.editToolStripMenuItem.Name = "editToolStripMenuItem";
122 | this.editToolStripMenuItem.Size = new System.Drawing.Size(59, 21);
123 | this.editToolStripMenuItem.Text = "编辑(&E)";
124 | //
125 | // findToolStripMenuItem
126 | //
127 | this.findToolStripMenuItem.Name = "findToolStripMenuItem";
128 | this.findToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
129 | this.findToolStripMenuItem.Text = "查找(&F)";
130 | this.findToolStripMenuItem.Click += new System.EventHandler(this.findToolStripMenuItem_Click);
131 | //
132 | // MainForm
133 | //
134 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
135 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
136 | this.ClientSize = new System.Drawing.Size(804, 711);
137 | this.Controls.Add(this.richTextBox1);
138 | this.Controls.Add(this.menuStrip1);
139 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
140 | this.KeyPreview = true;
141 | this.MainMenuStrip = this.menuStrip1;
142 | this.Name = "MainForm";
143 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
144 | this.Text = "MainForm";
145 | this.Load += new System.EventHandler(this.MainForm_Load);
146 | this.menuStrip1.ResumeLayout(false);
147 | this.menuStrip1.PerformLayout();
148 | this.ResumeLayout(false);
149 | this.PerformLayout();
150 |
151 | }
152 |
153 | #endregion
154 |
155 | private System.Windows.Forms.RichTextBox richTextBox1;
156 | private System.Windows.Forms.MenuStrip menuStrip1;
157 | private System.Windows.Forms.ToolStripMenuItem optionToolStripMenuItem;
158 | private System.Windows.Forms.ToolStripMenuItem filterToolStripMenuItem;
159 | private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
160 | private System.Windows.Forms.ToolStripMenuItem showContextToolStripMenuItem;
161 | private System.Windows.Forms.ToolStripMenuItem timeToolStripMenuItem;
162 | private System.Windows.Forms.ToolStripMenuItem headToolStripMenuItem;
163 | private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
164 | private System.Windows.Forms.ToolStripMenuItem findToolStripMenuItem;
165 | }
166 | }
--------------------------------------------------------------------------------
/Logs chat record extractor/Form1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Drawing;
4 | using System.IO;
5 | using System.Linq;
6 | using System.Windows.Forms;
7 | using System.Text.RegularExpressions;
8 | using Logs_chat_record_extractor.Models;
9 |
10 | namespace Logs_chat_record_extractor
11 | {
12 | public partial class FormOpen : Form
13 | {
14 | ///
15 | /// 选择文件对话框
16 | ///
17 | private OpenFileDialog _openFileDialog1;
18 |
19 | ///
20 | /// 显示聊天内容的主窗口对象
21 | ///
22 | private MainForm _mf;
23 |
24 | ///
25 | /// 聊天记录集合
26 | ///
27 | private readonly List _chatList;
28 |
29 | ///
30 | /// 聊天记录信息集合
31 | ///
32 | private static List _chatInfoList;
33 |
34 | ///
35 | /// 主窗口标题
36 | ///
37 | private string _mainFormTitle;
38 |
39 | ///
40 | /// 时区,用于筛选
41 | ///
42 | private static string _timeZone = "+08:00";
43 |
44 | ///
45 | /// 构造器
46 | ///
47 | public FormOpen()
48 | {
49 | InitializeComponent();
50 | InitChecked();
51 | InitChatInfoList();
52 | _chatList = new List();
53 | }
54 |
55 | ///
56 | /// 窗口加载
57 | ///
58 | ///
59 | ///
60 | private void Form1_Load(object sender, EventArgs e)
61 | {
62 | _openFileDialog1 = new OpenFileDialog
63 | {
64 | Title = "请选择想要查询的log文件",
65 | Filter = "act日志文件(*.log)|*.log",
66 | RestoreDirectory = true
67 | };
68 | label1.Text = "就绪";
69 | }
70 |
71 | ///
72 | /// 选择文件 按钮点击事件
73 | ///
74 | ///
75 | ///
76 | private void button1_Click(object sender, EventArgs e)
77 | {
78 | if (_openFileDialog1.ShowDialog() != DialogResult.OK) return;
79 | textBox1.Text = Path.GetFullPath(_openFileDialog1.FileName);
80 | _mainFormTitle = Path.GetFileName(_openFileDialog1.FileName);
81 | }
82 |
83 | ///
84 | /// 加载 按钮点击事件
85 | ///
86 | ///
87 | ///
88 | private void button2_Click(object sender, EventArgs e)
89 | {
90 | var filePath = textBox1.Text;
91 | if (filePath.Length <= 3)
92 | {
93 | MessageBox.Show("请输入正确的文件目录");
94 | return;
95 | }
96 |
97 | label1.Text = "读取文件中,请稍候...";
98 | Application.DoEvents();
99 | // 将原先的list清理掉
100 | _chatList.Clear();
101 | var lineNub = 1;
102 | using (
103 | var sr = new StreamReader(
104 | new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)
105 | )
106 | )
107 | {
108 | string line;
109 |
110 | // 获取时区
111 | line = sr.ReadLine();
112 | var tempZoneStr = line.Split('|')[1];
113 | _timeZone = tempZoneStr.Substring(tempZoneStr.Length - 6);
114 | Console.WriteLine(_timeZone);
115 |
116 | // 读取文件
117 | do
118 | {
119 | if (line.Split('|')[0] == "01")
120 | {
121 | lineNub = 1;
122 | }
123 |
124 | var chatInfo = IsAChatMessage(line);
125 | if (chatInfo != null)
126 | {
127 | // 装载内容
128 | _chatList.Add(LoadChat(chatInfo, line, lineNub));
129 | }
130 |
131 | lineNub++;
132 | } while ((line = sr.ReadLine()) != null);
133 | }
134 |
135 | _mf = new MainForm(_chatList, _mainFormTitle);
136 | _mf.Show(this);
137 | Hide();
138 | label1.Text = "就绪";
139 | }
140 |
141 | ///
142 | /// 初始化过滤器
143 | ///
144 | private static void InitChecked()
145 | {
146 | for (var i = 0; i < ChatTypeHandler.GetIsShowArrayLength(); i++)
147 | {
148 | if (i == (int)ChatType.Party || i == (int)ChatType.Speak ||
149 | i == (int)ChatType.Yell || i == (int)ChatType.Alliance ||
150 | i == (int)ChatType.Shout || i == (int)ChatType.Motion ||
151 | i == (int)ChatType.Tell)
152 | {
153 | ChatTypeHandler.SetIsShowThisChatType(i, true);
154 | }
155 | }
156 | }
157 |
158 | ///
159 | /// 校验读取的目标是否为聊天内容
160 | /// 是则返回聊天信息对象,不是则返回null
161 | /// 更新对6.0log支持,同时支持5.0log
162 | ///
163 | /// 需要校验的内容
164 | /// 返回对象
165 | private static ChatInfo IsAChatMessage(string line)
166 | {
167 | return _chatInfoList.FirstOrDefault(chatInfo =>
168 | line.Contains(_timeZone + chatInfo.ChatCode) || line.Contains(_timeZone + chatInfo.ChatCode.ToUpper()));
169 | }
170 |
171 | ///
172 | /// 装载聊天信息
173 | ///
174 | /// 聊天信息详情
175 | /// 内容
176 | /// 装载完成的聊天信息
177 | private static Chat LoadChat(ChatInfo chatInfo, string line, int lineNub)
178 | {
179 | var ck = getAndRemoveCheck(line);
180 | var mck = TextChecker.Encrypt(ck.lineText, lineNub);
181 | if (ck.lineCheck != mck)
182 | {
183 | MessageBox.Show(
184 | $"警告:存在被篡改文本。\r\n文本内容:{ck.lineText}\r\n软件校验结果:{mck}\r\n文中校验码:{ck.lineCheck}");
185 | }
186 |
187 | // 替换小队前面的乱码字符
188 | line = line.Replace("", "①").Replace("", "②")
189 | .Replace("", "③").Replace("", "④")
190 | .Replace("", "⑤").Replace("", "⑥")
191 | .Replace("", "⑦").Replace("", "⑧")
192 | // 替换物品乱码
193 | .Replace("", "")
194 | // 替换团本乱码
195 | .Replace("", "Ⓐ").Replace("", "Ⓑ")
196 | .Replace("", "Ⓒ");
197 | var sp = line.Split('|');
198 | var time = sp[1].Substring(11, 5);
199 | var chat = new Chat
200 | {
201 | Show = ChatTypeHandler.IsShowThisChatType(chatInfo.ChatType),
202 | ChatInfo = chatInfo,
203 | Time = time,
204 | PlayerName = sp[3],
205 | Context = sp[4]
206 | };
207 | return chat;
208 | }
209 |
210 | private static Line getAndRemoveCheck(string line)
211 | {
212 | var l = line.Split('|');
213 | var check = l[l.Length - 1];
214 | var d = new List();
215 | for (var i = 0; i < l.Length - 1; i++)
216 | {
217 | d.Add(l[i]);
218 | }
219 |
220 | var res = string.Join("|", d);
221 | Console.WriteLine(res);
222 | return new Line(res, check);
223 | }
224 |
225 | ///
226 | /// 初始化聊天信息集合
227 | ///
228 | private static void InitChatInfoList()
229 | {
230 | _chatInfoList = new List
231 | {
232 | new ChatInfo(ChatType.Speak, Color.FromArgb(178, 178, 178), "|000a|"),
233 | new ChatInfo(ChatType.Yell, Color.FromArgb(178, 178, 0), "|001e|"),
234 | new ChatInfo(ChatType.Shout, Color.FromArgb(178, 116, 71), "|000b|"),
235 | new ChatInfo(ChatType.Party, Color.FromArgb(71, 168, 178), "|000e|"),
236 | new ChatInfo(ChatType.CwLinkShell1, Color.FromArgb(159, 191, 96), "|0025|"),
237 | new ChatInfo(ChatType.CwLinkShell2, Color.FromArgb(159, 191, 96), "|0065|"),
238 | new ChatInfo(ChatType.CwLinkShell3, Color.FromArgb(159, 191, 96), "|0066|"),
239 | new ChatInfo(ChatType.CwLinkShell4, Color.FromArgb(159, 191, 96), "|0067|"),
240 | new ChatInfo(ChatType.CwLinkShell5, Color.FromArgb(159, 191, 96), "|0068|"),
241 | new ChatInfo(ChatType.CwLinkShell6, Color.FromArgb(159, 191, 96), "|0069|"),
242 | new ChatInfo(ChatType.CwLinkShell7, Color.FromArgb(159, 191, 96), "|006a|"),
243 | new ChatInfo(ChatType.CwLinkShell8, Color.FromArgb(159, 191, 96), "|006b|"),
244 | new ChatInfo(ChatType.LinkShell1, Color.FromArgb(159, 191, 96), "|0010|"),
245 | new ChatInfo(ChatType.LinkShell2, Color.FromArgb(159, 191, 96), "|0011|"),
246 | new ChatInfo(ChatType.LinkShell3, Color.FromArgb(159, 191, 96), "|0012|"),
247 | new ChatInfo(ChatType.LinkShell4, Color.FromArgb(159, 191, 96), "|0013|"),
248 | new ChatInfo(ChatType.LinkShell5, Color.FromArgb(159, 191, 96), "|0014|"),
249 | new ChatInfo(ChatType.LinkShell6, Color.FromArgb(159, 191, 96), "|0015|"),
250 | new ChatInfo(ChatType.LinkShell7, Color.FromArgb(159, 191, 96), "|0016|"),
251 | new ChatInfo(ChatType.LinkShell8, Color.FromArgb(159, 191, 96), "|0017|"),
252 | new ChatInfo(ChatType.Beginner, Color.FromArgb(159, 191, 96), "|001b|"),
253 | new ChatInfo(ChatType.Tell, Color.FromArgb(178, 129, 155), "|000d|"),
254 | new ChatInfo(ChatType.TellToOther, Color.FromArgb(178, 129, 155), "|000c|"),
255 | //官方情感动作
256 | new ChatInfo(ChatType.Motion, Color.FromArgb(130, 178, 168), "|001d|"),
257 | //自定义的情感动作
258 | new ChatInfo(ChatType.MotionCustom, Color.FromArgb(130, 178, 168), "|001c|"),
259 | new ChatInfo(ChatType.FreeCompany, Color.FromArgb(134, 171, 178), "|0018|"),
260 | new ChatInfo(ChatType.Alliance, Color.FromArgb(178, 89, 0), "|000f|"),
261 | };
262 | }
263 | }
264 | }
--------------------------------------------------------------------------------
/Logs chat record extractor/FilterForm.Designer.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace Logs_chat_record_extractor
3 | {
4 | partial class FilterForm
5 | {
6 | ///
7 | /// Required designer variable.
8 | ///
9 | private System.ComponentModel.IContainer components = null;
10 |
11 | ///
12 | /// Clean up any resources being used.
13 | ///
14 | /// true if managed resources should be disposed; otherwise, false.
15 | protected override void Dispose(bool disposing)
16 | {
17 | if (disposing && (components != null))
18 | {
19 | components.Dispose();
20 | }
21 | base.Dispose(disposing);
22 | }
23 |
24 | #region Windows Form Designer generated code
25 |
26 | ///
27 | /// Required method for Designer support - do not modify
28 | /// the contents of this method with the code editor.
29 | ///
30 | private void InitializeComponent()
31 | {
32 | this.button1 = new System.Windows.Forms.Button();
33 | this.button2 = new System.Windows.Forms.Button();
34 | this.groupBox1 = new System.Windows.Forms.GroupBox();
35 | this.checkBox9 = new System.Windows.Forms.CheckBox();
36 | this.checkBox8 = new System.Windows.Forms.CheckBox();
37 | this.checkBox7 = new System.Windows.Forms.CheckBox();
38 | this.checkBox6 = new System.Windows.Forms.CheckBox();
39 | this.checkBox5 = new System.Windows.Forms.CheckBox();
40 | this.checkBox4 = new System.Windows.Forms.CheckBox();
41 | this.checkBox3 = new System.Windows.Forms.CheckBox();
42 | this.checkBox2 = new System.Windows.Forms.CheckBox();
43 | this.checkBox1 = new System.Windows.Forms.CheckBox();
44 | this.g1AllSelect = new System.Windows.Forms.Button();
45 | this.g1NoSelect = new System.Windows.Forms.Button();
46 | this.groupBox2 = new System.Windows.Forms.GroupBox();
47 | this.checkBox17 = new System.Windows.Forms.CheckBox();
48 | this.checkBox16 = new System.Windows.Forms.CheckBox();
49 | this.checkBox15 = new System.Windows.Forms.CheckBox();
50 | this.checkBox14 = new System.Windows.Forms.CheckBox();
51 | this.checkBox13 = new System.Windows.Forms.CheckBox();
52 | this.checkBox12 = new System.Windows.Forms.CheckBox();
53 | this.checkBox11 = new System.Windows.Forms.CheckBox();
54 | this.checkBox10 = new System.Windows.Forms.CheckBox();
55 | this.g2AllSelect = new System.Windows.Forms.Button();
56 | this.g2NoSelect = new System.Windows.Forms.Button();
57 | this.groupBox3 = new System.Windows.Forms.GroupBox();
58 | this.checkBox25 = new System.Windows.Forms.CheckBox();
59 | this.checkBox24 = new System.Windows.Forms.CheckBox();
60 | this.checkBox23 = new System.Windows.Forms.CheckBox();
61 | this.checkBox22 = new System.Windows.Forms.CheckBox();
62 | this.checkBox21 = new System.Windows.Forms.CheckBox();
63 | this.checkBox20 = new System.Windows.Forms.CheckBox();
64 | this.checkBox19 = new System.Windows.Forms.CheckBox();
65 | this.checkBox18 = new System.Windows.Forms.CheckBox();
66 | this.g3AllSelect = new System.Windows.Forms.Button();
67 | this.g3NoSelect = new System.Windows.Forms.Button();
68 | this.groupBox1.SuspendLayout();
69 | this.groupBox2.SuspendLayout();
70 | this.groupBox3.SuspendLayout();
71 | this.SuspendLayout();
72 | //
73 | // button1
74 | //
75 | this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
76 | this.button1.Location = new System.Drawing.Point(286, 338);
77 | this.button1.Name = "button1";
78 | this.button1.Size = new System.Drawing.Size(75, 23);
79 | this.button1.TabIndex = 1;
80 | this.button1.Text = "确定";
81 | this.button1.UseVisualStyleBackColor = true;
82 | this.button1.Click += new System.EventHandler(this.button1_Click);
83 | //
84 | // button2
85 | //
86 | this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
87 | this.button2.Location = new System.Drawing.Point(367, 338);
88 | this.button2.Name = "button2";
89 | this.button2.Size = new System.Drawing.Size(75, 23);
90 | this.button2.TabIndex = 2;
91 | this.button2.Text = "取消";
92 | this.button2.UseVisualStyleBackColor = true;
93 | this.button2.Click += new System.EventHandler(this.button2_Click);
94 | //
95 | // groupBox1
96 | //
97 | this.groupBox1.Controls.Add(this.checkBox9);
98 | this.groupBox1.Controls.Add(this.checkBox8);
99 | this.groupBox1.Controls.Add(this.checkBox7);
100 | this.groupBox1.Controls.Add(this.checkBox6);
101 | this.groupBox1.Controls.Add(this.checkBox5);
102 | this.groupBox1.Controls.Add(this.checkBox4);
103 | this.groupBox1.Controls.Add(this.checkBox3);
104 | this.groupBox1.Controls.Add(this.checkBox2);
105 | this.groupBox1.Controls.Add(this.checkBox1);
106 | this.groupBox1.Controls.Add(this.g1AllSelect);
107 | this.groupBox1.Controls.Add(this.g1NoSelect);
108 | this.groupBox1.Location = new System.Drawing.Point(12, 12);
109 | this.groupBox1.Name = "groupBox1";
110 | this.groupBox1.Size = new System.Drawing.Size(430, 100);
111 | this.groupBox1.TabIndex = 3;
112 | this.groupBox1.TabStop = false;
113 | this.groupBox1.Text = "一般频道";
114 | //
115 | // checkBox9
116 | //
117 | this.checkBox9.AutoSize = true;
118 | this.checkBox9.Location = new System.Drawing.Point(259, 43);
119 | this.checkBox9.Name = "checkBox9";
120 | this.checkBox9.Size = new System.Drawing.Size(78, 16);
121 | this.checkBox9.TabIndex = 11;
122 | this.checkBox9.Text = "checkBox9";
123 | this.checkBox9.UseVisualStyleBackColor = true;
124 | //
125 | // checkBox8
126 | //
127 | this.checkBox8.AutoSize = true;
128 | this.checkBox8.Location = new System.Drawing.Point(175, 42);
129 | this.checkBox8.Name = "checkBox8";
130 | this.checkBox8.Size = new System.Drawing.Size(78, 16);
131 | this.checkBox8.TabIndex = 10;
132 | this.checkBox8.Text = "checkBox8";
133 | this.checkBox8.UseVisualStyleBackColor = true;
134 | //
135 | // checkBox7
136 | //
137 | this.checkBox7.AutoSize = true;
138 | this.checkBox7.Location = new System.Drawing.Point(91, 43);
139 | this.checkBox7.Name = "checkBox7";
140 | this.checkBox7.Size = new System.Drawing.Size(78, 16);
141 | this.checkBox7.TabIndex = 9;
142 | this.checkBox7.Text = "checkBox7";
143 | this.checkBox7.UseVisualStyleBackColor = true;
144 | //
145 | // checkBox6
146 | //
147 | this.checkBox6.AutoSize = true;
148 | this.checkBox6.Location = new System.Drawing.Point(7, 43);
149 | this.checkBox6.Name = "checkBox6";
150 | this.checkBox6.Size = new System.Drawing.Size(78, 16);
151 | this.checkBox6.TabIndex = 8;
152 | this.checkBox6.Text = "checkBox6";
153 | this.checkBox6.UseVisualStyleBackColor = true;
154 | //
155 | // checkBox5
156 | //
157 | this.checkBox5.AutoSize = true;
158 | this.checkBox5.Location = new System.Drawing.Point(343, 20);
159 | this.checkBox5.Name = "checkBox5";
160 | this.checkBox5.Size = new System.Drawing.Size(78, 16);
161 | this.checkBox5.TabIndex = 7;
162 | this.checkBox5.Text = "checkBox5";
163 | this.checkBox5.UseVisualStyleBackColor = true;
164 | //
165 | // checkBox4
166 | //
167 | this.checkBox4.AutoSize = true;
168 | this.checkBox4.Location = new System.Drawing.Point(259, 20);
169 | this.checkBox4.Name = "checkBox4";
170 | this.checkBox4.Size = new System.Drawing.Size(78, 16);
171 | this.checkBox4.TabIndex = 6;
172 | this.checkBox4.Text = "checkBox4";
173 | this.checkBox4.UseVisualStyleBackColor = true;
174 | //
175 | // checkBox3
176 | //
177 | this.checkBox3.AutoSize = true;
178 | this.checkBox3.Location = new System.Drawing.Point(175, 20);
179 | this.checkBox3.Name = "checkBox3";
180 | this.checkBox3.Size = new System.Drawing.Size(78, 16);
181 | this.checkBox3.TabIndex = 5;
182 | this.checkBox3.Text = "checkBox3";
183 | this.checkBox3.UseVisualStyleBackColor = true;
184 | //
185 | // checkBox2
186 | //
187 | this.checkBox2.AutoSize = true;
188 | this.checkBox2.Location = new System.Drawing.Point(91, 20);
189 | this.checkBox2.Name = "checkBox2";
190 | this.checkBox2.Size = new System.Drawing.Size(78, 16);
191 | this.checkBox2.TabIndex = 4;
192 | this.checkBox2.Text = "checkBox2";
193 | this.checkBox2.UseVisualStyleBackColor = true;
194 | //
195 | // checkBox1
196 | //
197 | this.checkBox1.AutoSize = true;
198 | this.checkBox1.Location = new System.Drawing.Point(7, 21);
199 | this.checkBox1.Name = "checkBox1";
200 | this.checkBox1.Size = new System.Drawing.Size(78, 16);
201 | this.checkBox1.TabIndex = 3;
202 | this.checkBox1.Text = "checkBox1";
203 | this.checkBox1.UseVisualStyleBackColor = true;
204 | //
205 | // g1AllSelect
206 | //
207 | this.g1AllSelect.Location = new System.Drawing.Point(265, 71);
208 | this.g1AllSelect.Name = "g1AllSelect";
209 | this.g1AllSelect.Size = new System.Drawing.Size(75, 23);
210 | this.g1AllSelect.TabIndex = 2;
211 | this.g1AllSelect.Text = "全选";
212 | this.g1AllSelect.UseVisualStyleBackColor = true;
213 | //
214 | // g1NoSelect
215 | //
216 | this.g1NoSelect.Location = new System.Drawing.Point(346, 71);
217 | this.g1NoSelect.Name = "g1NoSelect";
218 | this.g1NoSelect.Size = new System.Drawing.Size(75, 23);
219 | this.g1NoSelect.TabIndex = 0;
220 | this.g1NoSelect.Text = "取消选择";
221 | this.g1NoSelect.UseVisualStyleBackColor = true;
222 | //
223 | // groupBox2
224 | //
225 | this.groupBox2.Controls.Add(this.checkBox17);
226 | this.groupBox2.Controls.Add(this.checkBox16);
227 | this.groupBox2.Controls.Add(this.checkBox15);
228 | this.groupBox2.Controls.Add(this.checkBox14);
229 | this.groupBox2.Controls.Add(this.checkBox13);
230 | this.groupBox2.Controls.Add(this.checkBox12);
231 | this.groupBox2.Controls.Add(this.checkBox11);
232 | this.groupBox2.Controls.Add(this.checkBox10);
233 | this.groupBox2.Controls.Add(this.g2AllSelect);
234 | this.groupBox2.Controls.Add(this.g2NoSelect);
235 | this.groupBox2.Location = new System.Drawing.Point(12, 118);
236 | this.groupBox2.Name = "groupBox2";
237 | this.groupBox2.Size = new System.Drawing.Size(430, 100);
238 | this.groupBox2.TabIndex = 4;
239 | this.groupBox2.TabStop = false;
240 | this.groupBox2.Text = "通讯贝";
241 | //
242 | // checkBox17
243 | //
244 | this.checkBox17.AutoSize = true;
245 | this.checkBox17.Location = new System.Drawing.Point(258, 42);
246 | this.checkBox17.Name = "checkBox17";
247 | this.checkBox17.Size = new System.Drawing.Size(78, 16);
248 | this.checkBox17.TabIndex = 13;
249 | this.checkBox17.Text = "checkBox1";
250 | this.checkBox17.UseVisualStyleBackColor = true;
251 | //
252 | // checkBox16
253 | //
254 | this.checkBox16.AutoSize = true;
255 | this.checkBox16.Location = new System.Drawing.Point(174, 42);
256 | this.checkBox16.Name = "checkBox16";
257 | this.checkBox16.Size = new System.Drawing.Size(78, 16);
258 | this.checkBox16.TabIndex = 12;
259 | this.checkBox16.Text = "checkBox1";
260 | this.checkBox16.UseVisualStyleBackColor = true;
261 | //
262 | // checkBox15
263 | //
264 | this.checkBox15.AutoSize = true;
265 | this.checkBox15.Location = new System.Drawing.Point(90, 42);
266 | this.checkBox15.Name = "checkBox15";
267 | this.checkBox15.Size = new System.Drawing.Size(78, 16);
268 | this.checkBox15.TabIndex = 11;
269 | this.checkBox15.Text = "checkBox1";
270 | this.checkBox15.UseVisualStyleBackColor = true;
271 | //
272 | // checkBox14
273 | //
274 | this.checkBox14.AutoSize = true;
275 | this.checkBox14.Location = new System.Drawing.Point(6, 42);
276 | this.checkBox14.Name = "checkBox14";
277 | this.checkBox14.Size = new System.Drawing.Size(78, 16);
278 | this.checkBox14.TabIndex = 10;
279 | this.checkBox14.Text = "checkBox1";
280 | this.checkBox14.UseVisualStyleBackColor = true;
281 | //
282 | // checkBox13
283 | //
284 | this.checkBox13.AutoSize = true;
285 | this.checkBox13.Location = new System.Drawing.Point(258, 20);
286 | this.checkBox13.Name = "checkBox13";
287 | this.checkBox13.Size = new System.Drawing.Size(78, 16);
288 | this.checkBox13.TabIndex = 9;
289 | this.checkBox13.Text = "checkBox1";
290 | this.checkBox13.UseVisualStyleBackColor = true;
291 | //
292 | // checkBox12
293 | //
294 | this.checkBox12.AutoSize = true;
295 | this.checkBox12.Location = new System.Drawing.Point(174, 20);
296 | this.checkBox12.Name = "checkBox12";
297 | this.checkBox12.Size = new System.Drawing.Size(78, 16);
298 | this.checkBox12.TabIndex = 8;
299 | this.checkBox12.Text = "checkBox1";
300 | this.checkBox12.UseVisualStyleBackColor = true;
301 | //
302 | // checkBox11
303 | //
304 | this.checkBox11.AutoSize = true;
305 | this.checkBox11.Location = new System.Drawing.Point(90, 20);
306 | this.checkBox11.Name = "checkBox11";
307 | this.checkBox11.Size = new System.Drawing.Size(78, 16);
308 | this.checkBox11.TabIndex = 7;
309 | this.checkBox11.Text = "checkBox1";
310 | this.checkBox11.UseVisualStyleBackColor = true;
311 | //
312 | // checkBox10
313 | //
314 | this.checkBox10.AutoSize = true;
315 | this.checkBox10.Location = new System.Drawing.Point(6, 20);
316 | this.checkBox10.Name = "checkBox10";
317 | this.checkBox10.Size = new System.Drawing.Size(78, 16);
318 | this.checkBox10.TabIndex = 6;
319 | this.checkBox10.Text = "checkBox1";
320 | this.checkBox10.UseVisualStyleBackColor = true;
321 | //
322 | // g2AllSelect
323 | //
324 | this.g2AllSelect.Location = new System.Drawing.Point(265, 71);
325 | this.g2AllSelect.Name = "g2AllSelect";
326 | this.g2AllSelect.Size = new System.Drawing.Size(75, 23);
327 | this.g2AllSelect.TabIndex = 5;
328 | this.g2AllSelect.Text = "全选";
329 | this.g2AllSelect.UseVisualStyleBackColor = true;
330 | //
331 | // g2NoSelect
332 | //
333 | this.g2NoSelect.Location = new System.Drawing.Point(346, 71);
334 | this.g2NoSelect.Name = "g2NoSelect";
335 | this.g2NoSelect.Size = new System.Drawing.Size(75, 23);
336 | this.g2NoSelect.TabIndex = 3;
337 | this.g2NoSelect.Text = "取消选择";
338 | this.g2NoSelect.UseVisualStyleBackColor = true;
339 | //
340 | // groupBox3
341 | //
342 | this.groupBox3.Controls.Add(this.checkBox25);
343 | this.groupBox3.Controls.Add(this.checkBox24);
344 | this.groupBox3.Controls.Add(this.checkBox23);
345 | this.groupBox3.Controls.Add(this.checkBox22);
346 | this.groupBox3.Controls.Add(this.checkBox21);
347 | this.groupBox3.Controls.Add(this.checkBox20);
348 | this.groupBox3.Controls.Add(this.checkBox19);
349 | this.groupBox3.Controls.Add(this.checkBox18);
350 | this.groupBox3.Controls.Add(this.g3AllSelect);
351 | this.groupBox3.Controls.Add(this.g3NoSelect);
352 | this.groupBox3.Location = new System.Drawing.Point(12, 224);
353 | this.groupBox3.Name = "groupBox3";
354 | this.groupBox3.Size = new System.Drawing.Size(430, 100);
355 | this.groupBox3.TabIndex = 4;
356 | this.groupBox3.TabStop = false;
357 | this.groupBox3.Text = "跨服贝";
358 | //
359 | // checkBox25
360 | //
361 | this.checkBox25.AutoSize = true;
362 | this.checkBox25.Location = new System.Drawing.Point(258, 42);
363 | this.checkBox25.Name = "checkBox25";
364 | this.checkBox25.Size = new System.Drawing.Size(78, 16);
365 | this.checkBox25.TabIndex = 21;
366 | this.checkBox25.Text = "checkBox1";
367 | this.checkBox25.UseVisualStyleBackColor = true;
368 | //
369 | // checkBox24
370 | //
371 | this.checkBox24.AutoSize = true;
372 | this.checkBox24.Location = new System.Drawing.Point(174, 42);
373 | this.checkBox24.Name = "checkBox24";
374 | this.checkBox24.Size = new System.Drawing.Size(78, 16);
375 | this.checkBox24.TabIndex = 20;
376 | this.checkBox24.Text = "checkBox1";
377 | this.checkBox24.UseVisualStyleBackColor = true;
378 | //
379 | // checkBox23
380 | //
381 | this.checkBox23.AutoSize = true;
382 | this.checkBox23.Location = new System.Drawing.Point(90, 42);
383 | this.checkBox23.Name = "checkBox23";
384 | this.checkBox23.Size = new System.Drawing.Size(78, 16);
385 | this.checkBox23.TabIndex = 19;
386 | this.checkBox23.Text = "checkBox1";
387 | this.checkBox23.UseVisualStyleBackColor = true;
388 | //
389 | // checkBox22
390 | //
391 | this.checkBox22.AutoSize = true;
392 | this.checkBox22.Location = new System.Drawing.Point(6, 42);
393 | this.checkBox22.Name = "checkBox22";
394 | this.checkBox22.Size = new System.Drawing.Size(78, 16);
395 | this.checkBox22.TabIndex = 18;
396 | this.checkBox22.Text = "checkBox1";
397 | this.checkBox22.UseVisualStyleBackColor = true;
398 | //
399 | // checkBox21
400 | //
401 | this.checkBox21.AutoSize = true;
402 | this.checkBox21.Location = new System.Drawing.Point(258, 20);
403 | this.checkBox21.Name = "checkBox21";
404 | this.checkBox21.Size = new System.Drawing.Size(78, 16);
405 | this.checkBox21.TabIndex = 17;
406 | this.checkBox21.Text = "checkBox1";
407 | this.checkBox21.UseVisualStyleBackColor = true;
408 | //
409 | // checkBox20
410 | //
411 | this.checkBox20.AutoSize = true;
412 | this.checkBox20.Location = new System.Drawing.Point(174, 20);
413 | this.checkBox20.Name = "checkBox20";
414 | this.checkBox20.Size = new System.Drawing.Size(78, 16);
415 | this.checkBox20.TabIndex = 16;
416 | this.checkBox20.Text = "checkBox1";
417 | this.checkBox20.UseVisualStyleBackColor = true;
418 | //
419 | // checkBox19
420 | //
421 | this.checkBox19.AutoSize = true;
422 | this.checkBox19.Location = new System.Drawing.Point(90, 20);
423 | this.checkBox19.Name = "checkBox19";
424 | this.checkBox19.Size = new System.Drawing.Size(78, 16);
425 | this.checkBox19.TabIndex = 15;
426 | this.checkBox19.Text = "checkBox1";
427 | this.checkBox19.UseVisualStyleBackColor = true;
428 | //
429 | // checkBox18
430 | //
431 | this.checkBox18.AutoSize = true;
432 | this.checkBox18.Location = new System.Drawing.Point(6, 20);
433 | this.checkBox18.Name = "checkBox18";
434 | this.checkBox18.Size = new System.Drawing.Size(78, 16);
435 | this.checkBox18.TabIndex = 14;
436 | this.checkBox18.Text = "checkBox1";
437 | this.checkBox18.UseVisualStyleBackColor = true;
438 | //
439 | // g3AllSelect
440 | //
441 | this.g3AllSelect.Location = new System.Drawing.Point(265, 71);
442 | this.g3AllSelect.Name = "g3AllSelect";
443 | this.g3AllSelect.Size = new System.Drawing.Size(75, 23);
444 | this.g3AllSelect.TabIndex = 8;
445 | this.g3AllSelect.Text = "全选";
446 | this.g3AllSelect.UseVisualStyleBackColor = true;
447 | //
448 | // g3NoSelect
449 | //
450 | this.g3NoSelect.Location = new System.Drawing.Point(346, 71);
451 | this.g3NoSelect.Name = "g3NoSelect";
452 | this.g3NoSelect.Size = new System.Drawing.Size(75, 23);
453 | this.g3NoSelect.TabIndex = 6;
454 | this.g3NoSelect.Text = "取消选择";
455 | this.g3NoSelect.UseVisualStyleBackColor = true;
456 | //
457 | // FilterForm
458 | //
459 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
460 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
461 | this.ClientSize = new System.Drawing.Size(454, 373);
462 | this.ControlBox = false;
463 | this.Controls.Add(this.groupBox3);
464 | this.Controls.Add(this.groupBox2);
465 | this.Controls.Add(this.groupBox1);
466 | this.Controls.Add(this.button2);
467 | this.Controls.Add(this.button1);
468 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
469 | this.MaximizeBox = false;
470 | this.MinimizeBox = false;
471 | this.Name = "FilterForm";
472 | this.ShowIcon = false;
473 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
474 | this.Text = "过滤器";
475 | this.Load += new System.EventHandler(this.FilterForm_Load);
476 | this.groupBox1.ResumeLayout(false);
477 | this.groupBox1.PerformLayout();
478 | this.groupBox2.ResumeLayout(false);
479 | this.groupBox2.PerformLayout();
480 | this.groupBox3.ResumeLayout(false);
481 | this.groupBox3.PerformLayout();
482 | this.ResumeLayout(false);
483 |
484 | }
485 |
486 | #endregion
487 | private System.Windows.Forms.Button button1;
488 | private System.Windows.Forms.Button button2;
489 | private System.Windows.Forms.GroupBox groupBox1;
490 | private System.Windows.Forms.Button g1NoSelect;
491 | private System.Windows.Forms.GroupBox groupBox2;
492 | private System.Windows.Forms.GroupBox groupBox3;
493 | private System.Windows.Forms.Button g1AllSelect;
494 | private System.Windows.Forms.Button g2AllSelect;
495 | private System.Windows.Forms.Button g2NoSelect;
496 | private System.Windows.Forms.CheckBox checkBox9;
497 | private System.Windows.Forms.CheckBox checkBox8;
498 | private System.Windows.Forms.CheckBox checkBox7;
499 | private System.Windows.Forms.CheckBox checkBox6;
500 | private System.Windows.Forms.CheckBox checkBox5;
501 | private System.Windows.Forms.CheckBox checkBox4;
502 | private System.Windows.Forms.CheckBox checkBox3;
503 | private System.Windows.Forms.CheckBox checkBox2;
504 | private System.Windows.Forms.CheckBox checkBox1;
505 | private System.Windows.Forms.CheckBox checkBox18;
506 | private System.Windows.Forms.CheckBox checkBox17;
507 | private System.Windows.Forms.CheckBox checkBox16;
508 | private System.Windows.Forms.CheckBox checkBox15;
509 | private System.Windows.Forms.CheckBox checkBox14;
510 | private System.Windows.Forms.CheckBox checkBox13;
511 | private System.Windows.Forms.CheckBox checkBox12;
512 | private System.Windows.Forms.CheckBox checkBox10;
513 | private System.Windows.Forms.Button g3AllSelect;
514 | private System.Windows.Forms.Button g3NoSelect;
515 | private System.Windows.Forms.CheckBox checkBox11;
516 | private System.Windows.Forms.CheckBox checkBox25;
517 | private System.Windows.Forms.CheckBox checkBox24;
518 | private System.Windows.Forms.CheckBox checkBox23;
519 | private System.Windows.Forms.CheckBox checkBox22;
520 | private System.Windows.Forms.CheckBox checkBox21;
521 | private System.Windows.Forms.CheckBox checkBox20;
522 | private System.Windows.Forms.CheckBox checkBox19;
523 | }
524 | }
--------------------------------------------------------------------------------