1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
procedure TForm1.FormCreate(Sender: TObject);
begin
if ParamCount = 0 then
// ListBox1.Items := FindAllFiles(ExtractFilePath(ParamStr(0)) + 'samples', '*.*', FALSE)
ListBox1.Items := FindAllFiles(SysToUTF8(ExtractFilePath(ParamStr(0))) + 'samples', '*.*', FALSE)
else
if DirectoryExists(ParamStr(1)) then
// ListBox1.Items := FindAllFiles(ParamStr(1), '*.*', FALSE)
ListBox1.Items := FindAllFiles(SysToUtf8(ParamStr(1)), '*.*', FALSE)
else
if FileExists(ParamStr(1)) then
// Edit1.Text := ParamStr(1);
Edit1.Text := SysToUtf8(ParamStr(1));
end; |