/[projects]/dao/DelphiScanner/Components/tpsystools_4.04/examples/Delphi/EX2HTMLU.pas
ViewVC logotype

Annotation of /dao/DelphiScanner/Components/tpsystools_4.04/examples/Delphi/EX2HTMLU.pas

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2671 - (hide annotations) (download)
Tue Aug 25 18:15:15 2015 UTC (8 years, 10 months ago) by torben
File size: 2414 byte(s)
Added tpsystools component
1 torben 2671 (* ***** BEGIN LICENSE BLOCK *****
2     * Version: MPL 1.1
3     *
4     * The contents of this file are subject to the Mozilla Public License Version
5     * 1.1 (the "License"); you may not use this file except in compliance with
6     * the License. You may obtain a copy of the License at
7     * http://www.mozilla.org/MPL/
8     *
9     * Software distributed under the License is distributed on an "AS IS" basis,
10     * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11     * for the specific language governing rights and limitations under the
12     * License.
13     *
14     * The Original Code is TurboPower SysTools
15     *
16     * The Initial Developer of the Original Code is
17     * TurboPower Software
18     *
19     * Portions created by the Initial Developer are Copyright (C) 1996-2002
20     * the Initial Developer. All Rights Reserved.
21     *
22     * Contributor(s):
23     *
24     * ***** END LICENSE BLOCK ***** *)
25    
26     unit ex2htmlu;
27    
28     interface
29    
30     uses
31     Windows, Messages, SysUtils, Classes, Graphics, Controls,
32     Forms, Dialogs, StdCtrls, Buttons,
33    
34     StBase, StToHTML;
35    
36     type
37     TForm1 = class(TForm)
38     Button1: TButton;
39     StFileToHTML1: TStFileToHTML;
40     Edit1: TEdit;
41     Edit2: TEdit;
42     Label1: TLabel;
43     Label2: TLabel;
44     SpeedButton1: TSpeedButton;
45     SpeedButton2: TSpeedButton;
46     Label3: TLabel;
47     OpenDialog1: TOpenDialog;
48     procedure Button1Click(Sender: TObject);
49     procedure GetFileClick(Sender: TObject);
50     procedure StFileToHTML1Progress(Sender: TObject; Percent: Word);
51     private
52     { Private declarations }
53     public
54     { Public declarations }
55     end;
56    
57     var
58     Form1: TForm1;
59    
60     implementation
61    
62     {$R *.DFM}
63    
64     procedure TForm1.Button1Click(Sender: TObject);
65     begin
66     if (not FileExists(Edit1.Text)) then begin
67     ShowMessage('Input file does not exist');
68     Exit;
69     end;
70    
71     StFileToHTML1.InFileName := Edit1.Text;
72     StFileToHTML1.OutFileName := Edit2.Text;
73    
74     StFileToHTML1.Execute;
75     Label1.Caption := 'Waiting';
76     ShowMessage('Done');
77     end;
78    
79    
80     procedure TForm1.GetFileClick(Sender: TObject);
81     begin
82     if (OpenDialog1.Execute) then begin
83     if (Sender = SpeedButton1) then
84     Edit1.Text := OpenDialog1.FileName
85     else if (Sender = SpeedButton2) then
86     Edit2.Text := OpenDialog1.FileName;
87     end;
88     end;
89    
90     procedure TForm1.StFileToHTML1Progress(Sender: TObject; Percent: Word);
91     begin
92     Label1.Caption := 'Completed: ' + IntToStr(Percent) + '%';
93     end;
94    
95    
96     end.

  ViewVC Help
Powered by ViewVC 1.1.20