usedefeditor.dpr

来自「wptools5 pro 完整源代码 Msword界面的文本编辑器源代码」· DPR 代码 · 共 51 行

DPR
51
字号
program UseDefEditor;

{$I WPINC.INC}

{$DEFINE USE_LOCALISATION} // activate to use WPLanguagControl, see unit WPLocalU!

uses
  Forms,
  SysUtils,
  WPDefEditor,
  WPSplash
  {$IFDEF USE_LOCALISATION} , WPLocalU{$ENDIF}
  ;

{$R *.res}

procedure WPToolsInfo;
begin
  TWPSplashForm.Create(Application).ShowModal;
end;

var i : Integer;
    b : Boolean;

begin
  Application.Initialize;
  {$IFNDEF WPDEMo}
  b := TRUE;
  for i:=1 to ParamCount do
    if CompareText(ParamStr(i),'-NOSPLASH')=0 then b := FALSE;
  if b then
  begin
     TWPSplashForm.Create(Application).Show;
     Application.ProcessMessages;
  end;
  {$ENDIF}
  Application.CreateForm(TWPToolsEditor, WPToolsEditor);
  {$IFDEF USE_LOCALISATION}
    Application.CreateForm(TWPLocalisationDataModule, WPLocalisationDataModule);
  {$ENDIF}
  if FileExists(ParamStr(1)) then
     WPToolsEditor.WPRichText1.LoadFromFile(ParamStr(1),true);
  WPToolsEditor.WPDefAct.OnInfo := WPToolsInfo ;
  WPToolsEditor.WPDefAct.Info2.Visible := FALSE;
  {$IFDEF USE_LOCALISATION}
  WPToolsEditor.WPDefAct.SelectLanguage1.OnClick := WPLocalisationDataModule.SelectLanguage;
  WPToolsEditor.WPDefAct.SelectLanguage1.Visible := TRUE;
  {$ENDIF}
  Application.Run;
end.

⌨️ 快捷键说明

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