From d1b82e428837712e8d3a5e52ec28be96c10907da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cddf=E2=80=9D?= <“ddf668490@163.com”> Date: Fri, 15 Nov 2024 17:26:46 +0800 Subject: [PATCH] 2 --- public10/design/U_BaseDataLink.pas | 66 ++++++++++++++---------------- 1 file changed, 31 insertions(+), 35 deletions(-) diff --git a/public10/design/U_BaseDataLink.pas b/public10/design/U_BaseDataLink.pas index 4461493..766118f 100644 --- a/public10/design/U_BaseDataLink.pas +++ b/public10/design/U_BaseDataLink.pas @@ -3,12 +3,10 @@ unit U_BaseDataLink; interface uses - System.SysUtils,windows,forms, System.Classes, - dxCore, cxClasses, - cxLookAndFeels, dxSkinsForm, cxContainer, cxEdit, - System.ImageList, Vcl.ImgList, Vcl.Controls, cxImageList, cxGraphics, cxStyles, - dxLayoutLookAndFeels, - cxLocalization; + System.SysUtils, windows, forms, System.Classes, dxCore, cxClasses, + cxLookAndFeels, cxContainer, cxEdit, System.ImageList, Vcl.ImgList, + Vcl.Controls, cxImageList, cxGraphics, cxStyles, dxLayoutLookAndFeels, + cxLocalization, dxSkinsForm, dxSkinsDefaultPainters; type TBaseDataLink = class(TDataModule) @@ -37,54 +35,52 @@ type private { Private declarations } public - end; var BaseDataLink: TBaseDataLink; implementation + uses - U_globalVar,U_FormLayOutDesign; + U_globalVar, U_FormLayOutDesign; {%CLASSGROUP 'Vcl.Controls.TControl'} {$R *.dfm} procedure TBaseDataLink.DataModuleCreate(Sender: TObject); var - str :String; - pathStr:String; + str: string; + pathStr: string; I: Integer; begin RootLookAndFeel.NativeStyle := False; - gFontSize:=0; + 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; + if (fileexists(ExtractFilePath(Application.ExeName) + 'devchs.ini') = true) then + begin + cxLocalizer1.FileName := ExtractFilePath(Application.ExeName) + 'devchs.ini'; + cxLocalizer1.Active := true; + cxLocalizer1.LanguageIndex := 1; + end; // - if not isUseSkin() then - begin - dxSkinController1.UseSkins:=false; - dxSkinController1.SkinName:=''; - end - else - begin - pathStr:=ExtractFilePath(Application.ExeName) + '\AllSkins.skinres'; - if FileExists(pathStr) then - begin - dxSkinsUserSkinLoadFromFile(pathStr, 'WXI'); - RootLookAndFeel.SkinName := sdxSkinsUserSkinName; - end; - end; + if not isUseSkin() then + begin + dxSkinController1.UseSkins := false; + dxSkinController1.SkinName := ''; + end + else + begin + pathStr := ExtractFilePath(Application.ExeName) + '\AllSkins.skinres'; + if FileExists(pathStr) then + begin + dxSkinsUserSkinLoadFromFile(pathStr, 'WXI'); + RootLookAndFeel.SkinName := sdxSkinsUserSkinName; + end; + end; // gGridNativeSet:=isGridNativeSet(); // - end; - +end; end. +