Configure (TTaskConfigureController)
De Wiki1000
(Différences entre les versions)
(Page créée avec « <source lang='delphi'>function Configure(var aReason:string):boolean;</source> Cette méthode exécute l'interface FormName et récupère la configuration de la tâche. ... ») |
|||
Ligne 16 : | Ligne 16 : | ||
<source lang="delphi"> | <source lang="delphi"> | ||
+ | function doConfigureMyTask:string; | ||
+ | var inst:TTaskFormController; aReason:string; | ||
+ | begin | ||
+ | inst := TTaskFormController.Create; | ||
+ | inst.FormName := 'myprocessus.dfm'; | ||
+ | inst.TaskParameters := myProcessusParameters; | ||
+ | if inst.Configure(aReason) then | ||
+ | begin | ||
+ | // TaskParameters has been populate | ||
+ | myProcessusParameters := inst.TaskParameters; | ||
+ | end; | ||
+ | end; | ||
</source> | </source> | ||
Version du 20 novembre 2019 à 17:15
function Configure(var aReason:string):boolean;
Cette méthode exécute l'interface FormName et récupère la configuration de la tâche.
Result | True : Succès, False : L'utilisateur a annulé la configuration |
aReason | Information sur l'erreur |
Exemple :
function doConfigureMyTask:string; var inst:TTaskFormController; aReason:string; begin inst := TTaskFormController.Create; inst.FormName := 'myprocessus.dfm'; inst.TaskParameters := myProcessusParameters; if inst.Configure(aReason) then begin // TaskParameters has been populate myProcessusParameters := inst.TaskParameters; end; end;
Voir aussi
Whos here now: Members 0 Guests 0 Bots & Crawlers 1 |