Changeset 36 for trunk/Forms
- Timestamp:
- Jan 1, 2018, 8:57:03 PM (7 years ago)
- Location:
- trunk/Forms
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UMainForm.lfm
r34 r36 5 5 Width = 514 6 6 Caption = 'Tunneler' 7 ClientHeight = 3 837 ClientHeight = 378 8 8 ClientWidth = 514 9 9 Menu = MainMenu1 … … 15 15 OnKeyUp = FormKeyUp 16 16 OnShow = FormShow 17 LCLVersion = '1. 5'17 LCLVersion = '1.8.0.4' 18 18 object StatusBar1: TStatusBar 19 19 Left = 0 20 Height = 2921 Top = 3 5420 Height = 30 21 Top = 348 22 22 Width = 514 23 23 Panels = < … … 47 47 object Image1: TImage 48 48 Left = 0 49 Height = 3 5449 Height = 348 50 50 Top = 0 51 51 Width = 514 … … 135 135 VersionMinor = 0 136 136 VersionBugFix = 0 137 VersionSuffix = 'alfa' 137 138 CompanyName = 'Chronosoft' 138 139 HomePage = 'http://svn.zdechov.net/trac/Tunneler/' … … 140 141 EmailContact = 'robie@centrum.cz' 141 142 AppName = 'Tunneler' 142 ReleaseDate = 4 1160143 ReleaseDate = 43064 143 144 RegistryKey = '\Software\Chronosoft\Tunneler' 144 145 RegistryRoot = rrKeyCurrentUser 146 License = 'CC0' 145 147 left = 99 146 148 top = 176 147 149 end 150 object XMLConfig1: TXMLConfig 151 StartEmpty = False 152 RootName = 'CONFIG' 153 ReadOnly = False 154 left = 99 155 top = 240 156 end 148 157 end -
trunk/Forms/UMainForm.pas
r34 r36 6 6 7 7 uses 8 Registry, Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls, 9 ComCtrls, Menus, ActnList, UCore, UPlatform, Math, DateUtils, GraphType, 10 UPersistentForm, UApplicationInfo, UCoolTranslator, LCLType, URegistry; 8 Registry, XMLConf, Classes, SysUtils, FileUtil, Forms, Controls, Graphics, 9 Dialogs, ExtCtrls, ComCtrls, Menus, ActnList, UCore, UPlatform, Math, 10 DateUtils, GraphType, UPersistentForm, UApplicationInfo, UCoolTranslator, 11 LCLType, URegistry; 11 12 12 13 type … … 37 38 TimerDraw: TTimer; 38 39 TimerEngineTick: TTimer; 40 XMLConfig1: TXMLConfig; 39 41 procedure AExitExecute(Sender: TObject); 40 42 procedure AFullScreenExecute(Sender: TObject); … … 60 62 DrawDuration: TDateTime; 61 63 Drawing: Boolean; 64 procedure LoadConfig; 65 procedure SaveConfig; 62 66 public 63 67 PersistentForm: TPersistentForm; … … 110 114 end; 111 115 116 procedure TMainForm.LoadConfig; 117 begin 118 if not FileExists(XMLConfig1.Filename) then Exit; 119 if Assigned(Engine) then Engine.LoadConfig(XMLConfig1, ''); 120 end; 121 122 procedure TMainForm.SaveConfig; 123 begin 124 if Assigned(Engine) then Engine.SaveConfig(XMLConfig1, ''); 125 XMLConfig1.Flush; 126 end; 127 112 128 procedure TMainForm.EraseBackground(DC: HDC); 113 129 begin … … 117 133 procedure TMainForm.FormCreate(Sender: TObject); 118 134 begin 135 XMLConfig1.Filename := GetAppConfigDir(False) + 'Config.xml'; 136 119 137 PersistentForm := TPersistentForm.Create(nil); 120 138 PersistentForm.RegistryContext := RegContext(HKEY(ApplicationInfo1.RegistryRoot), … … 126 144 Engine := TEngine.Create; 127 145 Engine.Bitmap := Image1.Picture.Bitmap; 146 LoadConfig; 128 147 Engine.NewGame; 129 148 Engine.Active := True; … … 193 212 begin 194 213 PersistentForm.Save(Self); 214 SaveConfig; 195 215 end; 196 216 -
trunk/Forms/UNewGameForm.lfm
r34 r36 120 120 end 121 121 object EditDown: TEdit 122 Left = 8 8122 Left = 86 123 123 Height = 36 124 124 Top = 32 … … 186 186 Width = 176 187 187 OnChange = EditNameChange 188 OnKeyDown = EditUpKeyDown189 188 TabOrder = 4 190 189 end
Note:
See TracChangeset
for help on using the changeset viewer.