Constructing the Interface for an Internet Access Control Application - Code Concluded
(Page 5 of 5 )
procedure TForm1.newOpClick(Sender: TObject);
begin
form5.show;
end;
procedure TForm1.btnExitClick(Sender: TObject);
begin
form1.level:='';
form1.Caption:='';
form1.Close;
form3.isLogon:=false;
form3.Visible:=true;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
theT:='minute(s)';
end;
procedure TForm1.activateClick(Sender: TObject);
begin
ts.DefaultPort:=1150;
if ts.Active then
begin
showmessage('Server already active.');
end
else
begin
ts.Active:=true;
activate.Glyph.LoadFromFile('ledon.bmp');
memo1.Lines.Add('Server activated' + #13#10 +'Please switch on the other computers.');
end;
end;
procedure TForm1.AddClient1Click(Sender: TObject);
begin
//form2.Show;
end;
procedure TForm1.lvDblClick(Sender: TObject);
begin
if lv.Items.count < 1 then
begin
end
else
if lv.Selected.SubItems.Strings[4] <> 'free' then
begin
messagedlg('This workstation is not available.',mtinformation,[mbOk], 0);
end
else
begin
form2.label1.caption:=lv.Selected.Caption;
form2.show;
end;
end;
procedure TForm1.shut_downClick(Sender: TObject);
begin
broadcastAll;
end;
end.
/IntAccess(3)_html_75939471.png)
As you can see from the screen shot, the user interface is very simple, yet user friendly. In the next coupe of articles we will look in depth at the code that makes up both the user interface and the server application itself.
| 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. |