TaskParameters (TTaskConfigureController)

De Wiki1000
(Différences entre les versions)
(Page créée avec « <source lang='delphi'>property TaskParameters:String;</source> Cette propriété défini les paramètres de la tâche. {|class="wikitable" |- | | |} Exemple : <source... »)
 
 
(4 révisions intermédiaires par un utilisateur sont masquées)
Ligne 1 : Ligne 1 :
 
<source lang='delphi'>property TaskParameters:String;</source>
 
<source lang='delphi'>property TaskParameters:String;</source>
  
Cette propriété défini les paramètres de la tâche.
+
Cette propriété définit les paramètres de la tâche.
  
 
{|class="wikitable"
 
{|class="wikitable"
Ligne 13 : Ligne 13 :
  
 
<source lang="delphi">
 
<source lang="delphi">
function doGetMyTaskParameters:string;
+
 
var inst:TTaskFormController;
+
function doConfigureMyTask:string;
 +
var inst:TTaskConfigureController; aReason:String;
 
begin
 
begin
   inst := TTaskFormController.Create;
+
   inst := TTaskConfigureController.Create;
 
   inst.FormName := 'myprocessus.dfm';
 
   inst.FormName := 'myprocessus.dfm';
 +
  inst.TaskParameters := myProcessParameters;
 +
 
   // This open the interface for configuration
 
   // This open the interface for configuration
   inst.Configure();
+
   if inst.Configure(aReason) then
  // TaskParameters has been populate
+
    begin
  Result := inst.Result;
+
      // Result = True means the user has validate the configuration
 +
      // TaskParameters has been populate
 +
      myProcessParameters:= inst.TaskParameters;
 +
    end;
 
end;
 
end;
 
</source>
 
</source>
Ligne 27 : Ligne 33 :
 
Voir aussi
 
Voir aussi
  
{{Footer|TTaskFormController_(class)}}
+
{{Footer|TTaskConfigureController_(class)}}
[[Category:TTaskFormController]]
+
[[Category:TTaskConfigureController]]

Version actuelle en date du 20 novembre 2019 à 18:59

property TaskParameters:String;

Cette propriété définit les paramètres de la tâche.


Exemple :

function doConfigureMyTask:string;
var inst:TTaskConfigureController; aReason:String;
begin
  inst := TTaskConfigureController.Create;
  inst.FormName := 'myprocessus.dfm';
  inst.TaskParameters := myProcessParameters;
 
  // This open the interface for configuration
  if inst.Configure(aReason) then
    begin
      // Result = True means the user has validate the configuration
      // TaskParameters has been populate
      myProcessParameters:= inst.TaskParameters;
    end;
end;

Voir aussi

TTaskConfigureController_(class)Développement DSM





Whos here now:   Members 0   Guests 0   Bots & Crawlers 1
 
Outils personnels