You've already forked lazarus-ccr
fpspreadsheet: Add measurement of file loading time to fpsctrls/demo_ctrl
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4028 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -76,13 +76,18 @@
|
||||
<Unit2>
|
||||
<Filename Value="..\shared\scsvparamsform.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="CSVParamsForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="sCSVParamsForm"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="..\shared\sformatsettingsform.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="FormatSettingsForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="sFormatsettingsForm"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="..\shared\ssortparamsform.pas"/>
|
||||
@ -93,6 +98,7 @@
|
||||
<Filename Value="..\shared\scurrencyform.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="CurrencyForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="scurrencyform"/>
|
||||
</Unit5>
|
||||
|
@ -7,8 +7,8 @@ uses
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, main, scsvparamsform, sformatsettingsform,
|
||||
ssortparamsform, scurrencyform
|
||||
Forms, main,
|
||||
scsvparamsform, sformatsettingsform, ssortparamsform, scurrencyform
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
@ -320,6 +320,7 @@ implementation
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
LCLProc, // debugln
|
||||
fpsUtils, fpsCSV,
|
||||
sCSVParamsForm, sCurrencyForm, sFormatSettingsForm, sSortParamsForm;
|
||||
|
||||
@ -328,6 +329,8 @@ uses
|
||||
|
||||
{ Loads the spreadsheet file selected by the AcFileOpen action }
|
||||
procedure TMainForm.AcFileOpenAccept(Sender: TObject);
|
||||
var
|
||||
t: TTime;
|
||||
begin
|
||||
WorkbookSource.AutodetectFormat := false;
|
||||
case AcFileOpen.Dialog.FilterIndex of
|
||||
@ -340,7 +343,10 @@ begin
|
||||
7: WorkbookSource.FileFormat := sfOpenDocument; // Open/LibreOffice
|
||||
8: WorkbookSource.FileFormat := sfCSV; // Text files
|
||||
end;
|
||||
t := now;
|
||||
WorkbookSource.FileName := UTF8ToAnsi(AcFileOpen.Dialog.FileName); // this loads the file
|
||||
t := (now - t)*24*3600;
|
||||
DebugLn(Format('Loading time for %s: %.3f sec', [AcFileOpen.Dialog.FileName, t]));
|
||||
UpdateCaption;
|
||||
end;
|
||||
|
||||
|
Reference in New Issue
Block a user