mainunit.pas

来自「实例4学院信息管理系统 - RAR 档案文件」· PAS 代码 · 共 60 行

PAS
60
字号
unit MainUnit;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ExtCtrls;

type
  TMainForm = class(TForm)
    Panel1: TPanel;
    Label1: TLabel;
    Label2: TLabel;
    L_CltCnt: TLabel;
    L_QryCnt: TLabel;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
    FQueryCount: Integer;
    FClientCount: Integer;

  public
    { Public declarations }
    procedure UpdateClientCount(Incr: Integer);
    procedure IncQueryCount;

  end;

var
  MainForm: TMainForm;

implementation

{$R *.DFM}
uses DMUnit;

procedure TMainForm.FormCreate(Sender: TObject);
begin
  FQueryCount:=0;
  FClientCount:=0;
  L_CltCnt.Caption:='0';
  L_QryCnt.Caption:='0';
end;

procedure TMainForm.UpdateClientCount(Incr: Integer);
begin
  FClientCount := FClientCount + Incr;
  L_CltCnt.Caption := IntToStr(FClientCount);
end;

procedure TMainForm.IncQueryCount;
begin
  Inc(FQueryCount);
  L_QryCnt.Caption := IntToStr(FQueryCount);
end;



end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?