unit fmMain2;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    btnAO: TButton;
    btnCO: TButton;
    ListBox1: TListBox;
    procedure btnAOClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    procedure AppMsg(const sMsg : String);
  end;

var
  Form1: TForm1;

implementation

uses uInterfaces, uACClasses;

{$R *.dfm}

procedure TForm1.AppMsg(const sMsg: String);
begin
  ListBox1.Items.Add(sMsg);
end;

procedure TForm1.btnAOClick(Sender: TObject);
var
  aController : TController;
  aImpl : IImplInterface;
begin
  aController := TController.Create;
  try
    aImpl := aController;
    AppMsg(FloatToStr(aImpl.ConvertToUSD(10000)));
    AppMsg(FloatToStr(aImpl.ConvertToRMB(10000)));
  finally
    FreeAndNil(aController);
  end;
end;

end.
