-
Notifications
You must be signed in to change notification settings - Fork 0
/
manin.pas
126 lines (102 loc) · 2.42 KB
/
manin.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
// Copyright 2020, Kaj Mikkelsen
// This software is distributed under the GPL 3 license
// The full text of the license can be found in the aboutbox
// as well as in the file "Copying"
unit Manin;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, Menus, ActnList,
StdCtrls,Printers, ExtCtrls;
type
{ TFMain }
TFMain = class(TForm)
AAfslut: TAction;
Aabn: TAction;
AAbout: TAction;
AFejlOgWeb: TAction;
APersonliste: TAction;
AGedText: TAction;
ActionList1: TActionList;
Image1: TImage;
Label1: TLabel;
MainMenu1: TMainMenu;
MenuItem1: TMenuItem;
MenuItem2: TMenuItem;
MenuItem3: TMenuItem;
MenuItem4: TMenuItem;
MenuItem5: TMenuItem;
MenuItem7: TMenuItem;
MGEdcomSomText: TMenuItem;
N1: TMenuItem;
MOpen: TMenuItem;
MExit: TMenuItem;
OD1: TOpenDialog;
procedure AabnExecute(Sender: TObject);
procedure AAboutExecute(Sender: TObject);
procedure AAfslutExecute(Sender: TObject);
procedure AFejlOgWebExecute(Sender: TObject);
procedure APersonlisteExecute(Sender: TObject);
procedure AGedTextExecute(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
public
end;
var
FMain: TFMain;
implementation
{$R *.lfm}
Uses
MyLib,UGedText,upersonliste,UAbout,UMailOgWeb;
{ TFMain }
procedure TFMain.AAfslutExecute(Sender: TObject);
begin
Application.terminate;
end;
procedure TFMain.AFejlOgWebExecute(Sender: TObject);
begin
FMailOgWeb.ShowModal;
end;
procedure TFMain.APersonlisteExecute(Sender: TObject);
begin
If Od1.FileName <> '' Then
Begin
FpersonListe.FileName := OD1.Filename;
FPersonliste.DoIndles := True;
Fpersonliste.Show;
end
else
ShowMessage('Vælg gedcom fil først');
end;
procedure TFMain.AGedTextExecute(Sender: TObject);
begin
If Od1.FileName <> '' Then
Begin
Ftext.Label1.Caption:= OD1.FileName;
FText.Memo1.Lines.LoadFromFile(OD1.FileName);
FText.Show;
end
else
ShowMessage('Vælg gedcom fil først');
end;
procedure TFMain.FormCreate(Sender: TObject);
begin
RestoreForm(FMain);
end;
procedure TFMain.FormDestroy(Sender: TObject);
begin
SaveForm(FMain);
end;
procedure TFMain.AabnExecute(Sender: TObject);
begin
If OD1.Execute Then
Begin
APersonliste.Execute;
end;
end;
procedure TFMain.AAboutExecute(Sender: TObject);
begin
FAbout.ShowModal;
end;
end.