Einzelnen Beitrag anzeigen

ScrollbarKopf

Registriert seit: 17. Okt 2007
154 Beiträge
 
#1

Timer programmieren

  Alt 19. Dez 2007, 16:12

Ähm Hallo Leute geht um folgendes habe an den Letzten tagen an einer art lotto gearbeitet jetzt möchte ich gerne einen timer programmieren der alle 48 stunden den gewiiner sagt das er gewonnen aht und den verlierern das sie verloren haben wenn man auf den button ziehung drückt soll er die zahlen aufnehmen sagen ok und wenn die zeit aus ist sagen ob man gewoonen hat hier mein Code.
Delphi-Quellcode:

until (a<>b) and (a<>c) and (a<>d) and (a<>e) and (a<>f)
and (b<>a) and (b<>c) and (b<>d) and (b<>e) and (b<>f)
and (c<>a) and (c<>b) and (c<>d) and (c<>d) and (c<>f)
and (d<>a) and (d<>b) and (d<>c) and (d<>e) and (d<>f)
and (e<>a) and (e<>b) and (e<>c) and (e<>d) and (e<>f)
and (f<>a) and (f<>b) and (f<>c) and (f<>d) and (f<>e);

edit1.Text := inttostr (a+1);
edit2.Text := inttostr (b+1);
edit3.Text := inttostr (c+1);
edit4.Text := inttostr (d+1);
edit5.Text := inttostr (e+1);
edit6.Text := inttostr (f+1);

richtige :=0;
if StrToInt( edit1.text) = StrToInt( edit7.text) then inc (richtige);
if StrToInt( Edit2.text) = StrToInt( Edit8.text) then inc (richtige);
if StrToInt( Edit3.text) = StrToInt( Edit9.text) then inc (richtige);
if StrToInt( Edit4.text) = StrToInt( Edit10.text) then inc (richtige);
if StrToInt( Edit5.text) = StrToInt( Edit11.text) then inc (richtige);
if StrToInt( Edit6.text) = StrToInt( Edit12.text) then inc (richtige);

if richtige = 6 then showmessage ('Sie haben Gewonnen');

falsche :=0;
if StrToInt( Edit1.text) <> StrToInt( Edit7.text) then inc (falsche);
if StrToInt( Edit2.text) <> StrToInt( Edit8.text) then inc (falsche);
if StrToInt( Edit3.text) <> StrToInt( Edit9.text) then inc (falsche);
if StrToInt( Edit4.text) <> StrToInt( Edit10.text) then inc (falsche);
if StrToInt( Edit5.text) <> StrToInt( Edit11.text) then inc (falsche);
if StrToInt( Edit6.text) <> StrToInt( Edit12.text) then inc (falsche);

if falsche =6 then showmessage ('Sie haben leider verloren');

end;
  Mit Zitat antworten Zitat