2024-07-07 09:35:27 +08:00
|
|
|
unit U_BaseDataLink;
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses
|
2024-11-23 14:24:52 +08:00
|
|
|
System.SysUtils,windows,forms, System.Classes,
|
|
|
|
dxSkinsDefaultPainters, dxCore, cxClasses,
|
2024-11-27 14:49:17 +08:00
|
|
|
cxLookAndFeels, dxSkinsForm, cxContainer, cxEdit,
|
2024-11-23 14:24:52 +08:00
|
|
|
System.ImageList, Vcl.ImgList, Vcl.Controls, cxImageList, cxGraphics, cxStyles,
|
2024-11-27 14:49:17 +08:00
|
|
|
dxLayoutLookAndFeels,cxLocalization;
|
2024-07-07 09:35:27 +08:00
|
|
|
|
|
|
|
type
|
|
|
|
TBaseDataLink = class(TDataModule)
|
|
|
|
dxSkinController1: TdxSkinController;
|
|
|
|
cxEditStyleController1: TcxEditStyleController;
|
|
|
|
ThreeLookAndFeelCol: TcxLookAndFeelController;
|
|
|
|
cxImageList_bar: TcxImageList;
|
|
|
|
ThreeColorBase: TcxStyleRepository;
|
|
|
|
dxLayoutLookAndFeelList1: TdxLayoutLookAndFeelList;
|
|
|
|
dxLayoutSkinLookAndFeel1: TdxLayoutSkinLookAndFeel;
|
|
|
|
cxLocalizer1: TcxLocalizer;
|
2024-08-20 09:43:44 +08:00
|
|
|
grid_head_blue: TcxStyle;
|
|
|
|
grid_head_red: TcxStyle;
|
|
|
|
grid_head_green: TcxStyle;
|
|
|
|
grid_head_yellow: TcxStyle;
|
|
|
|
grid_head_cyan: TcxStyle;
|
|
|
|
grid_head_purple: TcxStyle;
|
|
|
|
grid_black_blue: TcxStyle;
|
|
|
|
grid_black_pink: TcxStyle;
|
|
|
|
grid_black_grey: TcxStyle;
|
|
|
|
grid_black_green: TcxStyle;
|
|
|
|
grid_black_yellow: TcxStyle;
|
|
|
|
grid_black_cyan: TcxStyle;
|
2024-10-12 10:45:24 +08:00
|
|
|
grid_head_black: TcxStyle;
|
2024-07-07 09:35:27 +08:00
|
|
|
procedure DataModuleCreate(Sender: TObject);
|
|
|
|
private
|
|
|
|
{ Private declarations }
|
|
|
|
public
|
2024-11-23 14:24:52 +08:00
|
|
|
|
2024-07-07 09:35:27 +08:00
|
|
|
end;
|
|
|
|
|
|
|
|
var
|
|
|
|
BaseDataLink: TBaseDataLink;
|
|
|
|
|
|
|
|
implementation
|
2024-08-20 09:43:44 +08:00
|
|
|
uses
|
2024-11-23 14:24:52 +08:00
|
|
|
U_globalVar,U_FormLayOutDesign;
|
2024-07-07 09:35:27 +08:00
|
|
|
{%CLASSGROUP 'Vcl.Controls.TControl'}
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
procedure TBaseDataLink.DataModuleCreate(Sender: TObject);
|
|
|
|
var
|
2024-11-23 14:24:52 +08:00
|
|
|
str :String;
|
|
|
|
pathStr:String;
|
2024-08-20 09:43:44 +08:00
|
|
|
I: Integer;
|
2024-11-27 14:49:17 +08:00
|
|
|
thread:Tthread;
|
2024-07-07 09:35:27 +08:00
|
|
|
begin
|
2024-11-27 14:49:17 +08:00
|
|
|
|
|
|
|
RootLookAndFeel.NativeStyle := false;
|
|
|
|
gFontSize:=0;
|
2024-11-23 14:24:52 +08:00
|
|
|
|
|
|
|
if (fileexists(ExtractFilePath(Application.ExeName) + 'devchs.ini') = true)
|
|
|
|
then
|
|
|
|
begin
|
|
|
|
cxLocalizer1.FileName := ExtractFilePath(Application.ExeName) +
|
|
|
|
'devchs.ini';
|
|
|
|
cxLocalizer1.Active := true;
|
|
|
|
cxLocalizer1.LanguageIndex := 1;
|
|
|
|
end;
|
|
|
|
//
|
2024-11-27 14:49:17 +08:00
|
|
|
if not isUseSkin() then
|
2024-11-23 14:24:52 +08:00
|
|
|
begin
|
|
|
|
dxSkinController1.UseSkins:=false;
|
|
|
|
dxSkinController1.SkinName:='';
|
|
|
|
end
|
|
|
|
else
|
|
|
|
begin
|
2024-11-27 14:49:17 +08:00
|
|
|
pathStr:=ExtractFilePath(Application.ExeName) + '\AllSkins.skinres';
|
|
|
|
if FileExists(pathStr) then
|
|
|
|
begin
|
|
|
|
dxSkinsUserSkinLoadFromFile(pathStr, 'WXI');
|
|
|
|
RootLookAndFeel.SkinName := sdxSkinsUserSkinName;
|
|
|
|
end;
|
2024-11-23 14:24:52 +08:00
|
|
|
end;
|
2024-11-15 17:26:46 +08:00
|
|
|
end;
|
2024-08-20 09:43:44 +08:00
|
|
|
|
2024-11-15 17:26:46 +08:00
|
|
|
|
2024-11-23 14:24:52 +08:00
|
|
|
end.
|