📄 ufrmty.pas
字号:
unit uFrmTY;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, Menus;
type
TFrmTY = class(TForm)
PnlBT: TPanel;
Shape1: TShape;
Shape2: TShape;
Shape3: TShape;
Shape4: TShape;
Panel2: TPanel;
Shape5: TShape;
Shape6: TShape;
Shape7: TShape;
Shape8: TShape;
FontDialog1: TFontDialog;
Label1: TLabel;
Shape9: TShape;
Label2: TLabel;
Label3: TLabel;
Shape10: TShape;
Shape11: TShape;
LblCtA0: TLabel;
LblCtA1: TLabel;
Panel1: TPanel;
Shape12: TShape;
Shape13: TShape;
Shape14: TShape;
Shape15: TShape;
Label6: TLabel;
Shape16: TShape;
Label7: TLabel;
Label8: TLabel;
Shape17: TShape;
LblCtB0: TLabel;
LblCtB1: TLabel;
Shape18: TShape;
Panel3: TPanel;
Shape19: TShape;
Shape20: TShape;
Shape21: TShape;
Shape22: TShape;
Label11: TLabel;
Shape23: TShape;
Label12: TLabel;
Label13: TLabel;
Shape24: TShape;
LblCtC0: TLabel;
LblCtC1: TLabel;
Shape25: TShape;
Panel4: TPanel;
Shape26: TShape;
Shape27: TShape;
Shape28: TShape;
Shape29: TShape;
Label16: TLabel;
Shape30: TShape;
Label17: TLabel;
Label18: TLabel;
Shape31: TShape;
LblCtE0: TLabel;
LblCtE1: TLabel;
Shape32: TShape;
Panel5: TPanel;
Shape33: TShape;
Shape34: TShape;
Shape35: TShape;
Shape36: TShape;
Label21: TLabel;
Shape37: TShape;
Label22: TLabel;
Label23: TLabel;
Shape38: TShape;
LblCtD0: TLabel;
LblCtD1: TLabel;
Shape39: TShape;
Timer1: TTimer;
Timer2: TTimer;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
N2: TMenuItem;
ColorDialog1: TColorDialog;
N3: TMenuItem;
N4: TMenuItem;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure PnlBTDblClick(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure N4Click(Sender: TObject);
private
{ Private declarations }
public
sHYBM,sHYMC:String;
Procedure Pinit();
{ Public declarations }
end;
var
FrmTY: TFrmTY;
implementation
uses uDMOA, uDataOA, uFunSys;
{$R *.dfm}
procedure TFrmTY.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action:=caFree;
FrmTY:=nil;
end;
procedure TFrmTY.Pinit;
var
Str:String;
I:Integer;
begin
PnlBT.Caption:=sHYMC;
Str:='Select * from TAD03_HYCJR Where sHYBM ='+''''+sHYBM+'''';
FCarryOutSQL(DMOA.ADOQry,Str,True);
I:=DMOA.ADOQry.RecordCount;
LblCtA0.Caption:=IntToStr(I);//总人数
Str:='Select * from TAD03_HYCJR Where sHYBM ='+''''+sHYBM+''''
+' And sCHLB =''出席''';
FCarryOutSQL(DMOA.ADOQry,Str,True);
I:=DMOA.ADOQry.RecordCount;
LblCtB0.Caption:=IntToStr(I);//总人数
Str:='Select * from TAD03_HYCJR Where sHYBM ='+''''+sHYBM+''''
+' And sCHLB =''列席''';
FCarryOutSQL(DMOA.ADOQry,Str,True);
I:=DMOA.ADOQry.RecordCount;
LblCtC0.Caption:=IntToStr(I);//总人数
Str:='Select * from TAD03_HYCJR Where sHYBM ='+''''+sHYBM+''''
+' And sCHLB =''特邀''';
FCarryOutSQL(DMOA.ADOQry,Str,True);
I:=DMOA.ADOQry.RecordCount;
LblCtD0.Caption:=IntToStr(I);//总人数
Str:='Select * from TAD03_HYCJR Where sHYBM ='+''''+sHYBM+''''
+' And sCHLB =''旁听''';
FCarryOutSQL(DMOA.ADOQry,Str,True);
I:=DMOA.ADOQry.RecordCount;
LblCtE0.Caption:=IntToStr(I);//总人数
end;
procedure TFrmTY.PnlBTDblClick(Sender: TObject);
begin
FontDialog1.Font:=PnlBT.Font;
if FontDialog1.Execute then PnlBT.Font:=FontDialog1.Font;
end;
procedure TFrmTY.Timer1Timer(Sender: TObject);
var
Str,sV:String;
I:integer;
begin
sV:='Select A.*,B.sDateYMD from TAD03_HYCJR A,TAD01_KQJL B Where '
+' A.ID = B.FZID And A.sHYBM = B.sHYBM';
Str:='Select * from ('+sV+') A Where A.sHYBM ='+''''+sHYBM+''''
+' And sDateYMD is Not NULL';
FCarryOutSQL(DMOA.ADOQry,Str,True);
I:=DMOA.ADOQry.RecordCount;
LblCtA1.Caption:=IntToStr(I);
Str:='Select * from ('+sV+') A Where A.sHYBM ='+''''+sHYBM+''''
+' And sDateYMD is Not NULL'
+' And A.sCHLB =''出席''';
FCarryOutSQL(DMOA.ADOQry,Str,True);
I:=DMOA.ADOQry.RecordCount;
LblCtB1.Caption:=IntToStr(I);
Str:='Select * from ('+sV+') A Where A.sHYBM ='+''''+sHYBM+''''
+' And sDateYMD is Not NULL'
+' And A.sCHLB =''列席''';
FCarryOutSQL(DMOA.ADOQry,Str,True);
I:=DMOA.ADOQry.RecordCount;
LblCtC1.Caption:=IntToStr(I);
Str:='Select * from ('+sV+') A Where A.sHYBM ='+''''+sHYBM+''''
+' And sDateYMD is Not NULL'
+' And A.sCHLB =''特要''';
FCarryOutSQL(DMOA.ADOQry,Str,True);
I:=DMOA.ADOQry.RecordCount;
LblCtD1.Caption:=IntToStr(I);
Str:='Select * from ('+sV+') A Where A.sHYBM ='+''''+sHYBM+''''
+' And sDateYMD is Not NULL'
+' And A.sCHLB =''旁听''';
FCarryOutSQL(DMOA.ADOQry,Str,True);
I:=DMOA.ADOQry.RecordCount;
LblCtE1.Caption:=IntToStr(I);
Application.ProcessMessages;
end;
procedure TFrmTY.N1Click(Sender: TObject);
var
I:integer;
begin
ColorDialog1.Color:=FrmTY.Color;
if not ColorDialog1.Execute then Exit;
FrmTY.Color:=ColorDialog1.Color;
for I:=0 to Self.ComponentCount-1 do begin
if Self.Components[I] is TPanel then
TPanel(Self.Components[I]).Color:=ColorDialog1.Color;
end;
end;
procedure TFrmTY.N2Click(Sender: TObject);
var
I:integer;
begin
ColorDialog1.Color:=Label2.Font.Color ;
if not ColorDialog1.Execute then Exit;
for I:=0 to Self.ComponentCount-1 do begin
if Self.Components[I] is TLabel then begin
TLabel(Self.Components[I]).Transparent:=True;
if TLabel(Self.Components[I]).Tag = 0 then
TLabel(Self.Components[I]).Font.Color:=ColorDialog1.Color;
end;
end;
end;
procedure TFrmTY.N3Click(Sender: TObject);
var
I:integer;
begin
ColorDialog1.Color:=LblCtA0.Font.Color;
if not ColorDialog1.Execute then Exit;
for I:=0 to Self.ComponentCount-1 do begin
if Self.Components[I] is TLabel then begin
TLabel(Self.Components[I]).Transparent:=True;
if TLabel(Self.Components[I]).Tag = 5 then
TLabel(Self.Components[I]).Font.Color:=ColorDialog1.Color;
end;
end;
end;
procedure TFrmTY.N4Click(Sender: TObject);
var
I:integer;
begin
ColorDialog1.Color:=Shape16.Pen.Color;
if not ColorDialog1.Execute then Exit;
for I:=0 to Self.ComponentCount-1 do begin
if Self.Components[I] is TShape then begin
if TShape(Self.Components[I]).Tag = 5 then
TShape(Self.Components[I]).Pen.Color:=ColorDialog1.Color;
TShape(Self.Components[I]).Brush.Color:=ColorDialog1.Color;
end;
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -