desarrollosconsejeria/adtos-server/1.7-0/adtos/dialogos.pas @ 23a384b9
54e95a47 | Elisa | {
|
|
23a384b9 | Elisa | Adtos 1.0 Software de gestión de Aulas Tecnológicas
|
|
Copyright (C) 2008-2009, Consejería de Educación,Junta de Extremadura
|
|||
54e95a47 | Elisa | Programación: Manuel Narváez Martínez <mnarvaez007@gmail.com>
|
|
Diseño gráfico: Ana María Zamora Moreno
|
|||
Desarrollado con Lazarus 0.9.26
|
|||
This program is free software; you can redistribute it and/or modify
|
|||
it under the terms of the GNU General Public License as published by
|
|||
the Free Software Foundation; either version 2 of the License, or
|
|||
(at your option) any later version.
|
|||
This program is distributed in the hope that it will be useful,
|
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||
GNU General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
|||
along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
}
|
|||
unit dialogos;
|
|||
{$mode objfpc}{$H+}
|
|||
interface
|
|||
uses
|
|||
globales,Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
|||
StdCtrls;
|
|||
type
|
|||
{ TfrmDialogos }
|
|||
TfrmDialogos = class(TForm)
|
|||
lblMensaje: TLabel;
|
|||
spbSi: TButton;
|
|||
spbAceptar: TButton;
|
|||
spbNo: TButton;
|
|||
imgFondo: TImage;
|
|||
procedure FormShow(Sender: TObject);
|
|||
procedure SpbClick(Sender: TObject);
|
|||
private
|
|||
{ private declarations }
|
|||
procedure MostrarBotones(tipo:EDialogos);
|
|||
public
|
|||
{ public declarations }
|
|||
end;
|
|||
var
|
|||
frmDialogos: TfrmDialogos;
|
|||
implementation
|
|||
{ TfrmDialogos }
|
|||
procedure TfrmDialogos.SpbClick(Sender: TObject);
|
|||
begin
|
|||
tipodialogo.respuesta:=(sender as tbutton).tag;
|
|||
hide;
|
|||
close;
|
|||
end;
|
|||
procedure TfrmDialogos.FormShow(Sender: TObject);
|
|||
begin
|
|||
lblmensaje.caption:= tipodialogo.mensaje;
|
|||
MostrarBotones(tipodialogo.ClaseDialogo);
|
|||
end;
|
|||
procedure TfrmDialogos.MostrarBotones(tipo:EDialogos);
|
|||
begin
|
|||
case tipo of
|
|||
Aceptar:
|
|||
begin
|
|||
spbAceptar.left:=(width-spbAceptar.Width) div 2;
|
|||
spbSi.Visible:=false;
|
|||
spbNo.Visible:=false;
|
|||
end;
|
|||
SiNo:
|
|||
begin
|
|||
spbSi.Visible:=true;
|
|||
spbNo.Visible:=true;
|
|||
spbAceptar.Visible:=false;
|
|||
end
|
|||
end;
|
|||
end;
|
|||
initialization
|
|||
{$I dialogos.lrs}
|
|||
end.
|