integrated TFuture
This commit is contained in:
@@ -543,12 +543,13 @@ var
|
||||
InitialDirectory: string;
|
||||
SelectedPath, SelectedSymbol: string;
|
||||
SelectedYear: Integer;
|
||||
SelectedMonth: Integer;
|
||||
IsValidSyntax: Boolean;
|
||||
begin
|
||||
OpenDialog := TOpenDialog.Create( Self );
|
||||
try
|
||||
OpenDialog.Title := 'Open Tick Data File';
|
||||
OpenDialog.Filter := 'Tick Data Files (*.tab)|*.TAB|All Files (*.*)|*.*';
|
||||
OpenDialog.Filter := 'Tick Data Files (*.tab)|*.tab;*.tab_zip;*.tab_live|All Files (*.*)|*.*';
|
||||
OpenDialog.DefaultExt := 'tab';
|
||||
OpenDialog.Options := [ofFileMustExist, ofPathMustExist, ofHideReadOnly, ofEnableSizing];
|
||||
|
||||
@@ -574,11 +575,11 @@ begin
|
||||
Memo.Lines.Add( FormatDateTime( 'yyyy-mm-dd hh:nn:ss', Now ) + ' - File selected via dialog: ' + OpenDialog.FileName );
|
||||
|
||||
IsValidSyntax := Myc.TickLoader.TryParseFileName( OpenDialog.FileName,
|
||||
SelectedPath, SelectedSymbol, SelectedYear );
|
||||
SelectedPath, SelectedSymbol, SelectedYear, SelectedMonth );
|
||||
|
||||
if not IsValidSyntax then
|
||||
begin
|
||||
MessageDlg( Format( 'Warning: The selected filename ''%s'' does not match the expected format (Prefix_Symbol_Year.tab).',
|
||||
MessageDlg( Format( 'Warning: The selected filename ''%s'' does not match the expected format (Prefix_Symbol_Year_Month.tab).',
|
||||
[System.IOUtils.TPath.GetFileName( OpenDialog.FileName )] ), mtWarning, [mbOK], 0 );
|
||||
Memo.Lines.Add( 'Warning: Incorrect filename syntax chosen by user.' );
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user