1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-24 18:22:25 -05:00

Half-way making the wrapper apps do multiple files at once.

This commit is contained in:
Raymond 2010-09-06 00:00:21 +02:00
parent 0e73c91ecc
commit 98fac58346
6 changed files with 321 additions and 90 deletions

View File

@ -2185,6 +2185,15 @@ object frmMain: TfrmMain
inline SynRightGutterPartList1: TSynRightGutterPartList inline SynRightGutterPartList1: TSynRightGutterPartList
end end
end end
object btnAdvanced: TButton
Left = 544
Height = 25
Top = 5
Width = 80
Caption = 'Advanced'
OnClick = btnAdvancedClick
TabOrder = 2
end
end end
object Splitter1: TSplitter object Splitter1: TSplitter
Left = 335 Left = 335

View File

@ -6,7 +6,7 @@ interface
uses uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls, Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
StdCtrls, SynEdit, SynHighlighterPas; StdCtrls, SynEdit, SynHighlighterPas,wrapfiles;
type type
@ -14,6 +14,7 @@ type
TfrmMain = class(TForm) TfrmMain = class(TForm)
btnGo: TButton; btnGo: TButton;
btnAdvanced: TButton;
pnlMain: TPanel; pnlMain: TPanel;
Splitter1: TSplitter; Splitter1: TSplitter;
Splitter2: TSplitter; Splitter2: TSplitter;
@ -21,13 +22,14 @@ type
eOut: TSynEdit; eOut: TSynEdit;
eDebug: TSynEdit; eDebug: TSynEdit;
PasHL: TSynPasSyn; PasHL: TSynPasSyn;
procedure btnAdvancedClick(Sender: TObject);
procedure btnGoClick(Sender: TObject); procedure btnGoClick(Sender: TObject);
private private
{ private declarations } { private declarations }
public public
{ public declarations } { public declarations }
end; end;
procedure ConvertRT(Input, Dbg, Output : TStrings);
var var
frmMain: TfrmMain; frmMain: TfrmMain;
@ -40,14 +42,13 @@ uses
{ TfrmMain } { TfrmMain }
procedure TfrmMain.btnGoClick(Sender: TObject); procedure ConvertRT(Input, Dbg, Output : TStrings);
procedure Debug(s: string); overload; procedure Debug(s: string); overload;
begin begin
if (Trim(eOut.Text) <> '') then if (Trim(Output.Text) <> '') then
eDebug.Lines.Append(s) Dbg.Append(s)
else else
eDebug.Text := s; Dbg.Text := s;
end; end;
procedure Debug(v: Variant); overload; procedure Debug(v: Variant); overload;
@ -57,10 +58,10 @@ procedure TfrmMain.btnGoClick(Sender: TObject);
procedure Write(s: string); overload; procedure Write(s: string); overload;
begin begin
if (Trim(eOut.Text) <> '') then if (Trim(Output.Text) <> '') then
eOut.Text := eOut.Text + s Output.Text := Output.Text + s
else else
eOut.Text := s; Output.Text := s;
end; end;
procedure Write(v: Variant); overload; procedure Write(v: Variant); overload;
@ -81,12 +82,12 @@ begin
m := TMemoryStream.Create; m := TMemoryStream.Create;
try try
eOut.BeginUpdate; Output.BeginUpdate;
eOut.ClearAll; Output.Clear;
eDebug.BeginUpdate; Dbg.BeginUpdate;
eDebug.ClearAll; Dbg.Clear;
eIn.Lines.SaveToStream(m); Input.SaveToStream(m);
try try
p.Run(m); p.Run(m);
@ -158,11 +159,21 @@ begin
m.Free; m.Free;
p.Free; p.Free;
eOut.EndUpdate; Output.EndUpdate;
eDebug.EndUpdate; Dbg.EndUpdate;
end; end;
Debug('Done :)'); Debug('Done :)');
end; end;
procedure TfrmMain.btnGoClick(Sender: TObject);
begin
ConvertRT(eIn.Lines,eDebug.Lines,eOut.Lines);
end;
procedure TfrmMain.btnAdvancedClick(Sender: TObject);
begin
WrapFilesForm.ShowModal;
end;
end. end.

