2021-08-27 10:33:36 +03:00
|
|
|
unit fm_new;
|
|
|
|
|
|
|
|
{$mode objfpc}{$H+}
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses
|
2024-04-17 14:27:05 +03:00
|
|
|
Forms, StdCtrls, Buttons, Spin, ExtCtrls,
|
|
|
|
fm_settings,
|
|
|
|
u_strings, config_record;
|
2021-08-27 10:33:36 +03:00
|
|
|
|
|
|
|
type
|
|
|
|
|
|
|
|
{ TfmNew }
|
|
|
|
|
|
|
|
TfmNew = class(TForm)
|
|
|
|
bbOK: TBitBtn;
|
|
|
|
cbEncoding: TComboBox;
|
|
|
|
edFontName: TEdit;
|
|
|
|
edAuthor: TEdit;
|
|
|
|
lbEncoding: TLabel;
|
|
|
|
lbFontName1: TLabel;
|
|
|
|
lbFontName2: TLabel;
|
|
|
|
lbWidth: TLabel;
|
|
|
|
lbHeight: TLabel;
|
|
|
|
lbFontName: TLabel;
|
|
|
|
lbAuthor: TLabel;
|
|
|
|
lbStartItem: TLabel;
|
|
|
|
lbLastItem: TLabel;
|
|
|
|
pEncoding: TPanel;
|
|
|
|
pValues: TPanel;
|
|
|
|
pRange: TPanel;
|
|
|
|
pSizes: TPanel;
|
|
|
|
pMain: TPanel;
|
|
|
|
pControls: TPanel;
|
|
|
|
pName: TPanel;
|
|
|
|
pAuthor: TPanel;
|
|
|
|
seLastItem: TSpinEdit;
|
|
|
|
seWidth: TSpinEdit;
|
|
|
|
seHeight: TSpinEdit;
|
|
|
|
seStartItem: TSpinEdit;
|
|
|
|
|
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
|
procedure seLastItemChange(Sender: TObject);
|
|
|
|
procedure seStartItemChange(Sender: TObject);
|
|
|
|
end;
|
|
|
|
|
|
|
|
var
|
|
|
|
fmNew: TfmNew;
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
{$R *.lfm}
|
|
|
|
|
|
|
|
{ TfmNew }
|
|
|
|
|
|
|
|
procedure TfmNew.FormShow(Sender: TObject);
|
|
|
|
begin
|
|
|
|
cbEncoding.Items.Assign(fmSettings.cbEncoding.Items);
|
2024-04-17 14:27:05 +03:00
|
|
|
cbEncoding.ItemIndex := cfg.new.enc;
|
|
|
|
seWidth.Value := cfg.new.w;
|
|
|
|
seHeight.Value := cfg.new.h;
|
|
|
|
seStartItem.Value := cfg.new.start;
|
|
|
|
seLastItem.Value := cfg.new.last;
|
|
|
|
edFontName.Text := cfg.new.title;
|
|
|
|
edAuthor.Text := cfg.new.author;
|
2021-08-27 10:33:36 +03:00
|
|
|
edFontName.TextHint := lbFontName.Caption;
|
|
|
|
edAuthor.TextHint := lbAuthor.Caption;
|
2024-04-18 20:48:47 +03:00
|
|
|
|
|
|
|
// fix image of button
|
|
|
|
bbOK.ImageIndex := 0;
|
|
|
|
bbOK.ImageIndex := 44;
|
2021-08-27 10:33:36 +03:00
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TfmNew.seLastItemChange(Sender: TObject);
|
|
|
|
begin
|
|
|
|
seStartItem.MaxValue := seLastItem.Value;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TfmNew.seStartItemChange(Sender: TObject);
|
|
|
|
begin
|
|
|
|
seLastItem.MinValue := seStartItem.Value;
|
|
|
|
end;
|
|
|
|
|
|
|
|
end.
|