servmain.pas
来自「Delphi实战演练一书的配套光盘」· PAS 代码 · 共 52 行
PAS
52 行
unit ServMain;
{ This is "Application Server" for this demo. You must compile and run
this program once before running the client application. The remote
data module (ServData) implments the actual OLE server that the client
communicates with. }
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls, Grids, DBGrids, Db;
type
TMainForm = class(TForm)
Panel1: TPanel;
QueryCount: TLabel;
ClientCount: TLabel;
Label3: TLabel;
private
FQueryCount: Integer;
FClientCount: Integer;
public
procedure UpdateClientCount(Incr: Integer);
procedure IncQueryCount;
end;
var
MainForm: TMainForm;
implementation
{$R *.DFM}
{ These procedures update the display of the application server to show
how many clients are connected and how many queries have been exectued. }
procedure TMainForm.UpdateClientCount(Incr: Integer);
begin
FClientCount := FClientCount + Incr;
ClientCount.Caption := IntToStr(FClientCount);
end;
procedure TMainForm.IncQueryCount;
begin
Inc(FQueryCount);
QueryCount.Caption := IntToStr(FQueryCount);
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?