View File

@ -35,12 +35,12 @@
<PackageName Value="LCL"/> <PackageName Value="LCL"/>
</Item2> </Item2>
</RequiredPackages> </RequiredPackages>
<Units Count="15"> <Units Count="20">
<Unit0> <Unit0>
<Filename Value="ruwa.lpr"/> <Filename Value="ruwa.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="ruwa"/> <UnitName Value="ruwa"/>
<UsageCount Value="20"/> <UsageCount Value="22"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
<Filename Value="main.pas"/> <Filename Value="main.pas"/>
@ -50,9 +50,9 @@
<UnitName Value="main"/> <UnitName Value="main"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="115"/> <TopLine Value="7"/>
<CursorPos X="41" Y="150"/> <CursorPos X="24" Y="28"/>
<UsageCount Value="20"/> <UsageCount Value="22"/>
<Loaded Value="True"/> <Loaded Value="True"/>
<LoadedDesigner Value="True"/> <LoadedDesigner Value="True"/>
</Unit1> </Unit1>
@ -60,36 +60,36 @@
<Filename Value="..\..\Units\Misc\v_MiscFunctions.pas"/> <Filename Value="..\..\Units\Misc\v_MiscFunctions.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="v_MiscFunctions"/> <UnitName Value="v_MiscFunctions"/>
<UsageCount Value="20"/> <UsageCount Value="22"/>
</Unit2> </Unit2>
<Unit3> <Unit3>
<Filename Value="..\..\Units\Misc\ValistusDefines.inc"/> <Filename Value="..\..\Units\Misc\ValistusDefines.inc"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UsageCount Value="20"/> <UsageCount Value="22"/>
</Unit3> </Unit3>
<Unit4> <Unit4>
<Filename Value="..\..\Units\Misc\CastaliaPasLex.pas"/> <Filename Value="..\..\Units\Misc\CastaliaPasLex.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="CastaliaPasLex"/> <UnitName Value="CastaliaPasLex"/>
<UsageCount Value="20"/> <UsageCount Value="22"/>
</Unit4> </Unit4>
<Unit5> <Unit5>
<Filename Value="..\..\Units\Misc\CastaliaPasLexTypes.pas"/> <Filename Value="..\..\Units\Misc\CastaliaPasLexTypes.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="CastaliaPasLexTypes"/> <UnitName Value="CastaliaPasLexTypes"/>
<UsageCount Value="20"/> <UsageCount Value="22"/>
</Unit5> </Unit5>
<Unit6> <Unit6>
<Filename Value="..\..\Units\Misc\CastaliaSimplePasPar.pas"/> <Filename Value="..\..\Units\Misc\CastaliaSimplePasPar.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="CastaliaSimplePasPar"/> <UnitName Value="CastaliaSimplePasPar"/>
<UsageCount Value="20"/> <UsageCount Value="22"/>
</Unit6> </Unit6>
<Unit7> <Unit7>
<Filename Value="..\..\Units\Misc\CastaliaSimplePasParTypes.pas"/> <Filename Value="..\..\Units\Misc\CastaliaSimplePasParTypes.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="CastaliaSimplePasParTypes"/> <UnitName Value="CastaliaSimplePasParTypes"/>
<UsageCount Value="20"/> <UsageCount Value="22"/>
</Unit7> </Unit7>
<Unit8> <Unit8>
<Filename Value="..\..\Units\Misc\v_autocompleteform.pas"/> <Filename Value="..\..\Units\Misc\v_autocompleteform.pas"/>
@ -100,7 +100,7 @@
<Filename Value="..\..\Units\Misc\v_Constants.pas"/> <Filename Value="..\..\Units\Misc\v_Constants.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="v_Constants"/> <UnitName Value="v_Constants"/>
<UsageCount Value="20"/> <UsageCount Value="22"/>
</Unit9> </Unit9>
<Unit10> <Unit10>
<Filename Value="..\..\Units\Misc\v_ideCodeInsight.pas"/> <Filename Value="..\..\Units\Misc\v_ideCodeInsight.pas"/>
@ -114,16 +114,15 @@
<Filename Value="..\..\Units\Misc\v_ideCodeParser.pas"/> <Filename Value="..\..\Units\Misc\v_ideCodeParser.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="v_ideCodeParser"/> <UnitName Value="v_ideCodeParser"/>
<IsVisibleTab Value="True"/> <EditorIndex Value="6"/>
<EditorIndex Value="1"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<CursorPos X="8" Y="8"/> <CursorPos X="8" Y="8"/>
<UsageCount Value="20"/> <UsageCount Value="22"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit11> </Unit11>
<Unit12> <Unit12>
<Filename Value="..\..\..\FPC\Source\rtl\win\sysutils.pp"/> <Filename Value="C:\FPC\Source\rtl\win\sysutils.pp"/>
<UnitName Value="sysutils"/> <UnitName Value="sysutils"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="567"/> <TopLine Value="567"/>
@ -131,7 +130,7 @@
<UsageCount Value="10"/> <UsageCount Value="10"/>
</Unit12> </Unit12>
<Unit13> <Unit13>
<Filename Value="..\..\..\LazSVN\components\synedit\synedit.pp"/> <Filename Value="C:\LazSVN\components\synedit\synedit.pp"/>
<UnitName Value="SynEdit"/> <UnitName Value="SynEdit"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="6433"/> <TopLine Value="6433"/>
@ -139,131 +138,187 @@
<UsageCount Value="10"/> <UsageCount Value="10"/>
</Unit13> </Unit13>
<Unit14> <Unit14>
<Filename Value="..\..\..\FPC\Source\rtl\win32\system.pp"/> <Filename Value="C:\FPC\Source\rtl\win32\system.pp"/>
<UnitName Value="System"/> <UnitName Value="System"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="17"/> <TopLine Value="17"/>
<CursorPos X="2" Y="35"/> <CursorPos X="2" Y="35"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
</Unit14> </Unit14>
<Unit15>
<Filename Value="wrapfiles.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="WrapFilesForm"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="wrapfiles"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<WindowIndex Value="0"/>
<TopLine Value="64"/>
<CursorPos X="40" Y="80"/>
<UsageCount Value="22"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
</Unit15>
<Unit16>
<Filename Value="C:\lazarus\lcl\fileutil.pas"/>
<UnitName Value="FileUtil"/>
<EditorIndex Value="4"/>
<WindowIndex Value="0"/>
<TopLine Value="23"/>
<CursorPos X="10" Y="49"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit16>
<Unit17>
<Filename Value="C:\lazarus\lcl\include\fileutil.inc"/>
<EditorIndex Value="5"/>
<WindowIndex Value="0"/>
<TopLine Value="379"/>
<CursorPos X="3" Y="391"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit17>
<Unit18>
<Filename Value="C:\FPC\FPCCheckout\rtl\objpas\classes\classesh.inc"/>
<EditorIndex Value="2"/>
<WindowIndex Value="0"/>
<TopLine Value="573"/>
<CursorPos X="15" Y="599"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit18>
<Unit19>
<Filename Value="C:\FPC\FPCCheckout\rtl\objpas\classes\stringl.inc"/>
<EditorIndex Value="3"/>
<WindowIndex Value="0"/>
<TopLine Value="592"/>
<CursorPos X="3" Y="597"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit19>
</Units> </Units>
<JumpHistory Count="29" HistoryIndex="28"> <JumpHistory Count="30" HistoryIndex="29">
<Position1> <Position1>
<Filename Value="main.pas"/> <Filename Value="main.pas"/>
<Caret Line="76" Column="45" TopLine="53"/> <Caret Line="147" Column="18" TopLine="125"/>
</Position1> </Position1>
<Position2> <Position2>
<Filename Value="..\..\Units\Misc\v_ideCodeParser.pas"/> <Filename Value="main.pas"/>
<Caret Line="125" Column="24" TopLine="103"/> <Caret Line="150" Column="41" TopLine="115"/>
</Position2> </Position2>
<Position3> <Position3>
<Filename Value="..\..\Units\Misc\v_ideCodeParser.pas"/> <Filename Value="main.pas"/>
<Caret Line="864" Column="30" TopLine="846"/> <Caret Line="152" Column="41" TopLine="133"/>
</Position3> </Position3>
<Position4> <Position4>
<Filename Value="..\..\Units\Misc\v_ideCodeParser.pas"/> <Filename Value="main.pas"/>
<Caret Line="892" Column="26" TopLine="863"/> <Caret Line="9" Column="49" TopLine="7"/>
</Position4> </Position4>
<Position5> <Position5>
<Filename Value="..\..\Units\Misc\v_ideCodeParser.pas"/> <Filename Value="wrapfiles.pas"/>
<Caret Line="1193" Column="133" TopLine="1175"/> <Caret Line="15" Column="72" TopLine="1"/>
</Position5> </Position5>
<Position6> <Position6>
<Filename Value="..\..\Units\Misc\v_ideCodeParser.pas"/> <Filename Value="wrapfiles.pas"/>
<Caret Line="1422" Column="28" TopLine="1404"/> <Caret Line="19" Column="72" TopLine="1"/>
</Position6> </Position6>
<Position7> <Position7>
<Filename Value="..\..\Units\Misc\v_ideCodeParser.pas"/> <Filename Value="wrapfiles.pas"/>
<Caret Line="1429" Column="114" TopLine="1404"/> <Caret Line="20" Column="72" TopLine="1"/>
</Position7> </Position7>
<Position8> <Position8>
<Filename Value="..\..\Units\Misc\v_ideCodeParser.pas"/> <Filename Value="wrapfiles.pas"/>
<Caret Line="1441" Column="36" TopLine="1424"/> <Caret Line="22" Column="72" TopLine="3"/>
</Position8> </Position8>
<Position9> <Position9>
<Filename Value="main.pas"/> <Filename Value="wrapfiles.pas"/>
<Caret Line="98" Column="24" TopLine="69"/> <Caret Line="43" Column="1" TopLine="25"/>
</Position9> </Position9>
<Position10> <Position10>
<Filename Value="main.pas"/> <Filename Value="wrapfiles.pas"/>
<Caret Line="80" Column="101" TopLine="63"/> <Caret Line="44" Column="1" TopLine="26"/>
</Position10> </Position10>
<Position11> <Position11>
<Filename Value="main.pas"/> <Filename Value="wrapfiles.pas"/>
<Caret Line="60" Column="12" TopLine="52"/> <Caret Line="42" Column="1" TopLine="28"/>
</Position11> </Position11>
<Position12> <Position12>
<Filename Value="..\..\Units\Misc\v_ideCodeParser.pas"/> <Filename Value="wrapfiles.pas"/>
<Caret Line="42" Column="89" TopLine="33"/> <Caret Line="41" Column="1" TopLine="27"/>
</Position12> </Position12>
<Position13> <Position13>
<Filename Value="main.pas"/> <Filename Value="wrapfiles.pas"/>
<Caret Line="83" Column="31" TopLine="63"/> <Caret Line="43" Column="1" TopLine="29"/>
</Position13> </Position13>
<Position14> <Position14>
<Filename Value="..\..\Units\Misc\v_ideCodeParser.pas"/> <Filename Value="wrapfiles.pas"/>
<Caret Line="43" Column="33" TopLine="25"/> <Caret Line="44" Column="1" TopLine="30"/>
</Position14> </Position14>
<Position15> <Position15>
<Filename Value="..\..\Units\Misc\v_ideCodeParser.pas"/> <Filename Value="wrapfiles.pas"/>
<Caret Line="379" Column="46" TopLine="361"/> <Caret Line="46" Column="1" TopLine="32"/>
</Position15> </Position15>
<Position16> <Position16>
<Filename Value="..\..\Units\Misc\v_ideCodeParser.pas"/> <Filename Value="wrapfiles.pas"/>
<Caret Line="656" Column="56" TopLine="638"/> <Caret Line="51" Column="15" TopLine="35"/>
</Position16> </Position16>
<Position17> <Position17>
<Filename Value="..\..\Units\Misc\v_ideCodeParser.pas"/> <Filename Value="wrapfiles.pas"/>
<Caret Line="674" Column="44" TopLine="656"/> <Caret Line="52" Column="15" TopLine="36"/>
</Position17> </Position17>
<Position18> <Position18>
<Filename Value="..\..\Units\Misc\v_ideCodeParser.pas"/> <Filename Value="wrapfiles.pas"/>
<Caret Line="680" Column="56" TopLine="654"/> <Caret Line="37" Column="8" TopLine="23"/>
</Position18> </Position18>
<Position19> <Position19>
<Filename Value="..\..\Units\Misc\v_ideCodeParser.pas"/> <Filename Value="wrapfiles.pas"/>
<Caret Line="701" Column="58" TopLine="683"/> <Caret Line="71" Column="31" TopLine="56"/>
</Position19> </Position19>
<Position20> <Position20>
<Filename Value="main.pas"/> <Filename Value="main.pas"/>
<Caret Line="104" Column="24" TopLine="90"/> <Caret Line="90" Column="10" TopLine="39"/>
</Position20> </Position20>
<Position21> <Position21>
<Filename Value="..\..\Units\Misc\v_ideCodeParser.pas"/> <Filename Value="main.pas"/>
<Caret Line="8" Column="8" TopLine="1"/> <Caret Line="49" Column="11" TopLine="23"/>
</Position21> </Position21>
<Position22> <Position22>
<Filename Value="main.pas"/> <Filename Value="main.pas"/>
<Caret Line="117" Column="51" TopLine="103"/> <Caret Line="88" Column="14" TopLine="48"/>
</Position22> </Position22>
<Position23> <Position23>
<Filename Value="main.pas"/> <Filename Value="main.pas"/>
<Caret Line="100" Column="20" TopLine="105"/> <Caret Line="90" Column="11" TopLine="64"/>
</Position23> </Position23>
<Position24> <Position24>
<Filename Value="main.pas"/> <Filename Value="main.pas"/>
<Caret Line="101" Column="1" TopLine="83"/> <Caret Line="170" Column="46" TopLine="128"/>
</Position24> </Position24>
<Position25> <Position25>
<Filename Value="main.pas"/> <Filename Value="wrapfiles.pas"/>
<Caret Line="137" Column="35" TopLine="111"/> <Caret Line="72" Column="14" TopLine="27"/>
</Position25> </Position25>
<Position26> <Position26>
<Filename Value="main.pas"/> <Filename Value="wrapfiles.pas"/>
<Caret Line="101" Column="1" TopLine="83"/> <Caret Line="46" Column="23" TopLine="27"/>
</Position26> </Position26>
<Position27> <Position27>
<Filename Value="main.pas"/> <Filename Value="wrapfiles.pas"/>
<Caret Line="78" Column="13" TopLine="61"/> <Caret Line="50" Column="20" TopLine="32"/>
</Position27> </Position27>
<Position28> <Position28>
<Filename Value="main.pas"/> <Filename Value="C:\FPC\FPCCheckout\rtl\objpas\classes\stringl.inc"/>
<Caret Line="62" Column="22" TopLine="37"/> <Caret Line="625" Column="14" TopLine="608"/>
</Position28> </Position28>
<Position29> <Position29>
<Filename Value="main.pas"/> <Filename Value="wrapfiles.pas"/>
<Caret Line="147" Column="18" TopLine="125"/> <Caret Line="48" Column="48" TopLine="33"/>
</Position29> </Position29>
<Position30>
<Filename Value="wrapfiles.pas"/>
<Caret Line="54" Column="1" TopLine="52"/>
</Position30>
</JumpHistory> </JumpHistory>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>

