| Class TSeatChecker (unit Sccomps) |
TComponent
TMethod defines the two methods of software licensing -- by user (seat- } { based) or by total number of users (concurrent use-based).
| Constructors |
constructor Create(AOwner : TComponent);TSeatChecker
| Functions |
procedure SitDown;
procedure StandUp;
procedure EmptyLurchTable;Make sure that a seat is not being held first.
procedure SetDBName(value : TFileName);
procedure SetMethod(value : TMethod);
procedure SetStatus(value : TStatus);| Properties |
property DatabaseName : TFileName
property Method : TMethod
property Status : TStatus
property UserName : String| Events |
| Variables |
fDBName : TFileName;
fLurchTbl : TTable;
fMethod : TMethod;
fStatus : TStatus;
fUserName : String;| Constructors |
constructor Create(AOwner : TComponent);Public declarations
TSeatChecker
| Functions |
procedure SitDown;if-then
procedure StandUp;Finally, record the current status
procedure EmptyLurchTable;Protected declarations
Make sure that a seat is not being held first.
procedure SetDBName(value : TFileName);initialize Status to be standing (i.e. not occupying a seat).
procedure SetMethod(value : TMethod);Depending on the value of Value, call the SitDown or the StandUp method. I do this so that I can test my application in design-mode, i.e. if I want to reserve a seat, I just change the value in the Object Inspector. This is the beauty of component-oriented programming.
procedure SetStatus(value : TStatus);This is your basic property access method. You may wish to add some extra functionality to it, such as checking to see that a lurch table exists in the specified database, and creating one if it does not.
| Properties |
property DatabaseName : TFileNamePublished declarations
property Method : TMethodUsername is the name of the user checking for a seat.
property Status : TStatusDatabaseName is the name of the application database. It is important to } { set this to the database being used by the application, otherwise the } { whole purpose of TSeatChecker is defeated.
property UserName : StringStatus indicates whether the application holds a seat or not.
| Events |
| Variables |
fDBName : TFileName;Private declarations
fLurchTbl : TTable;
fMethod : TMethod;
fStatus : TStatus;
fUserName : String;