Mam taki problemik. Nie potrafie napisać prawidłowek konstrukcji
if/the/else/end
itd. Chodzi o 3 Radio Buttony ( PasswordRadioButton, ROT13RadioButton oraz XorRadioButton) w zależności od naciśnietego mam do wyboru 3 rzeczy. Proszę spróbujcie to uporządkować !
procedure TForm1.CryptButtonClick(Sender: TObject);
var j,k:integer; znak:char; tekst:string;
begin
If PasswordRadioButton.Checked Then
if Edit2.Text='' then begin Application.MessageBox('Type password','Crypter',48); exit; end;
ZmienZnakiNaKlucze;
k:=1;
tekst:=Memo2.Lines.Text;
for j:=1 to Length(tekst) do begin
znak:= tekst[j];
znak :=Chr((Ord(znak)+13) xor Klucz[k]);
tekst[j]:=znak;
if znak=#0 then begin memo1.Lines.Clear;
Application.MessageBox('Nie można odszyfrować tym hasłem','Błąd - złe hasło',16); exit; end;
inc(k);
if k=length(haslo)+1 then k:=1;
Memo1.Lines.Text:= tekst;
end;
If ROT13RadioButton.Checked Then
Memo1.Text:=CoderRot13(Memo2.Text);
If XorRadioButton.Checked Then
ShowMessage('Xor Avaliable Only For Bosses');
end;