1 |
// ***** 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 |
#include <vcl\vcl.h>
|
27 |
#pragma hdrstop
|
28 |
|
29 |
#include "ex2htmlu.h"
|
30 |
//---------------------------------------------------------------------------
|
31 |
#pragma link "StToHTML"
|
32 |
#pragma link "StBase"
|
33 |
#pragma resource "*.dfm"
|
34 |
TForm1 *Form1;
|
35 |
//---------------------------------------------------------------------------
|
36 |
__fastcall TForm1::TForm1(TComponent* Owner)
|
37 |
: TForm(Owner)
|
38 |
{
|
39 |
}
|
40 |
//---------------------------------------------------------------------------
|
41 |
void __fastcall TForm1::StFileToHTML1Progress(TObject *Sender, WORD Percent)
|
42 |
{
|
43 |
Label1->Caption = "Completed: " + IntToStr(Percent) + "%";
|
44 |
}
|
45 |
//---------------------------------------------------------------------------
|
46 |
void __fastcall TForm1::GetFileClick(TObject *Sender)
|
47 |
{
|
48 |
if (OpenDialog1->Execute()) {
|
49 |
if (Sender == SpeedButton1)
|
50 |
Edit1->Text = OpenDialog1->FileName;
|
51 |
else if (Sender == SpeedButton2)
|
52 |
Edit2->Text = OpenDialog1->FileName;
|
53 |
}
|
54 |
}
|
55 |
//---------------------------------------------------------------------------
|
56 |
void __fastcall TForm1::Button1Click(TObject *Sender)
|
57 |
{
|
58 |
if (! FileExists(Edit1->Text)) {
|
59 |
ShowMessage("Input file does not exist");
|
60 |
return;
|
61 |
}
|
62 |
|
63 |
StFileToHTML1->InFileName = Edit1->Text;
|
64 |
StFileToHTML1->OutFileName = Edit2->Text;
|
65 |
|
66 |
StFileToHTML1->Execute();
|
67 |
Label1->Caption = "Waiting";
|
68 |
ShowMessage("Done");
|
69 |
}
|
70 |
//--------------------------------------------------------------------------- |