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

📄 replacedialog.pas

📁 大家是不是为不知道如何在VB学到绝地程序
💻 PAS
字号:
{***************************************************************
 *
 * Unit Name   : ReplaceDialog
 * Version     :
 * Date        : 99-12-20 17:55:16
 * Purpose     :
 * Author      : riceball (teditor@mailroom.com)
 * Copyright(C): 1999 by riceball
 * History     :
 *
 *       1999-12-20
 *             * Replace Options save to INI file.
 *
 ****************************************************************}

Unit ReplaceDialog;

Interface

Uses
  Windows,
  Messages,
  SysUtils,
  Classes,
  Graphics,
  Controls,
  Forms,
  Dialogs,
  vgNLS,
  StdCtrls,
  MRUCombo,
  AppUtils,
  Placemnt,
  MainEdit;

Type
  TdlgReplace = Class(TForm)
    GroupBox1: TGroupBox;
    Label1: TLabel;
    btnFind: TButton;
    BtnCancel: TButton;
    cbMatchCase: TCheckBox;
    cbWholeWord: TCheckBox;
    GroupBox2: TGroupBox;
    rbForward: TRadioButton;
    rbBackward: TRadioButton;
    GroupBox3: TGroupBox;
    rbGlobal: TRadioButton;
    rbSelectedOnly: TRadioButton;
    GroupBox4: TGroupBox;
    rbFromCursor: TRadioButton;
    rbEntireScope: TRadioButton;
    cbFindText: TMRUComboBox;
    cbReplaceText: TMRUComboBox;
    Label2: TLabel;
    btnReplaceAll: TButton;
    cbPrompt: TCheckBox;
    FormStorage: TFormStorage;
    Procedure FormCreate(Sender: TObject);
    Procedure FormShow(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  Private
    { Private declarations }
    tran: TvgTranslator;
  Public
    { Public declarations }
  End;

Var
  dlgReplace: TdlgReplace;

Implementation

{$R *.DFM}

Procedure TdlgReplace.FormCreate(Sender: TObject);
Begin
  tran := TvgTranslator.Create(Self);
  cbFindText.IniFile := ExtractFilePath(Application.ExeName) + GetDefaultIniName;
  cbReplaceText.IniFile := cbFindText.IniFile;
  FormStorage.IniFileName := cbFindText.IniFile;

  cbReplaceText.IniFile := cbFindText.IniFile;
End;

Procedure TdlgReplace.FormShow(Sender: TObject);
Begin
  tran.LanguageFile := CurrentLan;
  tran.Translate;
End;

procedure TdlgReplace.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  cbFindText.WriteList;
  cbReplaceText.WriteList;
end;

End.

⌨️ 快捷键说明

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