mirror of
https://github.com/moparisthebest/Simba
synced 2024-12-24 00:08:52 -05:00
Support to open multiple files at once.
This commit is contained in:
parent
7f874b710b
commit
9d902708d5
@ -2866,6 +2866,7 @@ end;
|
|||||||
|
|
||||||
function TSimbaForm.OpenScript: boolean;
|
function TSimbaForm.OpenScript: boolean;
|
||||||
var
|
var
|
||||||
|
i: Integer;
|
||||||
OpenInNewTab : boolean;
|
OpenInNewTab : boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
@ -2875,11 +2876,19 @@ begin
|
|||||||
Exit;
|
Exit;
|
||||||
with TOpenDialog.Create(nil) do
|
with TOpenDialog.Create(nil) do
|
||||||
try
|
try
|
||||||
Filter:= 'Simba Files|*.Simba;*.simb;*.cogat;*.mufa;*.txt;*.' +LoadSettingDef('Settings/Extensions/FileExtension','sex')+
|
Options := [ofAllowMultiSelect, ofExtensionDifferent, ofPathMustExist, ofFileMustExist, ofEnableSizing, ofViewDetail];
|
||||||
|
Filter:= 'Simba Files|*.simba;*.simb;*.cogat;*.mufa;*.txt;*.' +LoadSettingDef('Settings/Extensions/FileExtension','sex')+
|
||||||
'|Any files|*.*';
|
'|Any files|*.*';
|
||||||
if Execute then
|
if Execute then
|
||||||
if FileExistsUTF8(filename) then
|
begin
|
||||||
result := LoadScriptFile(filename);
|
Result := True;
|
||||||
|
for i := 0 to Files.Count - 1 do
|
||||||
|
if (not FileExistsUTF8(Files[i])) or (not LoadScriptFile(Files[i])) then
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
Break;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
finally
|
finally
|
||||||
Free;
|
Free;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user