We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
目前 THUAI7 的配置文件是 %USERPROFILE%\Documents\THUAI7.json:
%USERPROFILE%\Documents\THUAI7.json
THUAI7/installer/Data/ConfigFileData.cs
Lines 205 to 207 in b728f8c
Line 214 in b728f8c
%LOCALAPPDATA%
%USERPROFILE%\AppData\Local
%APPDATA%
%USERPROFILE%\AppData\Roaming
%ALLUSERSPROFILE%
%HOMEDRIVE%\ProgramData
综上,咱们的 THUAI7 更适合存放在 %LOCALAPPDATA% 中。
具体的规范是,在改文件夹下,再创建一个属于自己应用的文件夹,然后在该文件夹下存放配置数据。对于 THUAI7,一个可能的配置文件路径是:%LOCALAPPDATA%\THUAI7\config.json,例如上段代码改成如下的:
%LOCALAPPDATA%\THUAI7\config.json
var dataDir = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "THUAI7"); if (!System.IO.Directory.Exists(dataDir)) { System.IO.Directory.CreateDirectory(dataDir); } var configPath = System.IO.Path.Combine(dataDir, "config.json");
然后将数据放在该 config.json 里(卸载时直接删除该 THUAI7 文件夹即可)。
config.json
THUAI7
同时,默认的安装位置:
Lines 43 to 46 in b728f8c
Local_Data
THUAI7/installer/Model/Local_Data.cs
Lines 42 to 46 in b728f8c
此外存放配置信息的命名似乎使用 config.json 比 THUAI7.json 要更好一些。
THUAI7.json
The text was updated successfully, but these errors were encountered:
THUAI6 中的原 issue 位于 eesast/THUAI6#566
Sorry, something went wrong.
我超,这就是一个好的issue的模样吗?大开眼界(
issue
@DreamEnderKing #178 (comment)
DragonAura
DreamEnderKing
ONLOX
No branches or pull requests
问题
目前 THUAI7 的配置文件是
%USERPROFILE%\Documents\THUAI7.json
:THUAI7/installer/Data/ConfigFileData.cs
Lines 205 to 207 in b728f8c
THUAI7/installer/Data/ConfigFileData.cs
Line 214 in b728f8c
实际上这个文件夹主要目的是用于存放用户的一些文档,而非应用配置数据。原则上讲,存放配置数据应该是:
%LOCALAPPDATA%
:对应于%USERPROFILE%\AppData\Local
,用于存放本用户在本地计算机上的配置数据或应用程序%APPDATA%
:对应于%USERPROFILE%\AppData\Roaming
,用于存放本用户的漫游配置数据%ALLUSERSPROFILE%
:对应于%HOMEDRIVE%\ProgramData
,用于存放所有用户的公共配置数据(一般由 Administrator 用户管理)综上,咱们的 THUAI7 更适合存放在
%LOCALAPPDATA%
中。修改建议
具体的规范是,在改文件夹下,再创建一个属于自己应用的文件夹,然后在该文件夹下存放配置数据。对于 THUAI7,一个可能的配置文件路径是:
%LOCALAPPDATA%\THUAI7\config.json
,例如上段代码改成如下的:然后将数据放在该
config.json
里(卸载时直接删除该THUAI7
文件夹即可)。其他
同时,默认的安装位置:
THUAI7/installer/Data/ConfigFileData.cs
Lines 43 to 46 in b728f8c
Local_Data
:THUAI7/installer/Model/Local_Data.cs
Lines 42 to 46 in b728f8c
也应当放在这个文件夹内。
此外存放配置信息的命名似乎使用
config.json
比THUAI7.json
要更好一些。The text was updated successfully, but these errors were encountered: