fcintl.pas
上传用户:hylc_2004
上传日期:2014-01-23
资源大小:46800k
文件大小:2k
源码类别:

Delphi控件源码

开发平台:

Delphi

  1. unit fcintl;
  2. {
  3. //
  4. // Components : TfcInternational
  5. //
  6. // Copyright (c) 1995-2001 by Woll2Woll Software
  7. //
  8. }
  9. {$i fcIfDef.pas}
  10. interface
  11. uses
  12.   Consts, SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  13.   Forms, Dialogs, db,
  14.   Registry,
  15.   Buttons;
  16. type
  17.   TfcCalculatorIntl = class(TPersistent)
  18.   private
  19. //    FConfirmDeleteMessage: string;
  20. //    FHints: TwwDBNavigatorIntlHints;
  21.   published
  22. //    property ConfirmDeleteMessage: string read FConfirmDeleteMessage write FConfirmDeleteMessage;
  23. //    property Hints: TwwDBNavigatorIntlHints read FHints write FHints;
  24.   end;
  25.   TfcIntl = class(TComponent)
  26.   private
  27.     FCalculator: TfcCalculatorIntl;
  28.     Procedure SetConnected(val: boolean);
  29.   protected
  30.     Procedure Loaded; override;
  31.     Procedure Connect;
  32.   public
  33.     constructor Create(AOwner: TComponent); override;
  34.     destructor Destroy; override;
  35.   published
  36.      property Calculator: TfcCalculatorIntl read FCalculator write FCalculator;
  37.      property Connected: boolean read FConnected write SetConnected;
  38.   end;
  39. procedure Register;
  40. var fcInternational: TfcIntl;
  41. implementation
  42. uses StdCtrls;
  43. constructor TfcIntl.Create(AOwner: TComponent);
  44. begin
  45.    inherited Create(AOwner);
  46.    FCalculator:= TwwCalculatorIntl.create;
  47.    with Calculator do
  48.    begin
  49.    end;
  50. end;
  51. destructor TfcIntl.Destroy;
  52. begin
  53.   FCalculator.Free;
  54.   inherited Destroy;
  55.   if self=fcInternational then fcInternational:= nil;
  56. end;
  57. Procedure TfcIntl.Loaded;
  58. begin
  59.    inherited Loaded;
  60.    if Connected then Connect;
  61. end;
  62. Procedure TfcIntl.SetConnected(val: boolean);
  63. begin
  64.     FConnected:= val;
  65.     if not val then exit;
  66.     Connect;
  67. end;
  68. Procedure TfcIntl.Connect;
  69. begin
  70.     if self=fcInternational then exit;
  71.     with Calculator do begin
  72. //       wwInternational.RichEdit.TabDialog.HelpContext:= FTabDialog.HelpContext;
  73.     end;
  74. end;
  75. procedure Register;
  76. begin
  77. end;
  78. procedure InitMainIntl;
  79. begin
  80.   fcInternational:= TfcIntl.create(Application);
  81. end;
  82. initialization
  83.   InitMainIntl;
  84. finalization
  85.   fcInternational.Free;
  86. end.