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

📄 newfolder_frm.pas

📁 自己写的一个 RSS 阅读器
💻 PAS
字号:
unit newFolder_Frm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, JvExStdCtrls, JvHtControls;

type
  TfmNewFolder = class(TForm)
    InfoLabel: TJvHTLabel;
    Edit1: TEdit;
    BtnOK: TButton;
    BtnCannel: TButton;
    procedure BtnOKClick(Sender: TObject);
    procedure BtnCannelClick(Sender: TObject);
  private
    ResultValue:Boolean;
    { Private declarations }
  public
    FolderName:String;
    function Execute(ACaption,AInfo:string;ADefaultText:string = 'NewFolder'):Boolean;
    { Public declarations }
  end;

var
  fmNewFolder: TfmNewFolder;

implementation

uses FastStrings,uHTMLMessage;

{$R *.dfm}
function TfmNewFolder.Execute(ACaption,AInfo:string;ADefaultText:string = 'NewFolder'):Boolean;
begin
   try
     Caption := ACaption;
     InfoLabel.Caption := FastReplace(AInfo,'\n','<BR>');
     Edit1.Text := ADefaultText;
     FolderName := '';
     ResultValue:=False;
     ShowModal;
   finally // wrap up
     Result := ResultValue;
   end;    // try/finally
end;

procedure TfmNewFolder.BtnOKClick(Sender: TObject);
begin
  if CheckSpecialChar(Edit1.Text) then
  begin
    FolderName := Edit1.Text;
    ResultValue := True;
    Close;
  end
  else
    HTMLMessage('Worning','Folder name cannot include Special character',False);
end;

procedure TfmNewFolder.BtnCannelClick(Sender: TObject);
begin
  Close;
end;

end.

⌨️ 快捷键说明

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