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

📄 tresultfrmunit.pas

📁 CVS IDE plugin for Borland Delphi this is a good program,i like this kind of practise
💻 PAS
字号:
(* $Id: TResultFrmunit.pas,v 1.3 2002/12/27 16:22:43 turbo Exp $
 *
 * Form for showing the output of a cvs command
 *
 * Copyright 2001 by Thomas Bleier
 * For license details see LICENSE.txt
 *)

unit TResultFrmunit;
{$I BORCVS.inc}
interface
//---------------------------------------------------------------------------
uses
  Classes,
  Controls,
  StdCtrls,
  Forms,
  ComCtrls,
  Menus,
  ExtCtrls;
//---------------------------------------------------------------------------
type
  TResultFrm = class(TForm)
    Panel1: TPanel;
    PLogEdit: TRichEdit;
    Panel2: TPanel;
    Panel3: TPanel;
    PCloseBtn: TButton;
    procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
  private
  protected
    FIsRunning: boolean;
//    function GetLines: TStrings;
  public
    constructor create(Owner: TComponent); override;
    procedure ShowProcessRunning;
    procedure ShowFinished;
//    property Lines: TStrings read GetLines;
//    property LogTextControl: TRichEdit read PLogEdit;
  end;

implementation
uses
  messages;
//---------------------------------------------------------------------------
{$R *.dfm}
//---------------------------------------------------------------------------

constructor TResultFrm.create(Owner: TComponent);
begin
  inherited create(owner);
//  Width := Screen.Width * 5 div 6;
//  Height := Screen.Height * 5 div 6;
//  Left := Screen.Width div 2 - Width div 2;
//  Top := Screen.Height div 2 - Height div 2;
  FIsRunning := false;
end;
//---------------------------------------------------------------------------

//function TResultFrm.GetLines: TStrings;
//begin
//  result := PLogEdit.Lines;
//end;
//---------------------------------------------------------------------------

procedure TResultFrm.ShowProcessRunning;
begin
  FIsRunning := true;
  PLogEdit.Enabled := false;
  PCloseBtn.Visible := false;
  Show;
end;
//---------------------------------------------------------------------------

procedure TResultFrm.ShowFinished;
begin
  Hide;
  PLogEdit.Enabled := true;
  PCloseBtn.Visible := true;
  FIsRunning := false;
  ActiveControl := PCloseBtn;
  PLogEdit.SelStart := -1;
  PLogEdit.Perform(EM_SCROLLCARET, 0, 0);
  ShowModal;
end;
//---------------------------------------------------------------------------

procedure TResultFrm.FormCloseQuery(Sender: TObject; var CanClose: boolean);
begin
  CanClose := not FIsRunning;
end;
//---------------------------------------------------------------------------
end.

⌨️ 快捷键说明

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