home *** CD-ROM | disk | FTP | other *** search
/ Delphi 5 for Professionals / DELPHI5.iso / Runimage / Delphi50 / Demos / Midas / Empedit / servmain.pas < prev   
Encoding:
Pascal/Delphi Source File  |  1999-08-11  |  1.3 KB  |  53 lines

  1. unit ServMain;
  2.  
  3. { This program represents the "Application Server" portion of the
  4.   distributed datasets demo.  The other part is the client which will access
  5.   the data provided by this server.  You must compile and run this program
  6.   once before running the EmpEdit project. }
  7.  
  8. interface
  9.  
  10. uses
  11.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  12.   ExtCtrls, StdCtrls, Grids, DBGrids, Db;
  13.  
  14. type
  15.   TMainForm = class(TForm)
  16.     Panel1: TPanel;
  17.     QueryCount: TLabel;
  18.     ClientCount: TLabel;
  19.   private
  20.     FQueryCount: Integer;
  21.     FClientCount: Integer;
  22.   public
  23.     procedure UpdateClientCount(Incr: Integer);
  24.     procedure IncQueryCount;
  25.   end;
  26.  
  27. var
  28.   MainForm: TMainForm;
  29.  
  30. implementation
  31.  
  32. {$R *.DFM}
  33.  
  34. { These procedures update the display of the application server form for
  35.   the purposes of this demo.  A typical Application Server would probably
  36.   not have any visible UI.  You can add a line of to the project file to
  37.   prevent the application server icon from being displayed on the taskbar. }
  38.  
  39. procedure TMainForm.UpdateClientCount(Incr: Integer);
  40. begin
  41.   FClientCount := FClientCount + Incr;
  42.   ClientCount.Caption := IntToStr(FClientCount);
  43. end;
  44.  
  45. procedure TMainForm.IncQueryCount;
  46. begin
  47.   Inc(FQueryCount);
  48.   QueryCount.Caption := IntToStr(FQueryCount);
  49. end;
  50.  
  51.  
  52. end.
  53.