View File

@ -9,13 +9,14 @@ uses
Interfaces, // this includes the LCL widgetset Interfaces, // this includes the LCL widgetset
Forms, main, v_MiscFunctions, CastaliaPasLex, CastaliaPasLexTypes, Forms, main, v_MiscFunctions, CastaliaPasLex, CastaliaPasLexTypes,
CastaliaSimplePasPar, CastaliaSimplePasParTypes, CastaliaSimplePasPar, CastaliaSimplePasParTypes,
v_Constants, v_ideCodeParser; v_Constants, v_ideCodeParser, wrapfiles;
{$R *.res} {$R *.res}
begin begin
Application.Initialize; Application.Initialize;
Application.CreateForm(TfrmMain, frmMain); Application.CreateForm(TfrmMain, frmMain);
Application.CreateForm(TWrapFilesForm, WrapFilesForm);
Application.Run; Application.Run;
end. end.

View File

@ -0,0 +1,72 @@
object WrapFilesForm: TWrapFilesForm
Left = 429
Height = 398
Top = 234
Width = 652
Caption = 'WrapFilesForm'
ClientHeight = 398
ClientWidth = 652
Constraints.MinHeight = 398
Constraints.MinWidth = 652
OnCreate = FormCreate
LCLVersion = '0.9.29'
object FileButton: TButton
Left = 16
Height = 25
Top = 16
Width = 75
Caption = 'Select files'
OnClick = FileButtonClick
TabOrder = 0
end
object FileBox: TListBox
Left = 16
Height = 220
Top = 56
Width = 616
Anchors = [akTop, akLeft, akRight, akBottom]
ItemHeight = 0
TabOrder = 1
end
object SaveDirEdit: TDirectoryEdit
Left = 200
Height = 21
Top = 16
Width = 152
ShowHidden = False
ButtonWidth = 23
NumGlyphs = 0
MaxLength = 0
TabOrder = 2
end
object SaveDirLabel: TLabel
Left = 120
Height = 14
Top = 20
Width = 78
Caption = 'Save directory: '
ParentColor = False
end
object wrpBtn: TButton
Left = 472
Height = 25
Top = 16
Width = 75
Caption = 'Convert'
OnClick = wrpBtnClick
TabOrder = 3
end
object dbgMemo: TMemo
Left = 16
Height = 100
Top = 287
Width = 616
Anchors = [akRight, akBottom]
TabOrder = 4
end
object FileDialog: TOpenDialog
Options = [ofAllowMultiSelect, ofFileMustExist, ofEnableSizing, ofViewDetail]
left = 32
top = 56
end
end

