unit uEditorInstalador;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, uEditorContacto, JvAppStorage, JvAppRegistryStorage, JvComponentBase,
  JvFormPlacement, DB, uDADataTable, ImgList, PngImageList, StdActns, ActnList,
  ComCtrls, TBX, TB2Item, TB2Dock, TB2Toolbar, ExtCtrls, JvExControls,
  JvComponent, JvNavigationPane, uCustomView, uViewBase, uViewContacto,
  uViewInstalador,

  uIEditorInstalador, pngimage, TBXStatusBars, JvExComCtrls, JvStatusBar;

type
  TfEditorInstalador = class(TfEditorContacto, IEditorInstalador)
    frViewInstalador1: TfrViewInstalador;
  protected
    procedure EliminarInterno; override;
  public
    constructor Create(AOwner: TComponent); override;
    procedure PonerTitulos(const ATitulo: string = ''); override;
  end;

implementation

{$R *.dfm}

{ TfEditorInstalador }

constructor TfEditorInstalador.Create(AOwner: TComponent);
begin
  inherited;
  ViewContacto := frViewInstalador1;
end;

procedure TfEditorInstalador.EliminarInterno;
begin
  if (Application.MessageBox('¿Desea borrar este instalador?', 'Atención', MB_YESNO) = IDYES) then
    inherited;
end;

procedure TfEditorInstalador.PonerTitulos(const ATitulo: string);
var
  FTitulo : String;
begin
  if Assigned(Contacto) then
  begin
    if Contacto.EsNuevo then
      FTitulo := 'Nuevo instalador'
    else
      FTitulo := 'Instalador';
  end;

  inherited PonerTitulos(FTitulo);
end;

end.
