unit FormDisassembler;

interface

uses
  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, Disassembler,
  FormEx;

type

  { TFormDisassembler }

  TFormDisassembler = class(TFormEx)
    MemoCode: TMemo;
    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    procedure FormCreate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
    procedure FormShow(Sender: TObject);
  public
    Disassembler: TDisassembler;
  end;


implementation

{$R *.lfm}

{ TFormDisassembler }

procedure TFormDisassembler.FormCreate(Sender: TObject);
begin
  Disassembler := TDisassembler.Create;
end;

procedure TFormDisassembler.FormClose(Sender: TObject;
  var CloseAction: TCloseAction);
begin
end;

procedure TFormDisassembler.FormDestroy(Sender: TObject);
begin
  FreeAndNil(Disassembler);
end;

procedure TFormDisassembler.FormShow(Sender: TObject);
begin
  Disassembler.Disassemble(MemoCode.Lines);
end;

end.

