Rev 80 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | daniel-mar | 1 | program LevEdit; |
2 | |||
3 | uses |
||
4 | Windows, |
||
27 | daniel-mar | 5 | {$IF CompilerVersion >= 23.0} |
6 | System.UITypes, |
||
7 | {$IFEND } |
||
1 | daniel-mar | 8 | Forms, |
9 | Dialogs, |
||
10 | SysUtils, |
||
11 | LevMain in 'LevMain.pas' {MainForm}, |
||
12 | LevSplash in 'LevSplash.pas' {SplashForm}, |
||
13 | LevSpeicherung in 'LevSpeicherung.pas' {SpeicherungForm}, |
||
3 | daniel-mar | 14 | ComInfo in 'ComInfo.pas' {InfoForm}, |
2 | daniel-mar | 15 | LevOptions in 'LevOptions.pas' {LevelForm}, |
14 | daniel-mar | 16 | ComLevelReader in 'ComLevelReader.pas', |
63 | daniel-mar | 17 | Global in 'Global.pas', |
18 | ComHilfe in 'ComHilfe.pas' {HilfeForm}; |
||
1 | daniel-mar | 19 | |
20 | {$R *.RES} |
||
21 | |||
22 | var |
||
23 | Sem: THandle; |
||
24 | |||
80 | daniel-mar | 25 | resourcestring |
26 | SAlreadyStarted = 'Der Editor wurde bereits gestartet.'; |
||
27 | STitel = 'SpaceMission Leveleditor'; |
||
28 | SFileMissing = '%s fehlt. Bitte installieren Sie SpaceMission erneut.'; |
||
29 | |||
30 | const |
||
31 | SemaphoreName = 'SpaceMission Leveleditor'; |
||
32 | |||
1 | daniel-mar | 33 | begin |
34 | { Programm schon gestartet? } |
||
80 | daniel-mar | 35 | Sem := CreateSemaphore(nil, 0, 1, SemaphoreName); |
1 | daniel-mar | 36 | if (Sem <> 0) and (GetLastError = ERROR_ALREADY_EXISTS) then |
37 | begin |
||
38 | CloseHandle(Sem); |
||
80 | daniel-mar | 39 | MessageDlg(SAlreadyStarted, mtInformation, [mbOK], 0); |
1 | daniel-mar | 40 | exit; |
41 | end; |
||
42 | SplashForm := TSplashForm.Create(Application); |
||
43 | SplashForm.Show; |
||
24 | daniel-mar | 44 | SplashForm.Update; |
1 | daniel-mar | 45 | Application.Initialize; |
25 | daniel-mar | 46 | Application.ShowMainform := False; |
47 | Application.MainFormOnTaskBar := true; |
||
80 | daniel-mar | 48 | Application.Title := STitel; |
49 | if not fileexists(OwnDirectory+DxgFile) then |
||
1 | daniel-mar | 50 | begin |
80 | daniel-mar | 51 | MessageDLG(Format(SFilemissing, [DxgFile]), mtError, [mbOK], 0); |
1 | daniel-mar | 52 | exit; |
53 | end; |
||
54 | Application.CreateForm(TMainForm, MainForm); |
||
55 | Application.CreateForm(TSpeicherungForm, SpeicherungForm); |
||
56 | Application.CreateForm(TInfoForm, InfoForm); |
||
57 | Application.CreateForm(TLevelForm, LevelForm); |
||
63 | daniel-mar | 58 | Application.CreateForm(THilfeForm, HilfeForm); |
1 | daniel-mar | 59 | Application.Run; |
60 | end. |
||
61 |