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

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; str :String;
pathStr:String; pathStr:String;
I: Integer; I: Integer;
thread:TThread; // thread:TThread;
begin begin
/////////////////// ///////////////////
dxSkinController1.BeginUpdate; // dxSkinController1.BeginUpdate;
////////////////////// //////////////////////
thread:=TThread.CreateAnonymousThread( // thread:=TThread.CreateAnonymousThread(
procedure // procedure
begin // 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) if (fileexists(ExtractFilePath(Application.ExeName) + 'devchs.ini') = true)
then then
@ -72,30 +97,6 @@ begin
cxLocalizer1.LanguageIndex := 1; cxLocalizer1.LanguageIndex := 1;
end; 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(); getSystemIni();
if not gIsUseSkin then if not gIsUseSkin then
begin begin
@ -104,15 +105,16 @@ begin
end end
else else
begin begin
// pathStr:=ExtractFilePath(Application.ExeName) + '\AllSkins.skinres'; pathStr:=ExtractFilePath(Application.ExeName) + '\AllSkins.skinres';
// if FileExists(pathStr) then if FileExists(pathStr) then
// begin begin
// dxSkinsUserSkinLoadFromFile(pathStr, 'WXI'); dxSkinsUserSkinLoadFromFile(pathStr, 'WXI');
// RootLookAndFeel.SkinName := sdxSkinsUserSkinName; RootLookAndFeel.SkinName := sdxSkinsUserSkinName;
// end;
end; end;
end;
FINALLY
dxSkinController1.EndUpdate; dxSkinController1.EndUpdate;
END;
end; end;