Thema: Delphi Overload??

Einzelnen Beitrag anzeigen

kleiner Unwissender

Registriert seit: 24. Jul 2005
Ort: Rostock
188 Beiträge
 
Delphi 6 Personal
 
#6

Re: Overload??

  Alt 14. Dez 2005, 19:18
aber vorsicht! weder code, noch algorithmus sind optimiert, ich hab bis jetzt nur das grundgerüst.
verbessern werd ich wenn ich fertig bin.

Delphi-Quellcode:
 procedure FormActivate(Sender: TObject);
    procedure Sclieen1Click(Sender: TObject);
    procedure CBSp1Click(Sender: TObject);
    procedure CBSp2Click(Sender: TObject);
    procedure CBSp3Click(Sender: TObject);
    procedure CBSp4Click(Sender: TObject);
    procedure Mannschaften_zuweisen;
    procedure GruppeA1Click(Sender: TObject);
    procedure GruppeB1Click(Sender: TObject);
    procedure GruppeC1Click(Sender: TObject);
    procedure GruppeD1Click(Sender: TObject);
    procedure GruppeE1Click(Sender: TObject);
    procedure GruppeF1Click(Sender: TObject);
    procedure GruppeG1Click(Sender: TObject);
    procedure GruppeH1Click(Sender: TObject);
    procedure CBSp5Click(Sender: TObject);
    procedure CBSp6Click(Sender: TObject);
    procedure TabelleA;
    procedure ergebnis_berechnenSp1;
    procedure ergebnis_berechnenSp2;
    procedure ergebnis_berechnenSp3;
    procedure ergebnis_berechnenSp4;
    procedure ergebnis_berechnenSp5;
    procedure ergebnis_berechnenSp6;
    procedure TabelleA;
    procedure Button1Click(Sender: TObject);
Delphi-Quellcode:
procedure TForm1.TabelleA;
begin
        plzM1:=1;
        plzM2:=1;
        plzM3:=1;
        plzM4:=1;
        if PuM1 > PuM2 then
          plzM1:=plzM1+1;
        if PuM2 > PuM1 then
          plzM2:=plzM2+1;
        if PuM1 = PuM2 then
          begin
           if mintoreM1 > mintoreM2 then
               plzM1:=plzM1+1
           else
            begin
            if mintoreM2 > mintoreM1 then
               plzM2:=plzM2+1
            else
              begin
               if toreM1 > toreM2 then
                 plzM1:=plzM1+1
               else
                 plzM2:=plzM2+1
               end
              end
            end;

        if PuM1 > PuM3 then
          plzM1:=plzM1+1;
        if PuM3 > PuM1 then
          plzM3:=plzM3+1;
        if PuM1 = PuM3 then
          begin
           if mintoreM1 > mintoreM3 then
               plzM1:=plzM1+1
           else
            begin
            if mintoreM3 > mintoreM1 then
               plzM3:=plzM3+1
            else
              begin
               if toreM1 > toreM3 then
                 plzM1:=plzM1+1
               else
                 plzM3:=plzM3+1
               end
              end
            end;


        if PuM1 > PuM4 then
          plzM1:=plzM1+1;
        if PuM4 > PuM1 then
          plzM4:=plzM4+1;
        if PuM1 = PuM4 then
          begin
           if mintoreM1 > mintoreM4 then
               plzM1:=plzM1+1
           else
            begin
            if mintoreM4 > mintoreM1 then
               plzM4:=plzM4+1
            else
              begin
               if toreM1 > toreM4 then
                 plzM1:=plzM1+1
               else
                 plzM4:=plzM4+1
               end
              end
            end;


        if PuM2 > PuM3 then
          plzM2:=plzM2+1;
        if PuM3 > PuM2 then
          plzM3:=plzM3+1;
        if PuM2 = PuM3 then
          begin
           if mintoreM2 > mintoreM3 then
               plzM2:=plzM2+1
           else
            begin
            if mintoreM3 > mintoreM2 then
               plzM3:=plzM3+1
            else
              begin
               if toreM2 > toreM3 then
                 plzM2:=plzM2+1
               else
                 plzM3:=plzM3+1
               end
              end
            end;

        if PuM2 > PuM4 then
          plzM2:=plzM2+1;
        if PuM4 > PuM2 then
          plzM4:=plzM4+1;
        if PuM2 = PuM4 then
          begin
           if mintoreM2 > mintoreM4 then
               plzM2:=plzM2+1
           else
            begin
            if mintoreM4 > mintoreM2 then
               plzM4:=plzM4+1
            else
              begin
               if toreM2 > toreM4 then
                 plzM2:=plzM2+1
               else
                 plzM4:=plzM4+1
               end
              end
            end;

        if PuM3 > PuM4 then
          plzM3:=plzM3+1;
        if PuM4 > PuM3 then
          plzM4:=plzM4+1;
        if PuM3 = PuM4 then
          begin
           if mintoreM3 > mintoreM4 then
               plzM3:=plzM3+1
           else
            begin
            if mintoreM4 > mintoreM3 then
               plzM4:=plzM4+1
            else
              begin
               if toreM3 > toreM4 then
                 plzM3:=plzM3+1
               else
                 plzM4:=plzM4+1
               end
              end
            end;

        case plzM1 of
         1: begin
             LbMannschaft4.Caption:=m1;
             label8.Caption:=floattostr(puM1);
            end;
         2: begin
             LbMannschaft3.Caption:=m1;
             label7.Caption:=floattostr(puM1);
            end;
         3: begin
             LbMannschaft2.Caption:=m1;
             label6.Caption:=floattostr(puM1);
            end;
         4: begin
             LbMannschaft1.Caption:=m1;
             label5.Caption:=floattostr(puM1);
            end;
        end;

        case plzM2 of
         1: begin
             LbMannschaft4.Caption:=m2;
             label8.Caption:=floattostr(puM2);
            end;
         2: begin
             LbMannschaft3.Caption:=m2;
             label7.Caption:=floattostr(puM2);
            end;
         3: begin
             LbMannschaft2.Caption:=m2;
             label6.Caption:=floattostr(puM2);
            end;
         4: begin
             LbMannschaft1.Caption:=m2;
             label5.Caption:=floattostr(puM2);
            end;
        end;

        case plzM3 of
         1: begin
             LbMannschaft4.Caption:=m3;
             label8.Caption:=floattostr(puM3);
            end;
         2: begin
             LbMannschaft3.Caption:=m3;
             label7.Caption:=floattostr(puM3);
            end;
         3: begin
             LbMannschaft2.Caption:=m3;
             label6.Caption:=floattostr(puM3);
            end;
         4: begin
             LbMannschaft1.Caption:=m3;
             label5.Caption:=floattostr(puM3);
            end;
        end;

        case plzM4 of
         1: begin
             LbMannschaft4.Caption:=m4;
             label8.Caption:=floattostr(puM4);
            end;
         2: begin
             LbMannschaft3.Caption:=m4;
             label7.Caption:=floattostr(puM4);
            end;
         3: begin
             LbMannschaft2.Caption:=m4;
             label6.Caption:=floattostr(puM4);
            end;
         4: begin
             LbMannschaft1.Caption:=m4;
             label5.Caption:=floattostr(puM4);
            end;
        end;
end;
never change a running system
  Mit Zitat antworten Zitat