Einzelnen Beitrag anzeigen

dominikkv

Registriert seit: 30. Sep 2006
Ort: Gundelfingen
1.109 Beiträge
 
Delphi 2007 Professional
 
#34

Re: problem mit else nach end

  Alt 20. Feb 2008, 22:54
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
begin
  Name:= edit1.Text;
  Clan_Tag:= edit2.Text;
  ip:= edit3.text;
  port:= edit4.text;
  D_Name:= InputBox('Dateiname', 'Bitte Dateinamen eingeben!', 'Link');
  AssignFile(F, d_name + '.txt');
  check_n;
  check_c;
  Rewrite(F);



  if RadioButton2.Checked then
    begin
      if CheckBox1.Checked then
        Writeln(F, '[center][url=http://www.gametracker.com/server_info/'+
                   '89.202.196.35:16570/][img]http://cache.www.gametracker.com'+
                   '/server_info/89.202.196.35:16570/b_350x20_C692108-381007-'+
                   'FFFFFF-000000.png[/img][/url][/center]');
    end;



  begin {warum mit begin..end?}
    if CheckBox2.Checked then
      Writeln(F, '[center][url=http://www.2142-stats.de/'+ name +
                 '+stats.html][img]http://sigs.2142-stats.com/' + name +
                 '_player_31422.png[/img][/url][/center]');
  end;



  begin {warum mit begin..end?}
    if checkBox3.Checked then
      If ( Trim(Edit2.Text) <> '' ) Then
        Writeln(F, '[center][url=http://www.gametracker.com/server/' + IP +
                   ':' + port + '/player/' + clan_tag + '%20' + name +
                   '/][img]http://cache.www.gametracker.com/player/'+ clan_Tag +
                   '%20' + name + '/' + IP + ':' + port +
                   '/b_560x95.png[/img][/url][/center]')
        else
        Writeln(F, '[center][url=http://www.gametracker.com/server/' + IP +
                   ':' + port + '/player/' + name +
                   '/][img]http://cache.www.gametracker.com/player/' + name +
                   '/' + IP + ':' + port + '/b_560x95.png[/img][/url][/center]');
  end;




  end {wtf?}
  else




  begin {warum mit begin..end?}
    if form1.CheckBox1.Checked then
      Writeln(F, '<p align="center"><a href="http://www.gametracker.com/'+
                 'server_info/' + IP + ':' + port + '/"><img border="0" '+
                 'src="http://cache.www.gametracker.com/server_info/' + IP +
                 ':' + port + '/b_350x20_C692108-381007-FFFFFF-000000.png"></a></p>');
  end;




  begin {warum mit begin..end?}
    if form1.CheckBox2.Checked then
      Writeln(F, '<p align="center"><a href="http://www.2142-stats.de/' + name +
                 '+stats.html"><img border="0" src="http://sigs.2142-stats.com/' + name +
                 '_player_31422.png"></a></p>');
  end;



  begin {warum mit begin..end?}
    if form1.checkBox3.Checked then
      If ( Trim(form1.Edit2.Text) <> '' ) Then
        Writeln(F, '<p align="center"><a href="http://www.gametracker.com/server/' + IP +
                   ':' + port + '/player/' + clan_tag + '%20' + name +
                   '/"><img border="0" src="http://cache.www.gametracker.com/player/'+ clan_Tag +
                   '%20' + name + '/' + IP + ':' + port + '/b_560x95.png"></a></p>')
        else
        Writeln(F, '<p align="center"><a href="http://www.gametracker.com/server/' + IP +
                   ':' + port + '/player/' + name +
                   '/"><img border="0" src="http://cache.www.gametracker.com/player/' + name +
                   '/' + IP + ':' + port +'/b_560x95.png"></a></p>')
  end;





  end; {und was macht hier?}




  CloseFile(F);
  MessageDlg('Datei "' + d_name + '.txt" wurde erstellt', mtInformation,
  [mbOk], 0);
  close;
end;
Dominik
Wer anderen eine Grube gräbt, hat ein Gruben-Grab-Gerät!
  Mit Zitat antworten Zitat