Einzelnen Beitrag anzeigen

Benutzerbild von ltiefland
ltiefland

Registriert seit: 2. Mai 2005
Ort: Marl
63 Beiträge
 
Delphi 2005 Professional
 
#3

Re: Inno Setup Lizenz abfragen

  Alt 3. Jul 2005, 15:16
Hier jetzt mal ein Beispiel, wie ich es gemacht habe (bei der Abfrage eines Datenbankservers für meine Delphi-Programme):

Delphi-Quellcode:
var
   Server:String;
   Page: TInputQueryWizardPage;
FUNCTION NextButtonClick(CurPageID:Integer):Boolean;
BEGIN
   IF CurPageID=wpSelectComponents THEN
   BEGIN
      IF (NOT isComponentSelected('wamp')) THEN
      BEGIN
         if Server='localhostthen
         BEGIN
            IF MsgBox('Haben Sie MySQL wirklich auf Ihrem System installiert?',mbConfirmation,mb_YESNO or MB_DEFBUTTON2) =idYes THEN
            BEGIN
               Result:=TRUE;
            END
            ELSE
            BEGIN
               Result:=FALSE;
            END;
         END
         ELSE
         BEGIN
            Result:=True;
         END;
      END
      ELSE
      BEGIN
         Result:=TRUE;
      END;
   END
   ELSE
   BEGIN
      IF CurpageID=Page.ID THEN
      BEGIN
         Server:=Page.Values[0];
         IF (Server <>'') THEN
         BEGIN
            Result:=True;
         END
         ELSE
         BEGIN
            Server:='localhost';
            IF MsgBox('Sie haben keinen Server angegeben. Standardserver localhost wird verwendet. Ist das richtig?',mbConfirmation,mb_YESNO or MB_DEFBUTTON2) =idYes THEN
            BEGIN
               Result:=True;
            END
            ELSE
            BEGIN
               Result:=False;
            END;
         END;
      END
      ELSE
      BEGIN
         Result:=True;
      END;
   END;
END;

procedure InitializeWizard;
BEGIN
   Page:=CreateInputQueryPage(wpSelectDir,Expandconstant('{cm:SampleFormCaption}'),Expandconstant('{cm:SampleFormCaption}'), Expandconstant('{cm:SampleFormDescription}'));
   Page.Add('Server: ', False);
   Page.Values[0]:='localhost';
END;

function GetServer(Param: String):String;
begin
   if Server <>'then
   begin
      Result:=Server;
   end
   else
   begin
      Result:=Param;
   end;
end;
Du mußt das ganze natürlich auf Deine Gegebenheiten anpassen.
Lars Tiefland
Live Long And Prosper,
Lars Tiefland
admin at GBS, a Mod for STEF2, New mod versions and support!
Download Opera 8
  Mit Zitat antworten Zitat