皮肤加载更新,必须更新,否则会下载有问题

This commit is contained in:
sgwp 2024-11-28 10:58:27 +08:00
parent 1f240c1ce7
commit 710f9007fd

View File

@ -54,14 +54,39 @@ var
str :String;
pathStr:String;
I: Integer;
thread:TThread;
// thread:TThread;
begin
///////////////////
dxSkinController1.BeginUpdate;
// dxSkinController1.BeginUpdate;
//////////////////////
thread:=TThread.CreateAnonymousThread(
procedure
begin
// thread:=TThread.CreateAnonymousThread(
// procedure
// begin
// if (fileexists(ExtractFilePath(Application.ExeName) + 'devchs.ini') = true)
// then
// begin
// cxLocalizer1.FileName := ExtractFilePath(Application.ExeName) +
// 'devchs.ini';
// cxLocalizer1.Active := true;
// cxLocalizer1.LanguageIndex := 1;
// end;
//
// pathStr:=ExtractFilePath(Application.ExeName) + '\AllSkins.skinres';
// if FileExists(pathStr) then
// begin
// dxSkinsUserSkinLoadFromFile(pathStr, 'WXI');
// RootLookAndFeel.SkinName := sdxSkinsUserSkinName;
// end;
// end);
// thread.FreeOnTerminate := True;
// thread.Start;
dxSkinController1.BeginUpdate;
TRY
RootLookAndFeel.NativeStyle := FALSE;
gFontSize:=0;
if (fileexists(ExtractFilePath(Application.ExeName) + 'devchs.ini') = true)
then
@ -72,30 +97,6 @@ begin
cxLocalizer1.LanguageIndex := 1;
end;
pathStr:=ExtractFilePath(Application.ExeName) + '\AllSkins.skinres';
if FileExists(pathStr) then
begin
dxSkinsUserSkinLoadFromFile(pathStr, 'WXI');
RootLookAndFeel.SkinName := sdxSkinsUserSkinName;
end;
end);
thread.FreeOnTerminate := True;
thread.Start;
RootLookAndFeel.NativeStyle := FALSE;
gFontSize:=0;
// if (fileexists(ExtractFilePath(Application.ExeName) + 'devchs.ini') = true)
// then
// begin
// cxLocalizer1.FileName := ExtractFilePath(Application.ExeName) +
// 'devchs.ini';
// cxLocalizer1.Active := true;
// cxLocalizer1.LanguageIndex := 1;
// end;
//
getSystemIni();
if not gIsUseSkin then
begin
@ -104,15 +105,16 @@ begin
end
else
begin
// pathStr:=ExtractFilePath(Application.ExeName) + '\AllSkins.skinres';
// if FileExists(pathStr) then
// begin
// dxSkinsUserSkinLoadFromFile(pathStr, 'WXI');
// RootLookAndFeel.SkinName := sdxSkinsUserSkinName;
// end;
pathStr:=ExtractFilePath(Application.ExeName) + '\AllSkins.skinres';
if FileExists(pathStr) then
begin
dxSkinsUserSkinLoadFromFile(pathStr, 'WXI');
RootLookAndFeel.SkinName := sdxSkinsUserSkinName;
end;
end;
dxSkinController1.EndUpdate;
FINALLY
dxSkinController1.EndUpdate;
END;
end;