home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hacker Chronicles 2
/
HACKER2.BIN
/
446.NETDISP.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1989-10-29
|
7KB
|
319 lines
procedure update_time;
begin
window(1,1,80,25);
textcolor(status_f);
textbackground(border_b);
gotoxy(59,25); write(SystemDate,' ',SystemTime);
gotoxy(2,10);
end;
procedure status;
begin
window(1,1,80,25);
textcolor(status_f);
textbackground(border_b);
gotoxy(15,2); write(nbr_calls:4);
gotoxy(26,2); write(new_pntr:2);
gotoxy(8,25); write(curr_pntr:3);
gotoxy(17,25); write(top_pntr:3);
update_time;
end;
procedure display_call(var call : log_type);
begin
with call do
write(Trim(prefix) + area + suffix:6);
end;
procedure display_log_time(row,n: integer);
begin
gotoxy(1,row);
write(checkins[n].hr_min);
gotoxy(3,row);
if (n = mark1) then write(#31);
if (n = mark2) then write(#30);
end;
procedure display_checkin(nbr : integer);
var diff : integer;
begin
normcolor;
diff := nbr - curr_pntr;
if (diff < 14) then
begin
with checkins[nbr] do
begin
window(2,6,7,24);
gotoxy(1,5 + diff);
if (list_nbr = 0)
then display_call(net_list[position]^)
else display_call(new_list[position]^);
window(9,6,18,24);
gotoxy(1,5 + diff);
if (list_nbr = 0)
then write(net_list[position]^.name:10)
else write(new_list[position]^.name:10);
window(20,6,23,24);
gotoxy(1,5 + diff);
if (list_nbr = 0)
then if (net_list[position]^.net_nbr > 0)
then write(net_list[position]^.net_nbr:4)
else write('----')
else write('----');
window(25,6,29,24);
display_log_time(5 + diff,nbr);
end;
end;
end;
procedure scroll_up;
begin
if curr_pntr < top_pntr then
begin
window(2,6,7,23);
normcolor;
gotoxy(1,1);
DelLine;
window(9,6,18,23);
gotoxy(1,1);
DelLine;
window(20,6,23,23);
gotoxy(1,1);
DelLine;
window(25,6,29,23);
gotoxy(1,1);
DelLine;
window(1,1,80,25);
curr_pntr := curr_pntr + 1;
if (curr_pntr + 12 < top_pntr) then
display_checkin(curr_pntr + 13);
end;
status;
end;
procedure scroll_down;
begin
if curr_pntr > 1 then
begin
window(2,6,7,23);
normcolor;
gotoxy(1,1);
InsLine;
window(9,6,18,23);
gotoxy(1,1);
InsLIne;
window(20,6,23,23);
gotoxy(1,1);
InsLine;
window(25,6,29,23);
gotoxy(1,1);
InsLine;
curr_pntr := curr_pntr - 1;
if (curr_pntr - 4 > 0) then
begin
with checkins[curr_pntr - 4] do
begin
window(2,6,7,23);
gotoxy(1,1);
if (list_nbr = 0)
then display_call(net_list[position]^)
else display_call(new_list[position]^);
window(9,6,18,23);
gotoxy(1,1);
if (list_nbr = 0)
then write(net_list[position]^.name:10)
else write(new_list[position]^.name:10);
window(20,6,23,23);
gotoxy(1,1);
if (list_nbr = 0)
then if (net_list[position]^.net_nbr > 0)
then write(net_list[position]^.net_nbr:4)
else write('----')
else write('----');
window(25,6,29,23);
display_log_time(1,curr_pntr - 4);
end;
end;
end;
status;
end;
procedure display_nbr(nbr: integer);
var n: integer;
begin
if (nbr = 0) then exit;
if (top_pntr = 0) then exit;
normcolor;
window(2,6,7,23); clrscr;
window(9,6,18,23); clrscr;
window(20,6,23,23); clrscr;
window(25,6,29,23); clrscr;
curr_pntr := nbr;
for n := nbr - 4 to nbr + 13 do
begin
if (n > 0) AND (n <= top_pntr) then
begin
with checkins[n] do
begin
window(2,6,7,24);
gotoxy(1,n - nbr + 5);
if (list_nbr = 0)
then display_call(net_list[position]^)
else display_call(new_list[position]^);
window(9,6,18,24);
gotoxy(1,n - nbr + 5);
if (list_nbr = 0)
then write(net_list[position]^.name:10)
else write(new_list[position]^.name:10);
window(20,6,23,24);
gotoxy(1,n - nbr + 5);
if (list_nbr = 0)
then if (net_list[position]^.net_nbr > 0)
then write(net_list[position]^.net_nbr:4)
else write('----')
else write('----');
window(25,6,29,24);
display_log_time(n - nbr + 5,n);
end;
end;
end;
status;
end;
procedure top_of_roster;
begin
display_nbr(1);
end;
procedure end_of_roster;
begin
display_nbr(top_pntr);
end;
procedure re_display;
begin
normcolor;
window(2,6,7,23);
gotoxy(1,5);
DelLine;
window(9,6,18,23);
gotoxy(1,5);
DelLine;
window(20,6,23,23);
gotoxy(1,5);
DelLine;
window(25,6,29,23);
gotoxy(1,5);
DelLine;
window(1,1,80,25);
if (curr_pntr + 12 < top_pntr) then
display_checkin(curr_pntr + 13);
status;
end;
procedure check_old_mark(mark : integer);
var posit : integer;
begin
window(25,6,29,23);
if mark = 0 then exit;
posit := mark - curr_pntr;
if (posit > -5) AND (posit < 14) then
begin
gotoxy(1,5 + posit);
normcolor;
write(checkins[mark].hr_min);
end;
end;
procedure set_mark1;
begin
if curr_pntr = 0 then exit;
check_old_mark(mark1);
mark1 := curr_pntr;
gotoxy(3,5);
normcolor;
write(#31);
window(1,1,80,25);
status;
end;
procedure clr_mark1;
begin
if curr_pntr = 0 then exit;
check_old_mark(mark1);
mark1 := 0;
end;
procedure set_mark2;
begin
if curr_pntr = 0 then exit;
check_old_mark(mark2);
mark2 := curr_pntr;
gotoxy(3,5);
normcolor;
write(#30);
window(1,1,80,25);
status;
end;
procedure clr_mark2;
begin
if curr_pntr = 0 then exit;
check_old_mark(mark2);
mark2 := 0;
end;
procedure clr_mark;
begin
if curr_pntr = mark1 then clr_mark1;
if curr_pntr = mark2 then clr_mark2;
end;
procedure change_log_status;
var NuStatus : char;
begin
if curr_pntr = 0 then exit;
normcolor;
window(25,6,29,23);
gotoxy(3,5);
case Ord(checkins[curr_pntr].hr_min[3]) of
001 : NuStatus := '■';
254 : NuStatus := ':';
else NuStatus := chr(1);
end;
write(NuStatus);
checkins[curr_pntr].hr_min[3] := NuStatus;
gotoxy(3,5);
if (curr_pntr = mark1) then
write(#31);
if (curr_pntr = mark2) then
write(#30);
window(1,1,80,25);
status;
end;
procedure ModName;
begin
window(9,6,18,24);
Set_Confirm_On;
with checkins[curr_pntr] do
begin
if list_nbr = 0
then begin
sayget(1,5,'',net_list[position]^.name,_S,10,0);
readGETS;
go(net_list[position]^.recnbr);
Nbase._NAME := net_list[position]^.name;
end
else begin
sayget(1,5,'',new_list[position]^.name,_S,10,0);
readGETS;
go(new_list[position]^.recnbr);
Nbase._NAME := new_list[position]^.name;
end;
end;
replace;
window(20,6,23,24);
display_checkin(curr_pntr);
end;