|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, | |
Dialogs, StdCtrls; | |
TFormGeneral = class(TForm) | |
ButtonOtions: TButton; | |
ButtonAbout: TButton; | |
ButtonExit: TButton; | |
LabelString: TLabel; | |
EditLine: TEdit; | |
LabelOut: TLabel; | |
procedure EditLineChange(Sender: TObject); | |
procedure ButtonExitClick(Sender: TObject); | |
procedure ButtonAboutClick(Sender: TObject); | |
procedure ButtonOtionsClick(Sender: TObject); | |
{ Private declarations } | |
{ Public declarations } | |
FormGeneral: TFormGeneral; | |
procedure TFormGeneral.EditLineChange(Sender: TObject); | |
//âû÷èñëÿåì äëèíó è çàïèñûâàåì åå â LABELOUT | |
L:=length(EditLine.Text); | |
LabelOut.Caption:='Äëèíà ñòðîêè = '+IntToStr(L); | |
procedure TFormGeneral.ButtonExitClick(Sender: TObject); | |
procedure TFormGeneral.ButtonAboutClick(Sender: TObject); | |
FormAbout.ShowModal; | |
procedure TFormGeneral.ButtonOtionsClick(Sender: TObject); | |
FormOptions.Show; | |
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, | |
Dialogs, StdCtrls; | |
TFormOptions = class(TForm) | |
GroupBox: TGroupBox; | |
RadioButton1: TRadioButton; | |
RadioButton2: TRadioButton; | |
RadioButton3: TRadioButton; | |
RadioButton4: TRadioButton; | |
RadioButton5: TRadioButton; | |
Label1: TLabel; | |
EditCaption: TEdit; | |
ButtonOk: TButton; | |
ButtonCancel: TButton; | |
procedure ButtonCancelClick(Sender: TObject); | |
procedure ButtonOkClick(Sender: TObject); | |
{ Private declarations } | |
{ Public declarations } | |
FormOptions: TFormOptions; | |
procedure TFormOptions.ButtonCancelClick(Sender: TObject); | |
FormOptions.Close; | |
procedure TFormOptions.ButtonOkClick(Sender: TObject); | |
// èçìåíåíèå öâåòà âñåõ ôîðì | |
if RadioButton1.Checked then cl:=clRed; | |
if RadioButton2.Checked then cl:=clYellow; | |
if RadioButton3.Checked then cl:=clLime; | |
if RadioButton4.Checked then cl:=clAqua; | |
if RadioButton5.Checked then cl:=clbtnFace; | |
FormGeneral.Color:=cl; | |
FormOptions.Color:=cl; | |
FormAbout.Color:=cl; | |
// ñìåíà çàãîëîâêà ãëàâíîãî îêíà | |
FormGeneral.Caption:=EditCaption.Text; | |
// çàêðûòèå îêíà îïöèé | |
FormOptions.Close; | |
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, | |
Dialogs, StdCtrls; | |
TFormAbout = class(TForm) | |
LabelAbout: TLabel; | |
LabelAutor: TLabel; | |
ButtonClose: TButton; | |
procedure ButtonCloseClick(Sender: TObject); | |
{ Private declarations } | |
{ Public declarations } | |
FormAbout: TFormAbout; | |
procedure TFormAbout.ButtonCloseClick(Sender: TObject); | |
FormAbout.Close; | |