TConsoleUnit.pas 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. {
  2. Copyright 2005-2006 Log4Delphi Project
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. }
  13. unit TConsoleUnit;
  14. {$ifdef fpc}
  15. {$mode objfpc}
  16. {$h+}
  17. {$endif}
  18. interface
  19. uses
  20. SysUtils, Classes, Controls, Forms,
  21. {$ifdef fpc}LResources,{$endif}
  22. Dialogs, StdCtrls;
  23. type
  24. TTConsole = class(TForm)
  25. Memo1: TMemo;
  26. private
  27. { Private declarations }
  28. public
  29. { Public declarations }
  30. procedure Clear();
  31. procedure append(const msg : String);
  32. end;
  33. var
  34. TConsole: TTConsole;
  35. implementation
  36. {$ifndef fpc}
  37. {$R *.dfm}
  38. {$endif}
  39. procedure TTConsole.Clear();
  40. begin
  41. Memo1.Lines.Clear;
  42. end;
  43. procedure TTConsole.append(const msg : String);
  44. begin
  45. Memo1.Lines.Add(msg);
  46. end;
  47. initialization
  48. {$ifdef fpc}
  49. {$include tconsoleunit.lrs}
  50. {$endif}
  51. end.