home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 September / Chip_2002-09_cd1.bin / zkuste / delphi / navody / JBOOSTER.ZIP / Source / jBooster.dpr < prev    next >
Text File  |  2002-06-09  |  2KB  |  57 lines

  1. (*************************************************************************)
  2. (*                                jBooster                               *)
  3. (*                       Delphi-5 or Delphi-6 compatible                 *)
  4. (*                        (c) pulsar@mail.primorye.ru                    *)
  5. (*************************************************************************)
  6.  Program jBooster;
  7.  {$D '(c) pulsar@mail.primorye.ru'}
  8.  {$J+,H+,A+,B-,I-}
  9.  
  10.  uses
  11.   Forms,
  12.   Dialogs,
  13.   Support in 'Support.pas',
  14.   MainForm in 'MainForm.pas' {FormMain},
  15.   ViewerForm in 'ViewerForm.pas' {FormViewer};
  16.  
  17. {$R *.RES}
  18.  
  19.  Var
  20.    { log-file }
  21.      LogFile : Text;
  22.  
  23.  procedure PutLog (const Mssg: string; Pfx: TMsgDlgType);
  24.  begin
  25.      Writeln (LogFile, Mssg);
  26.      Flush (LogFile);
  27.  end; { PutLog }
  28.  
  29.  Begin
  30.   Application.Initialize;
  31. { autorun }
  32.   if RunAuto then begin
  33.      if OpenText (LogFile, ExePath + LogName, true) then begin
  34.         Report := PutLog;
  35.       { load }
  36.         if LoadParameters (nil, nil) then begin
  37.            if Images.Scan then begin
  38.             { test }
  39.               if isValid then begin
  40.                  if Images.Run and AutoSave then SaveParameters (nil, nil);
  41.               end { if }
  42.               else Error (IniFile, 'There is nothing to run');
  43.            end; { if }
  44.         end; { if }
  45.         Close (LogFile);
  46.         ExitCode := Errors;
  47.      end { if }
  48.      else ExitCode := MaxInt;
  49.   end { if }
  50. { application mode }
  51.   else begin
  52.      Application.CreateForm(TFormMain, FormMain);
  53.      Application.CreateForm(TFormViewer, FormViewer);
  54.      Application.Run;
  55.   end; { else }
  56.  End.
  57.