2024-07-07 09:35:27 +08:00
|
|
|
|
unit U_BaseList;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
|
|
|
|
|
System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Data.DB,
|
2024-11-27 14:49:17 +08:00
|
|
|
|
Data.Win.ADODB, U_WindowFormdesign, cxGraphics, cxControls, cxLookAndFeels,
|
|
|
|
|
cxLookAndFeelPainters,
|
|
|
|
|
cxStyles, cxCustomData, cxFilter, cxData, cxDataStorage, cxEdit, cxNavigator,
|
|
|
|
|
dxDateRanges, dxScrollbarAnnotations, cxDBData, cxGridLevel, cxClasses,
|
|
|
|
|
cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
|
|
|
|
cxGrid, cxContainer, cxProgressBar;
|
2024-07-07 09:35:27 +08:00
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
TfrmBaseList = class(TForm)
|
|
|
|
|
ADOQueryBaseCmd: TADOQuery;
|
|
|
|
|
ADOQueryBaseTemp: TADOQuery;
|
2024-10-12 10:45:24 +08:00
|
|
|
|
cxProgressBar2: TcxProgressBar;
|
2024-07-07 09:35:27 +08:00
|
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
|
|
procedure FormCreate(Sender: TObject);
|
|
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
|
|
procedure FormDestroy(Sender: TObject);
|
|
|
|
|
private
|
|
|
|
|
fWindowDesign: TWindowFormdesign;
|
|
|
|
|
protected
|
|
|
|
|
fParameters1: string;
|
|
|
|
|
fParameters2: string;
|
|
|
|
|
fParameters3: string;
|
|
|
|
|
fParameters4: string;
|
|
|
|
|
fParameters5: string;
|
|
|
|
|
fParameters10: string;
|
|
|
|
|
public
|
|
|
|
|
fFormId: integer;
|
|
|
|
|
fIsCanDesign:boolean;
|
|
|
|
|
constructor Create(AOwner: TComponent; ACaption: string=''; Parameters1: string=''; Parameters2: string=''; Parameters3: string=''; Parameters4: string=''; Parameters5: string=''; Parameters10: string='';FormID:Integer=0);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
frmBaseList: TfrmBaseList;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses
|
2024-10-30 13:45:23 +08:00
|
|
|
|
U_RTFun, U_globalVar, U_dataLink,U_FormLayOutDesign;
|
2024-07-07 09:35:27 +08:00
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
constructor TfrmBaseList.Create(AOwner: TComponent; ACaption: string=''; Parameters1: string=''; Parameters2: string=''; Parameters3: string=''; Parameters4: string=''; Parameters5: string=''; Parameters10: string='';FormID:Integer=0);
|
|
|
|
|
begin
|
2024-11-23 14:24:52 +08:00
|
|
|
|
inherited Create(AOwner);
|
|
|
|
|
|
|
|
|
|
if ACaption <> '' then
|
|
|
|
|
Caption := ACaption;
|
|
|
|
|
|
|
|
|
|
fParameters1 := Parameters1;
|
|
|
|
|
fParameters2 := Parameters2;
|
|
|
|
|
fParameters3 := Parameters3;
|
|
|
|
|
fParameters4 := Parameters4;
|
|
|
|
|
fParameters5 := Parameters5;
|
|
|
|
|
fParameters10 := Parameters10;
|
|
|
|
|
fFormId:= FormID ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-07-07 09:35:27 +08:00
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TfrmBaseList.FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
|
|
begin
|
2024-11-23 14:24:52 +08:00
|
|
|
|
if (fFormId>0) and (WriteCloseWin(ADOQueryBaseCmd, self.Caption, fFormId, gDllFileName)) then
|
2024-07-07 09:35:27 +08:00
|
|
|
|
begin
|
|
|
|
|
Sendmessage(application.MainForm.Handle, WM_CloseForm, 4, 0);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TfrmBaseList.FormCreate(Sender: TObject);
|
2024-10-30 13:45:23 +08:00
|
|
|
|
var
|
|
|
|
|
mFontSize:integer;
|
2024-07-07 09:35:27 +08:00
|
|
|
|
begin
|
2024-11-27 14:49:17 +08:00
|
|
|
|
getSystemIni();
|
2024-11-23 14:24:52 +08:00
|
|
|
|
self.DoubleBuffered:=gIsUseSkin;
|
2024-10-30 13:45:23 +08:00
|
|
|
|
if gFontSize<9 then
|
|
|
|
|
begin
|
2024-11-27 14:49:17 +08:00
|
|
|
|
mFontSize := 12;
|
2024-10-30 13:45:23 +08:00
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
mFontSize:=gFontSize ;
|
|
|
|
|
end;
|
2024-11-27 14:49:17 +08:00
|
|
|
|
|
|
|
|
|
self.Font.Size := gFontSize;
|
2024-10-30 13:45:23 +08:00
|
|
|
|
if trim(gFontName)<>'' then
|
|
|
|
|
self.Font.Name:=gFontName;
|
|
|
|
|
// <20><><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD>ɫ
|
2024-07-07 09:35:27 +08:00
|
|
|
|
fWindowDesign := TWindowFormdesign.Create();
|
2024-10-12 10:45:24 +08:00
|
|
|
|
|
2024-07-07 09:35:27 +08:00
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TfrmBaseList.FormDestroy(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
fWindowDesign.free;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TfrmBaseList.FormShow(Sender: TObject);
|
|
|
|
|
begin
|
2024-10-12 10:45:24 +08:00
|
|
|
|
if DParameters8<>'1' then
|
|
|
|
|
begin
|
|
|
|
|
if trim(gStructVer)='' then
|
|
|
|
|
fWindowDesign.FormStyleInit1(self, fFormId, ADOQueryBaseTemp, ADOQueryBaseCmd, '', fParameters10)
|
|
|
|
|
else
|
|
|
|
|
fWindowDesign.FormStyleInit(self, fFormId, ADOQueryBaseTemp, ADOQueryBaseCmd, '', fParameters10);
|
|
|
|
|
end;
|
2024-10-30 13:45:23 +08:00
|
|
|
|
|
2024-11-27 14:49:17 +08:00
|
|
|
|
// TFormInitThread.Create(fWindowDesign,self, fFormId, ADOQueryBaseTemp, ADOQueryBaseCmd,trim(gStructVer));
|
|
|
|
|
// SendMessage(self.Handle, WM_SETREDRAW, 1, 0);
|
2024-07-07 09:35:27 +08:00
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end.
|
|
|
|
|
|