View File

@ -0,0 +1,83 @@
unit wrapfiles;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
EditBtn;
type
{ TWrapFilesForm }
TWrapFilesForm = class(TForm)
dbgMemo: TMemo;
wrpBtn: TButton;
SaveDirEdit: TDirectoryEdit;
FileButton: TButton;
FileBox: TListBox;
FileDialog: TOpenDialog;
SaveDirLabel: TLabel;
procedure FileButtonClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure wrpBtnClick(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
WrapFilesForm: TWrapFilesForm;
implementation
uses
Main;
{$R *.lfm}
{ TWrapFilesForm }
procedure TWrapFilesForm.FileButtonClick(Sender: TObject);
begin
if FileDialog.Execute then
begin
FileBox.Items.AddStrings(FileDialog.Files);
end;
end;
procedure TWrapFilesForm.FormCreate(Sender: TObject);
begin
end;
procedure TWrapFilesForm.wrpBtnClick(Sender: TObject);
procedure dbg(s : string);
begin
dbgMemo.Lines.Add(s);
end;
var
i : integer;
Input, Output : TFileStream;
begin
if not DirectoryExists(SaveDirEdit.Directory) then
begin
Writeln(format('Dir %s does not exist',[SaveDirEdit.Directory]));
exit;
end;
if not FileBox.Items.Count < 1 then
begin
Writeln('No files loaded');
exit;
end;
for i := 0 to FileBox.Items.Count - 1 do
begin
end;
end;
end.