⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 importfromfolderf.pas

📁 极具实用价值的文件管理系统
💻 PAS
字号:
{ *********************************************************************** }
{ Unit Name: ImportFromFolderF
{ Purpose: ImportFromFolderF
{ Author: Cyclone
{ History:
{         2004-12-9 21:59:54 Create the function
{ *********************************************************************** }

unit ImportFromFolderF;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DialogBaseF, Buttons, CycSpeedButton, CycPanel, ExtCtrls,
  {$IFDEF MSWINDOWS} FileCtrl, {$ENDIF} StdCtrls, CycLabeledEdit,
  CycLabeledLookupEdit, CycLabel, PubFuns;

type
  TfmImportFromFolder = class(TfmDialogBase)
    edtPath: TCycLabeledLookupEdit;
    rdgAction: TRadioGroup;
    chkIncludeSubDir: TCheckBox;
    procedure edtPathSubButtonClick(Sender: TObject);
    procedure btnOKClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    Path: String;
    IncludeSubDirectory: Boolean;
    FileExistsAction: TImportFileExistsAction;
  end;

var
  fmImportFromFolder: TfmImportFromFolder;

implementation


{$R *.dfm}

procedure TfmImportFromFolder.edtPathSubButtonClick(Sender: TObject);
var
  APath: String;
begin
  if SelectDirectory('Please Select Import Folder', '', APath) then
  begin
    edtPath.Text := APath;
  end;
end;

procedure TfmImportFromFolder.btnOKClick(Sender: TObject);
begin
  if not DirectoryExists(edtPath.Text) then
  begin
    ShowError('Selected path not exists!');
    edtPath.SetFocus;
    Exit;
  end;
  Path := edtPath.Text;
  IncludeSubDirectory := chkIncludeSubDir.Checked;
  FileExistsAction := TImportFileExistsAction(rdgAction.ItemIndex);

  inherited;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -