1
0
mirror of synced 2024-11-21 13:43:49 +00:00

Fixed: dialog filters

This commit is contained in:
Mark van Renswoude 2008-04-14 19:36:55 +00:00
parent f453aea455
commit e402505cbb
3 changed files with 5 additions and 3 deletions

View File

@ -33,6 +33,7 @@ object MainForm: TMainForm
Width = 331 Width = 331
Height = 21 Height = 21
AddQuotes = False AddQuotes = False
Filter = 'W3C XML Schema files (*.xsd)|*.xsd|All files (*.*)|*.*'
Anchors = [akLeft, akTop, akRight] Anchors = [akLeft, akTop, akRight]
TabOrder = 0 TabOrder = 0
end end
@ -72,7 +73,7 @@ object MainForm: TMainForm
Top = 72 Top = 72
Width = 416 Width = 416
Height = 87 Height = 87
ActivePage = spFolder ActivePage = spFile
PropagateEnable = False PropagateEnable = False
ShowDesignCaption = sdcBottomRight ShowDesignCaption = sdcBottomRight
Anchors = [akLeft, akTop, akRight, akBottom] Anchors = [akLeft, akTop, akRight, akBottom]
@ -95,6 +96,7 @@ object MainForm: TMainForm
Height = 21 Height = 21
AddQuotes = False AddQuotes = False
DialogKind = dkSave DialogKind = dkSave
Filter = 'Delphi source files (*.pas)|*.pas|All files (*.*)|*.*'
DialogOptions = [ofOverwritePrompt, ofHideReadOnly] DialogOptions = [ofOverwritePrompt, ofHideReadOnly]
TabOrder = 0 TabOrder = 0
end end
@ -151,7 +153,6 @@ object MainForm: TMainForm
Width = 121 Width = 121
Height = 21 Height = 21
TabOrder = 2 TabOrder = 2
Text = '.pas'
end end
end end
end end

View File

@ -129,7 +129,8 @@ end;
procedure TMainForm.GetFileName(Sender: TObject; const SchemaName: String; var Path, FileName: String); procedure TMainForm.GetFileName(Sender: TObject; const SchemaName: String; var Path, FileName: String);
begin begin
FileName := edtFolderPrefix.Text + FileName + edtFolderPostfix.Text; FileName := ChangeFileExt(edtFolderPrefix.Text + FileName,
edtFolderPostfix.Text + ExtractFileExt(FileName));
CheckValidFileName(FileName); CheckValidFileName(FileName);
end; end;

Binary file not shown.