-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmain.pas
96 lines (75 loc) · 2.71 KB
/
main.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
{
ESCAPE, Environment for the Simulation of Computer Architectures
for the Purpose of Education
Copyright (C) 1998-2001 Peter Verplaetse, ELIS Department, Ghent University
Copyright (C) 2010-2015 Jonas Maebe, ELIS Department, Ghent University
Copyright (C) 1996-1998 Jan Van Campenhout, ELIS Department, Ghent University
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
}
{ Project: Escape }
{ Version: 1.1 }
{ Author: Peter Verplaetse }
{ Date: 22 July 1998 }
{ Note: install components in file Compos.pas before building Escape. Also,
make sure complete boolean evaluation is disabled }
unit Main;
{$MODE Delphi}
interface
uses {WinTypes, WinProcs,} SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
Buttons, ExtCtrls, LResources;
type
{ This form is used to launch the simulator or to pop up the configuration form }
TMainForm = class(TForm)
Panel2: TPanel;
Pipe: TButton;
micro: TButton;
ConfigButton: TButton;
Memo2: TMemo;
ProgramIcon: TImage;
Label1: TLabel;
procedure microClick(Sender: TObject);
procedure PipeClick(Sender: TObject);
procedure ConfigButtonClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
end;
var
MainForm: TMainForm;
implementation
uses Micro, Pipe, Config;
{$R *.lfm}
procedure TMainForm.microClick(Sender: TObject);
begin
MainForm.Hide;
Application.CreateForm(TMicroForm, MicroForm);
MicroForm.Show
end;
procedure TMainForm.PipeClick(Sender: TObject);
begin
MainForm.Hide;
Application.CreateForm(TPipeForm, PipeForm);
PipeForm.Show
end;
procedure TMainForm.ConfigButtonClick(Sender: TObject);
begin
MainForm.Hide;
ConfigForm.Show
end;
procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
{ Check if the configuration needs to be saved first }
if ConfigForm.SaveFirst then
Action:=caFree
else
{ User clicked on cancel }
Action:=caNone
end;
end.