Hab hier diesen Code und bin mir sicher diesen kann man etwas komprimieren, spricht vereinfachen, wer zeig mir wie? Danke im Voraus!
Delphi-Quellcode:
if Background='Blue' then
begin
Image3.Picture:=Image23.Picture;
Blue1.Checked:=True;
Vista1.Checked:=False;
Red1.Checked:=False;
Black1.Checked:=False;
Win71.Checked:=False;
Light1.Checked:=False;
Blue1.Enabled:=False;
Vista1.Enabled:=True;
Red1.Enabled:=True;
Black1.Enabled:=True;
Win71.Enabled:=True;
Light1.Enabled:=True;
Background:='Blue';
end;
if Background='Vista' then
begin
Image3.Picture:=Image22.Picture;
Blue1.Checked:=False;
Vista1.Checked:=True;
Red1.Checked:=False;
Black1.Checked:=False;
Win71.Checked:=False;
Light1.Checked:=False;
Blue1.Enabled:=True;
Vista1.Enabled:=False;
Red1.Enabled:=True;
Black1.Enabled:=True;
Win71.Enabled:=True;
Light1.Enabled:=True;
end;
if Background='Red' then
begin
Image3.Picture:=Image24.Picture;
Blue1.Checked:=False;
Vista1.Checked:=False;
Red1.Checked:=True;
Black1.Checked:=False;
Win71.Checked:=False;
Light1.Checked:=False;
Blue1.Enabled:=True;
Vista1.Enabled:=True;
Red1.Enabled:=False;
Black1.Enabled:=True;
Win71.Enabled:=True;
Light1.Enabled:=True;
end;
if Background='Black' then
begin
Image3.Picture:=Image25.Picture;
Blue1.Checked:=False;
Vista1.Checked:=False;
Red1.Checked:=False;
Black1.Checked:=True;
Win71.Checked:=False;
Light1.Checked:=False;
Blue1.Enabled:=True;
Vista1.Enabled:=True;
Red1.Enabled:=True;
Black1.Enabled:=False;
Win71.Enabled:=True;
Light1.Enabled:=True;
end;
if Background='Win7' then
begin
Image3.Picture:=Image26.Picture;
Blue1.Checked:=False;
Vista1.Checked:=False;
Red1.Checked:=False;
Black1.Checked:=False;
Win71.Checked:=True;
Light1.Checked:=False;
Blue1.Enabled:=True;
Vista1.Enabled:=True;
Red1.Enabled:=True;
Black1.Enabled:=True;
Win71.Enabled:=False;
Light1.Enabled:=True;
end;
if Background='Light' then
begin
Image3.Picture:=Image27.Picture;
Blue1.Checked:=False;
Vista1.Checked:=False;
Red1.Checked:=False;
Black1.Checked:=False;
Win71.Checked:=False;
Light1.Checked:=True;
Blue1.Enabled:=True;
Vista1.Enabled:=True;
Red1.Enabled:=True;
Black1.Enabled:=True;
Win71.Enabled:=True;
Light1.Enabled:=False;
end;