home *** CD-ROM | disk | FTP | other *** search
/ Taifun Collection / Taifun_Collection_Vol_1.iso / richter / 8530 / 8530.mhs / RICHTER.DTP / ETIKETT / INSTALL.DAT / ETIKETT.PAS < prev    next >
Pascal/Delphi Source File  |  1992-12-05  |  5KB  |  187 lines

  1.  
  2. {$I SHARE.INC}
  3.  
  4. uses crt,Dos,dbf4,extend,vidpop,SayGet4,SysInfo,Pick,
  5.      UHilfe,UAdress,UEtikett,Edit,Dialog,
  6.      TimeDate,Sounder,UCalc
  7.       {$IFDEF SWARE} ,Share {$ENDIF};
  8.  
  9. {$M 64000,0,650000}
  10. {$F+}
  11.  
  12. Var Ende : Boolean;
  13.     Farbe: Boolean;
  14.  
  15.  
  16. PROCEDURE Reset_Printer;
  17. var address: integer absolute $0040:$0008;
  18.              portno,delay : integer;
  19. begin
  20.     portno := address + 2;
  21.     port[portno] := 232;
  22.     for delay := 1 to 2000 do {nothing};
  23.         port[portno] := 236;
  24. end;
  25.  
  26. Procedure Notiz;
  27. begin
  28.   PushWindow(1,1,80,25);
  29.   PopLib(1,'Notiz');
  30.   Set_EditorWindow_to(39,7,74,21,0,'');
  31.   EditText('NOTIZ.TXT NOSTATUS');
  32.   PopWindow;
  33. end;
  34.  
  35.  
  36. Procedure Zeige_Info;
  37. Var InfoDat : Text;
  38.     Z : String[36];
  39.     I : Byte;
  40. begin
  41.   Assign(InfoDat,'Info.dat');
  42.   {$I-} Reset(InfoDat); {$I+}
  43.   If IOResult = 0 then
  44.   begin
  45.     PushColors;
  46.     If IsColor then Set_Color_to(white,red,red,lightgray)
  47.     else Set_Color_to(black,lightgray,lightgray,black);
  48.     PopLib(1,'Info');
  49.     For I := 1 to 10 do
  50.     begin
  51.       ReadLn(InfoDat,Z);
  52.       AT(22, 6+I,Z);
  53.       If Eof(InfoDat) then I := 10;
  54.     end;
  55.     Close(InfoDat);
  56.     GetIntVec($1C,Int1CSave);
  57.     SetIntVec($1C,New1CInt);
  58.     StartSound(@Canon,99,1);
  59.     repeat
  60.     until KeyPressed;
  61.     SetIntVec($1C,Int1CSave);
  62.     NoSound;
  63.     Wait('');
  64.     PopColors;
  65.   end;
  66. end;
  67.  
  68.  
  69. Procedure FKeys;
  70. Var Name : String;
  71. begin
  72.   PushWindow(1,1,80,25);
  73.   PushMenu;
  74.   PushColors;
  75.   case MenuKey of
  76.     F1 : Zeige_Hilfe(10,4,70,18,'HMENU');
  77.     F2 : begin
  78.            Set_EditorWindow_to(1,1,80,24,1+64,'FM-Software Texteditor');
  79.            EditText('*,*');
  80.          end;
  81.     F3 : begin
  82.            SelectAlias('Adress');
  83.            Adress_menu;
  84.            SelectAlias('Etikett');
  85.          end;
  86.     F4 : Adress_Etikett;
  87.     F5 : begin
  88.            Set_PickWindow_To(48,4,73,20,2+128,' INHALTSVERZEICHNIS ');
  89.            Name := PickFile('*.*');
  90.          end;
  91.     F6 : Zeige_Info;
  92.     F7 : begin
  93.            Set_Color_to(black,cyan,cyan,black);
  94.            Calculator(54,4);
  95.          end;
  96.     F8 : EtikettenListe;
  97.     F9 : begin
  98.            Set_Color_to(Black,cyan,cyan,black);
  99.            Name := SelectDate(SystemDate);
  100.          end;
  101.    F10 : Notiz;
  102.   end;
  103.   PopColors;
  104.   PopMenu;
  105.   PopWindow;
  106.   Set_Cursor_off;
  107.   MenuKey := ' ';
  108. end;
  109.  
  110. begin
  111.   {$IFDEF SWARE}
  112.     Shareware(2,10,1);
  113.   {$ENDIF}
  114.   Read_Drucker;
  115.   Set_Cursor_off;;
  116.   Set_Country_to(Germany);
  117.   Set_Escape_on;
  118.   Set_Status_Bottom;
  119.   Set_ScoreBoard_to(25);
  120.   Set_AutoHalt_off;
  121.   Set_Deleted_ON;
  122.   FARBE := IsColor;
  123.   if FARBE then
  124.   begin
  125.     Set_Calendar_to(45,4,black,lightgray,1,'KALENDER');
  126.     OpenLibrary(1,'Color.Lib',true);
  127.     Set_Pick_Color_to(black,cyan,black,lightgray);
  128.     Set_Editor_Color_to(Frame,     black,cyan);
  129.     Set_Editor_Color_to(Status,    black,lightgray);
  130.     Set_Editor_Color_to(HelpFrame,    black,lightgray);
  131.     Set_Editor_Color_to(HelpText,    black,lightgray);
  132.     Set_Editor_Color_to(NormalText,black,cyan);
  133.     Set_Menu_Color_to(lightgray,black,black,lightgray);
  134.     Set_Tag_Color_to(black,cyan,black,lightgray);
  135.     Set_Color_to(black,lightgray,lightgray,black);
  136.     Set_Dialog_Color_to(black,lightgray,black,lightgray);
  137.   end else
  138.   begin
  139.     Set_BW_on;
  140.     Set_Menu_Color_to(lightgray,black,black,lightgray);
  141.     Set_Dialog_Color_to(black,lightgray,black,lightgray);
  142.     Set_Color_to(black,lightgray,lightgray,black);
  143.     OpenLibrary(1,'Mono.Lib',true);
  144.   end;
  145.   Ende := false;
  146.   Open_Etikett;
  147.   PopLib(1,'HMenu');
  148.   repeat
  149.     popLib(1,'HMENU');
  150.     clearEOL(1,25);
  151.     AT(1,25,' FM-ETIKETT 1.0 '+#179+'     Copyright 1991   bei   FM-Software, Mönchengladbach  ');
  152.     Set_MenuFKeys_to(F1+F2+F3+F4+F5+F6+F7+F8+F9+F10,@FKeys);
  153.     popLib(1,'menu1');
  154.     Case MenuChoice of
  155.       1 : begin
  156.             ETIKETT_DRUCKEN;
  157.             MenuKey := ' ';
  158.           end;
  159.       2 : Etikett_Neu;
  160.       3 : begin
  161.             SInfo;
  162.           end;
  163.       4 : begin
  164.             PushWindow(1,1,80,25);
  165.             PopLib(1,'HandB');
  166.             Set_EditorWindow_to(5,4,75,20,0+64,'');
  167.             EditText('HANDBUCH.TXT NOSTATUS');
  168.             PopWindow;
  169.           end;
  170.       5 : begin
  171.             Get_Drucker;
  172.           end;
  173.     end;
  174.     Set_Cursor_off;
  175.     If (MenuChoice = 6) OR (MenuKey = #27) then
  176.       Ende := DialogBox('Programm beenden (J/N) ? ','JN'#13#27) = 'J';
  177.   until Ende;
  178.   Set_Cursor_on;
  179.   Set_Color_to(lightgray,black,black,lightgray);
  180.   clrscr;
  181.   {$IFDEF SWARE}
  182.     Shareware(0,0,0);
  183.   {$ENDIF}
  184.   gotoxy(3,1); Writeln(' Bis bald ... ');
  185.   writeln;
  186. end.
  187.