« Schedule (TitTask) » : différence entre les versions

De Wiki1000
(Page créée avec « <source lang='delphi'>function Schedule(p:TdbmPlanification; var aReason:string):boolean;</source> Cette fonction planifie l'exécution de la tâche. {|class="wikitable"... »)
 
Aucun résumé des modifications
 
Ligne 22 : Ligne 22 :
<source lang="delphi">
<source lang="delphi">
//Procedure ScheduleTask2;
//Procedure ScheduleTask2;
var inst:TdbmPlanification; task:TTestTask; aReason:string;  
var inst:TPlanificationData; task:TTestTask; aReason:string;  
begin
begin
   inst := TdbmPlanification.Create;
   inst := TPlanificationData.Create;
   inst.RepeatValue.Value := enumEventRepeat_Minutes;
   inst.RepeatValue.Value := enumEventRepeat_Minutes;
   inst.RepeatInterval := 1;  
   inst.RepeatInterval := 1;  
Ligne 37 : Ligne 37 :
Voir aussi:
Voir aussi:


* [[TdbmPlanification (class)|TdbmPlanification]]
* [[TPlanificationData (class)|TPlanificationData]]
* [[Post (TdbmPlanification)|Post sur une planification]]
* [[Post (TPlanificationData)|Post sur une planification]]


{{Footer|Classe_tâche_(stereotype)}}
{{Footer|Classe_tâche_(stereotype)}}
[[Category:Stéréotype tâche]]
[[Category:Stéréotype tâche]]

Dernière version du 24 mai 2019 à 13:11

function Schedule(p:TdbmPlanification; var aReason:string):boolean;

Cette fonction planifie l'exécution de la tâche.

Paramètre Usage
p Objet planification
aReason Information sur l'erreur
Result True si succès

Exemple :

//Procedure ScheduleTask2;
var inst:TPlanificationData; task:TTestTask; aReason:string; 
begin
  inst := TPlanificationData.Create;
  inst.RepeatValue.Value := enumEventRepeat_Minutes;
  inst.RepeatInterval := 1; 
  // 
  task := TTestTask.Create;
  if not task.Schedule(inst,aReason) 
     then showMessage('schedule failed:'+aReason)
     else showMessage('schedule OK'); 
end;

Voir aussi:

Classe_tâche_(stereotype)Développement DSM