home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / mailpro / ss.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1988-08-23  |  3.4 KB  |  97 lines

  1. unit SS;
  2.  
  3. interface
  4. uses Crt, Def, ColorDef, FastWr, LPaU, ColorIU, CE, RE, DL, DrawSqar;
  5. procedure ScreenDisplay(var BeginLine, EndLine: longint);
  6.  
  7. implementation
  8.  
  9. procedure ScreenDisplay;
  10. var I,
  11.     Row:      integer;
  12.  
  13. (* this proc. Displays operations menu  *)
  14. (* scrnmenu.mp *)
  15.  
  16.     procedure ScreenMenu;
  17.     var PageBottom,
  18.         I:                 integer;
  19.         TempStr,
  20.         X:                 string;
  21.     begin
  22.     PageBottom := 16;
  23.  
  24.     TempStr := 'Addressee';
  25.     if ProgramUse = 2 then TempStr := 'Company';
  26.     FastWrite( LPad(TempStr,29), PageBottom, 6, Headings.Attr);
  27.     case ShowMode of
  28.         1:  begin
  29.             FastWrite( LPad('Phone #1',12), PageBottom, 36, Headings.Attr);
  30.             FastWrite( LPad('Phone #2',12), PageBottom, 49, Headings.Attr);
  31.             FastWrite( LPad('Division',9),  PageBottom, 62, Headings.Attr);
  32.             FastWrite( LPad('Sub-dvsn',9),  PageBottom, 72, Headings.Attr);
  33.             end;
  34.         2:  begin
  35.             FastWrite( LPad('Auxiliary address',30), PageBottom,36,
  36.                       Headings.Attr);
  37.             FastWrite( LPad('Phone #1',12), PageBottom, 67, Headings.Attr);
  38.             end;
  39.         3:  begin
  40.             FastWrite( LPad('Mailing address',24), PageBottom,36,
  41.                       Headings.Attr);
  42.             FastWrite( LPad('City',11), PageBottom, 61, Headings.Attr);
  43.             FastWrite( 'St', PageBottom, 73, Headings.Attr);
  44.             FastWrite( LPad('Zip',5), PageBottom, 76, Headings.Attr);
  45.             end;
  46.         4:  begin
  47.             FastWrite( LPad('Title',15),    PageBottom, 36, Headings.Attr);
  48.             if ProgramUse = 2 then
  49.                FastWrite( LPad('Addressee',16),  PageBottom, 52, Headings.Attr)
  50.               else
  51.                FastWrite( LPad('Company',16),  PageBottom, 52, Headings.Attr);
  52.             FastWrite( LPad('Phone #1',12), PageBottom, 69, Headings.Attr);
  53.             end;
  54.         end;
  55.     DrawSquare( 1, PageBottom+1, 80, PageBottom+7, (Menus.Attr xor $0008),
  56.                  true);
  57.     FastWrite( ' PG UP        HOME                     F1 = SHIFT UP         F2 = SHIFT DN',
  58.               PageBottom+2, 2, Menus.Attr);
  59.     FastWrite( ' PG DN        END                      F3 = FILE PRINT       F4 = EDIT',
  60.               PageBottom+3, 2, Menus.Attr);
  61.     FastWrite( ' DELETE       MULTIPLE PRINT (^P)      F5 = SYSTEM SETUP     F6 = PHONE FIND',
  62.               PageBottom+4, 2, Menus.Attr);
  63.     FastWrite( ' INSERT       RETURN ADDRESS (^R)      F7 = PRINT LINE       F8 = PRINT FORM',
  64.               PageBottom+5, 2, Menus.Attr);
  65.     FastWrite( ' ESC                                   F9 = BUILD LIST       F10= FIND NAME',
  66.               PageBottom+6, 2, Menus.Attr);
  67.     ColorIn( 1, 24, 80, 25, Msgs.Attr);
  68.     FastWrite('Printer  ',24,1,Msgs.Attr);
  69.     FastWrite('Entries  ',25,1,Msgs.Attr);
  70.     FastWrite('Sorted   ',25,41,Msgs.Attr);
  71.     FastWrite('Drive    ',25,61,Msgs.Attr);
  72.  
  73.     FastWrite( Printers[ActivePrinter], 24, 10, (Msgs.Attr xor $0008));
  74.     str(FileTop,X);
  75.     FastWrite( X, 25, 10, (Msgs.Attr xor $0008));
  76.     str(SortTop,X);
  77.     FastWrite( X, 25, 50, (Msgs.Attr xor $0008));
  78.     FastWrite( DataDrive, 25, 70, (Msgs.Attr xor $0008));
  79.  
  80.     end;
  81.  
  82. begin
  83. clrscr;
  84. CheckEnds(BeginLine,EndLine);
  85. Row := 0;
  86. for I := BeginLine to EndLine do
  87.     begin
  88.     GetRec(Entry,I);
  89.     inc(Row);
  90.     { writeln(Row); }
  91.     DisplayLine(Entry, Row, Displays.Attr);
  92.     end;
  93. ScreenMenu;
  94. end;
  95.  
  96. end.
  97.