Subversion Repositories oidplus

Rev

Rev 737 | Rev 739 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 737 Rev 738
Line 22... Line 22...
22
  DESCEDIT_PADDING       = 3;
22
  DESCEDIT_PADDING       = 3;
23
  ACTIONMENU_SIZE        = 5;
23
  ACTIONMENU_SIZE        = 5;
24
  MAINMENU_WIDTH         = 15;
24
  MAINMENU_WIDTH         = 15;
25
  MAINMENU_HEIGHT        = 3;
25
  MAINMENU_HEIGHT        = 3;
26
  MAINMENU_ALLOW_ESC     = false;
26
  MAINMENU_ALLOW_ESC     = false;
-
 
27
  TITLEBAR_LEFT_TEXT     = 'OIDplus';
27
 
28
 
28
procedure _WriteOidFile(filename: string; oid: POid);
29
procedure _WriteOidFile(filename: string; oid: POid);
29
begin
30
begin
30
  DrawStatusBar('Write file ' + filename + '...');
31
  DrawStatusBar('Write file ' + filename + '...');
31
  WriteOidFile(filename, oid);
32
  WriteOidFile(filename, oid);
Line 459... Line 460...
459
end;
460
end;
460
 
461
 
461
procedure _DrawOidTitleBar(filename: string; oid: POID);
462
procedure _DrawOidTitleBar(filename: string; oid: POID);
462
begin
463
begin
463
  if oid^.DotNotation = '' then
464
  if oid^.DotNotation = '' then
464
    DrawTitleBar('OID ROOT')
465
    DrawTitleBar('OID ROOT', TITLEBAR_LEFT_TEXT, filename)
465
  else
466
  else
466
    DrawTitleBar('OID ' + oid^.DotNotation);
467
    DrawTitleBar('OID ' + oid^.DotNotation, TITLEBAR_LEFT_TEXT, filename);
467
 
-
 
468
  (* Put loaded filename into the title bar *)
-
 
469
  GotoXY(ScreenWidth-Length(filename)+1,1);
-
 
470
  TextBackground(White);
-
 
471
  TextColor(Black);
-
 
472
  WriteLn(filename);
-
 
473
  TextBackground(Black);
-
 
474
  TextColor(White);
-
 
475
end;
468
end;
476
 
469
 
477
procedure DisplayOIDFile(filename: string);
470
procedure DisplayOIDFile(filename: string);
478
var
471
var
479
  isRoot: boolean;
472
  isRoot: boolean;
Line 676... Line 669...
676
procedure OP_ManageOIDs;
669
procedure OP_ManageOIDs;
677
var
670
var
678
  initFile: string;
671
  initFile: string;
679
begin
672
begin
680
  ClrScr;
673
  ClrScr;
681
  DrawTitleBar('Manage Object Identifiers');
674
  DrawTitleBar('Manage Object Identifiers', TITLEBAR_LEFT_TEXT, '');
682
  DrawStatusBar('');
675
  DrawStatusBar('Loading data... please wait...');
683
 
676
 
684
  initFile := ZeroPad(0, 8) + '.OID';
677
  initFile := ZeroPad(0, 8) + '.OID';
685
  if not FileExists(initFile) then
678
  if not FileExists(initFile) then
686
  begin
679
  begin
687
    CreateInitOIDFile(initFile);
680
    CreateInitOIDFile(initFile);
Line 690... Line 683...
690
end;
683
end;
691
 
684
 
692
procedure OP_ManageRAs;
685
procedure OP_ManageRAs;
693
begin
686
begin
694
  ClrScr;
687
  ClrScr;
695
  DrawTitleBar('Manage Registration Authorities');
688
  DrawTitleBar('Manage Registration Authorities', TITLEBAR_LEFT_TEXT, '');
696
  DrawStatusBar('');
689
  DrawStatusBar('');
697
 
690
 
698
  (* TODO: Implement "Manage RAs" feature *)
691
  (* TODO: Implement "Manage RAs" feature *)
699
end;
692
end;
700
 
693
 
Line 710... Line 703...
710
  menuIdOID, menuIdRA, menuIdExit: integer;
703
  menuIdOID, menuIdRA, menuIdExit: integer;
711
begin
704
begin
712
  repeat
705
  repeat
713
    ClrScr;
706
    ClrScr;
714
 
707
 
715
    DrawTitleBar('Welcome to OIDplus for DOS');
708
    DrawTitleBar('Welcome to OIDplus for DOS', '', '');
716
    DrawStatusBar(DEFAULT_STATUSBAR);
709
    DrawStatusBar(DEFAULT_STATUSBAR);
717
    GoToXY(ScreenWidth-Length(VERSIONINFO), ScreenHeight-1);
710
    GoToXY(ScreenWidth-Length(VERSIONINFO), ScreenHeight-1);
718
    Write(VERSIONINFO);
711
    Write(VERSIONINFO);
719
 
712
 
720
    CreateList(menu);
713
    CreateList(menu);