闪缩更新

This commit is contained in:
sgwp 2024-11-23 14:24:52 +08:00
parent d1b82e4288
commit beb717ff30
4 changed files with 69 additions and 48 deletions

View File

@ -4,7 +4,7 @@ object BaseDataLink: TBaseDataLink
Height = 322
Width = 484
object dxSkinController1: TdxSkinController
Kind = lfStandard
Kind = lfFlat
NativeStyle = False
ScrollbarMode = sbmClassic
SkinName = 'WXI'
@ -45,7 +45,7 @@ object BaseDataLink: TBaseDataLink
PixelsPerInch = 96
end
object ThreeLookAndFeelCol: TcxLookAndFeelController
Kind = lfStandard
Kind = lfFlat
NativeStyle = False
ScrollbarMode = sbmClassic
SkinName = 'WXI'

View File

@ -3,10 +3,11 @@ unit U_BaseDataLink;
interface
uses
System.SysUtils, windows, forms, System.Classes, dxCore, cxClasses,
cxLookAndFeels, cxContainer, cxEdit, System.ImageList, Vcl.ImgList,
Vcl.Controls, cxImageList, cxGraphics, cxStyles, dxLayoutLookAndFeels,
cxLocalization, dxSkinsForm, dxSkinsDefaultPainters;
System.SysUtils,windows,forms, System.Classes,
dxSkinsDefaultPainters, dxCore, cxClasses,
cxLookAndFeels, dxSkinsForm, cxContainer, cxEdit,
System.ImageList, Vcl.ImgList, Vcl.Controls, cxImageList, cxGraphics, cxStyles,
dxLayoutLookAndFeels,cxLocalization;
type
TBaseDataLink = class(TDataModule)
@ -35,52 +36,66 @@ 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;
thread:Tthread;
begin
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;
//
if not isUseSkin() then
begin
dxSkinController1.UseSkins := false;
dxSkinController1.SkinName := '';
end
else
begin
pathStr := ExtractFilePath(Application.ExeName) + '\AllSkins.skinres';
if FileExists(pathStr) then
thread:=TThread.CreateAnonymousThread(
procedure
begin
dxSkinsUserSkinLoadFromFile(pathStr, 'WXI');
RootLookAndFeel.SkinName := sdxSkinsUserSkinName;
end;
TThread.Synchronize(nil,
procedure
begin
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;
//
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;
end)
end);
thread.FreeOnTerminate := True;
thread.Start;
end;
// gGridNativeSet:=isGridNativeSet();
//
end;
end.

View File

@ -37,6 +37,7 @@ var
mFontSize:integer;
begin
getSystemIni();
self.DoubleBuffered:=gIsUseSkin;
if gFontSize<9 then
begin
mFontSize := 12;

View File

@ -6,7 +6,7 @@ uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Data.DB,
Data.Win.ADODB, U_WindowFormdesign, cxGraphics, cxControls, cxLookAndFeels,
cxLookAndFeelPainters,
cxLookAndFeelPainters,
cxStyles, cxCustomData, cxFilter, cxData, cxDataStorage, cxEdit, cxNavigator,
dxDateRanges, dxScrollbarAnnotations, cxDBData, cxGridLevel, cxClasses,
cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
@ -47,22 +47,26 @@ uses
constructor TfrmBaseList.Create(AOwner: TComponent; ACaption: string=''; Parameters1: string=''; Parameters2: string=''; Parameters3: string=''; Parameters4: string=''; Parameters5: string=''; Parameters10: string='';FormID:Integer=0);
begin
inherited Create(AOwner);
if ACaption <> '' then
Caption := ACaption;
inherited Create(AOwner);
if ACaption <> '' then
Caption := ACaption;
fParameters1 := Parameters1;
fParameters2 := Parameters2;
fParameters3 := Parameters3;
fParameters4 := Parameters4;
fParameters5 := Parameters5;
fParameters10 := Parameters10;
fFormId:= FormID ;
fParameters1 := Parameters1;
fParameters2 := Parameters2;
fParameters3 := Parameters3;
fParameters4 := Parameters4;
fParameters5 := Parameters5;
fParameters10 := Parameters10;
fFormId:= FormID ;
end;
procedure TfrmBaseList.FormClose(Sender: TObject; var Action: TCloseAction);
begin
if WriteCloseWin(ADOQueryBaseCmd, self.Caption, fFormId, gDllFileName) then
if (fFormId>0) and (WriteCloseWin(ADOQueryBaseCmd, self.Caption, fFormId, gDllFileName)) then
begin
Sendmessage(application.MainForm.Handle, WM_CloseForm, 4, 0);
end;
@ -74,6 +78,7 @@ var
mFontSize:integer;
begin
getSystemIni();
self.DoubleBuffered:=gIsUseSkin;
if gFontSize<9 then
begin
mFontSize := 12;