-
Notifications
You must be signed in to change notification settings - Fork 3
/
LevEdit.dpr
62 lines (55 loc) · 1.7 KB
/
LevEdit.dpr
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
program LevEdit;
uses
Windows,
{$IF CompilerVersion >= 23.0}
System.UITypes,
{$IFEND }
Forms,
Dialogs,
SysUtils,
LevMain in 'LevMain.pas' {MainForm},
LevSplash in 'LevSplash.pas' {SplashForm},
LevSpeicherung in 'LevSpeicherung.pas' {SpeicherungForm},
ComInfo in 'ComInfo.pas' {InfoForm},
LevOptions in 'LevOptions.pas' {LevelForm},
ComLevelReader in 'ComLevelReader.pas',
Global in 'Global.pas',
ComHilfe in 'ComHilfe.pas' {HilfeForm};
{$R *.RES}
var
Sem: THandle;
resourcestring
SAlreadyStarted = 'Der Editor wurde bereits gestartet.';
STitel = 'SpaceMission Level-Editor';
SFileMissing = '%s fehlt. Bitte installieren Sie SpaceMission erneut.';
const
SemaphoreName = 'SpaceMission Level Editor';
begin
SpaceMission_SwitchLanguage;
{ Programm schon gestartet? }
Sem := CreateSemaphore(nil, 0, 1, SemaphoreName);
if (Sem <> 0) and (GetLastError = ERROR_ALREADY_EXISTS) then
begin
CloseHandle(Sem);
MessageDlg(SAlreadyStarted, mtInformation, [mbOK], 0);
exit;
end;
SplashForm := TSplashForm.Create(Application);
SplashForm.Show;
SplashForm.Update;
Application.Initialize;
Application.ShowMainform := False;
Application.MainFormOnTaskBar := true;
Application.Title := STitel;
if not fileexists(OwnDirectory+DxgFile) then
begin
MessageDLG(Format(SFilemissing, [DxgFile]), mtError, [mbOK], 0);
exit;
end;
Application.CreateForm(TMainForm, MainForm);
Application.CreateForm(TSpeicherungForm, SpeicherungForm);
Application.CreateForm(TInfoForm, InfoForm);
Application.CreateForm(TLevelForm, LevelForm);
Application.CreateForm(THilfeForm, HilfeForm);
Application.Run;
end.