delphiforge1.pas

来自「C,C++ To Delphi转换器 C,C++ To Delphi转换器」· PAS 代码 · 共 53 行

PAS
53
字号
unit DelphiForge1;

// Free for any project that try to translate C to Pascal
// (c)2002 by Paul TOTH <tothpaul@free.fr>

interface

uses
  Windows, Messages, SysUtils,  Classes, Graphics, Controls, Forms,
  Dialogs, FileCtrl, StdCtrls;

type
  TForm1 = class(TForm)
    FileListBox1: TFileListBox;
    DirectoryListBox1: TDirectoryListBox;
    DriveComboBox1: TDriveComboBox;
    FilterComboBox1: TFilterComboBox;
    Memo1: TMemo;
    Label1: TLabel;
    procedure FileListBox1DblClick(Sender: TObject);
  private
    { D閏larations priv閑s }
  public
    { D閏larations publiques }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

uses
 DFParser;

procedure TForm1.FileListBox1DblClick(Sender: TObject);
begin
 try
  Parse(FileListBox1.FileName);
 except
  on e:Exception do begin
   label1.caption:=e.message;
  end;
 end;
 memo1.lines.text:=Parser.Source;
 memo1.SelStart:=Parser.Start-1;
 memo1.SelLength:=Parser.Index-Parser.Start;
 memo1.SetFocus;
end;

end.

⌨️ 快捷键说明

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