From aea8b9d0552681382b0eb9180c5ef556b4bca75a Mon Sep 17 00:00:00 2001 From: Sad Pencil Date: Sat, 24 Feb 2024 19:21:03 +0800 Subject: [PATCH] Add XML doc about duplicated SearchResourcesDir() --- ClientCore/ProgramConstants.cs | 8 ++++++++ DXMainClient/Program.cs | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ClientCore/ProgramConstants.cs b/ClientCore/ProgramConstants.cs index e953cfc5f..081d4f68c 100644 --- a/ClientCore/ProgramConstants.cs +++ b/ClientCore/ProgramConstants.cs @@ -140,6 +140,14 @@ public static string GetAILevelName(int aiLevel) Environment.Exit(1); }; + /// + /// This method finds the "Resources" directory by traversing the directory tree upwards from the startup path. + /// + /// + /// This method is needed by both ClientCore and DXMainClient. However, since it is usually called at the very beginning, + /// where DXMainClient could not refer to ClientCore, this method is copied to both projects. + /// Remember to keep and consistent if you have modified its source codes. + /// private static string SearchResourcesDir(string startupPath) { DirectoryInfo currentDir = new(startupPath); diff --git a/DXMainClient/Program.cs b/DXMainClient/Program.cs index f1752437f..3d50ba555 100644 --- a/DXMainClient/Program.cs +++ b/DXMainClient/Program.cs @@ -174,7 +174,7 @@ private static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEven } #endif - // SearchResourcesDir is copied from ClientCore + /// private static string SearchResourcesDir(string startupPath) { DirectoryInfo currentDir = new(startupPath);