If you’ve ever visited an Internet café, you've noticed that there is usually a timer on the screen that tells you how much time you have left to use the Internet. In this series of articles we will discuss both the underlying architecture of such an application as well as the code involved, culminating in creating an example application.
Building an Internet Access Control Application - Client Application (Page 4 of 4 )
The client application is responsible for registering itself with the server application when the workstation is switched on. It is also responsible for implementing (and responding to) any commands that may come from the server, and also to send commands to the server when necessary.
The application will have two interfaces, or forms. One will be the screen block and the other will be the timer form that will actually show the time left and total time allocated per session. The screen block form will also have the additional responsibility to ensure that access to the keyboard and mouse is blocked.
The timer form will implement most of the protocol. It will be located on the bottom right of the screen. It also has a built-in mechanism that will warn the user to save his or her work when one minute of the total allocated time is left. In addition to that, the timer form color will change to either red or yellow depending on what stage the user has reached with the allocated time.
The application is somewhat basic in nature, but can be improved depending on your needs. For example, you can store more information in the database tables to get monthly, yearly or quarterly income reports. Or you can even check which staff member has made the most money in a given time period.
The possibilities are endless. But even in its basic state, the current implementation of the Internet access control application does meet the primary objective, which is to control access to the Internet and to accurately report on how much money has been made.
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.