-
Notifications
You must be signed in to change notification settings - Fork 0
/
ABLENDUN.PAS
72 lines (64 loc) · 1.62 KB
/
ABLENDUN.PAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
unit ablendun;
interface
uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
Buttons, ExtCtrls, ComCtrls,Registry;
type
TablendDLG = class(TForm)
OKBtn: TButton;
CancelBtn: TButton;
Bevel: TBevel;
AICAP: TLabel;
ICMB: TComboBox;
PSRCCAP: TLabel;
ped: TEdit;
pud: TUpDown;
pcap: TLabel;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
ablendDLG: TablendDLG;
function ShowABLENDDlG(var MDIIndex : integer; var Grade : byte) : integer;
implementation
{$R *.DFM}
uses dpemform,photo;
function ShowABLENDDlG(var MDIIndex : integer; var Grade : byte) : integer;
begin
with TABLENDDlg.Create(Application) do
try
result := ShowModal;
if Result = mrOK then
begin
MDIIndex := ICMB.ItemIndex;
Grade := pud.Position;
RegIniFile := TRegIniFile.Create(DPEIniName);
RegIniFile.WriteInteger('AlphaBlend','Percent',PUD.Position);
RegIniFile.Free;
end;
finally
Free;
end;
end;
procedure TablendDLG.FormCreate(Sender: TObject);
var i : integer;
t : TFPhoto;
begin
RegIniFile := TRegIniFile.Create(DPEIniName);
PUD.Position := RegIniFile.ReadInteger('AlphaBlend','Percent',50);
RegIniFile.Free;
for I := 0 to DPEMain.MDIChildCount-1 do
begin
t := TFPhoto(DPEMain.MDIChildren[i]);
ICMB.Items.Add(t.Caption);
end;
{if ICMB.Items.Count = 1 then
begin
Application.MessageBox('There must be at least 2 24 bit opened images to perform this operation!',PChar(Application.Title),MB_ICONHAND);
Close;
end;}
ICMB.ItemIndex := 0;
end;
end.