-
Notifications
You must be signed in to change notification settings - Fork 0
/
unit6.pas
95 lines (77 loc) · 2.01 KB
/
unit6.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
unit Unit6;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, EditBtn, Menus,Unit5;
type
{ TForm6 }
TForm6 = class(TForm)
Button1: TButton;
Button2: TButton;
ComboBox3: TComboBox;
Edit3: TEdit;
FileNameEdit1: TFileNameEdit;
Label5: TLabel;
MainMenu1: TMainMenu;
MenuItem1: TMenuItem;
MenuItem2: TMenuItem;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure ComboBox3Change(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure MenuItem1Click(Sender: TObject);
procedure MenuItem2Click(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form6: TForm6;
implementation
{ TForm6 }
procedure TForm6.ComboBox3Change(Sender: TObject);
begin
if ComboBox3.ItemIndex=0 then
begin
FileNameEdit1.Visible:=false;
Edit3.Visible:=true;
end
else
begin
FileNameEdit1.Visible:=true;
Edit3.Visible:=false;
end;
end;
procedure TForm6.FormShow(Sender: TObject);
begin
ComboBox3.ItemIndex:=Form5.ComboBox3.ItemIndex;
if Form5.ComboBox3.ItemIndex=0 then Edit3.Text:=Form5.Edit3.Text
else FileNameEdit1.FileName:=Form5.FileNameEdit1.FileName;
ComboBox3Change(Sender);
end;
procedure TForm6.MenuItem1Click(Sender: TObject);
begin
Button1Click(Sender);
end;
procedure TForm6.MenuItem2Click(Sender: TObject);
begin
Button2Click(Sender);
end;
procedure TForm6.Button1Click(Sender: TObject);
begin
Form5.ComboBox3.ItemIndex:=ComboBox3.ItemIndex;
if ComboBox3.ItemIndex=0 then Form5.Edit3.Text:=Edit3.Text
else Form5.FileNameEdit1.FileName:=FileNameEdit1.FileName;
Form5.ComboBox3Change(Sender);
Form5.Button1Click(Sender);
if odp=mrYes then close;
end;
procedure TForm6.Button2Click(Sender: TObject);
begin
close;
end;
initialization
{$I unit6.lrs}
end.