unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TKonsole_Form =
class(TForm)
Konsole_Edit: TEdit;
Konsole_Memo: TMemo;
Konsole_Button: TButton;
procedure Konsole_ButtonClick(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
type
TFormelsammlung =
class(TObject)
{Variablen}
Var_Konsole_Layout_Form_color_Background,
Var_Konsole_Layout_Form_color_Background_Change1,
Var_Konsole_Layout_Form_color_Background_Change2,
Var_Konsole_Layout_Form_color_Background_Change3 :
String;
{Methoden}
Constructor Create;
procedure Set_Konsole_Layout_Form_color_Background (Txt:
String);
function Get_Konsole_Layout_Form_color_Background :
String;
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Konsole_Form: TKonsole_Form;
Formelsammlung: TFormelsammlung;
Eingabe :
String;
implementation
{$R *.dfm}
Constructor TFormelsammlung.Create;
begin
inherited Create;
end;
procedure TFormelsammlung.Set_Konsole_Layout_Form_color_Background(Txt:
string);
begin
Var_Konsole_Layout_Form_color_Background := (Txt);
Var_Konsole_Layout_Form_color_Background_Change1 := copy(Var_Konsole_Layout_Form_color_Background, 1, 2);
Var_Konsole_Layout_Form_color_Background_Change2 := copy(Var_Konsole_Layout_Form_color_Background, 3, 4);
Var_Konsole_Layout_Form_color_Background_Change3 := copy(Var_Konsole_Layout_Form_color_Background, 5, 6);
Var_Konsole_Layout_Form_color_Background := '
$' + Var_Konsole_Layout_Form_color_Background_Change3 + Var_Konsole_Layout_Form_color_Background_Change2 + Var_Konsole_Layout_Form_color_Background_Change1;
end;
function TFormelsammlung.Get_Konsole_Layout_Form_color_Background;
begin
Konsole_Form.Color := (stringtocolor (Var_Konsole_Layout_Form_color_Background));
end;
procedure TKonsole_Form.Konsole_ButtonClick(Sender: TObject);
begin
Formelsammlung.Set_Konsole_Layout_Form_color_Background (Konsole_Edit.Text);
Formelsammlung.Get_Konsole_Layout_Form_color_Background;
end;
end.