Ver Mensaje Individual
  #4  
Antiguo 15-05-2004
santiellupin santiellupin is offline
Registrado
 
Registrado: sep 2003
Posts: 5
Reputación: 0
santiellupin Va por buen camino
perdon!

Este es el codigo que se me olvidaba. si necesitas que te ponga toda la unit dimelo que te lo pongo si esto no es suficiente.

constructor cAscensor.Crear(NumPlantas, PlantaActual, PlantaDestino: Integer; Grid: tStringGrid);
begin
inherited Create;
self.NumPlantas := NumPlantas;
self.PlantaActual := PlantaActual;
self.PlantaDestino := PlantaDestino ;
PanelInterno := cPanelInterno.Create ((self as cSujeto), Grid, NumPlantas);
PanelInterno.parent := Grid;
PanelInterno.BoundsRect := Grid.CellRect (0,NumPlantas - PlantaActual);
PanelInterno.SetPisoSelected (NumPlantas - PlantaActual);
self.Grid := Grid;
Timer := tTimer.Create (Grid);
Timer.Enabled := False;
Timer.OnTimer := Llamar(PlantaDestino);
Timer.Interval := 1000;
end;

procedure cAscensor.Llamar(Destino: Integer);
begin
If Destino <> PlantaActual then
begin
RegistrarInicioAscensor;
RegistrarInicioPlanta (Destino);
PlantaDestino := Destino;
end;
end;
Responder Con Cita