Changeset 28 for trunk/UCore.pas
- Timestamp:
- Sep 10, 2022, 10:21:48 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r26 r28 87 87 procedure TCore.ADatabaseConnectExecute(Sender: TObject); 88 88 begin 89 if FormDatabases.ShowModal = mrOk then begin 90 DbClient := nil; 91 DbClient := FormDatabases.SelectedProfile.GetClient; 89 with TFormDatabases.Create(nil) do 90 try 91 if ShowModal = mrOk then begin 92 DbClient := nil; 93 DbClient := SelectedProfile.GetClient; 94 end; 95 finally 96 Free; 92 97 end; 93 98 end; … … 106 111 procedure TCore.APreferencesExecute(Sender: TObject); 107 112 begin 108 FormPreferences.Load(Preferences); 109 if FormPreferences.ShowModal = mrOk then begin 110 FormPreferences.Save(Preferences); 113 with TFormPreferences.Create(nil) do 114 try 115 Load(Preferences); 116 if ShowModal = mrOk then Save(Preferences); 117 finally 118 Free; 111 119 end; 112 120 end; … … 125 133 if FDbClient = AValue then Exit; 126 134 if Assigned(FDbClient) then begin 135 FormMain.FormTables.DbClient := nil; 127 136 DbClient.Save; 128 F DbClient.Free;137 FreeAndNil(FDbClient); 129 138 end; 130 139 FDbClient := AValue; … … 132 141 DbClient.Load; 133 142 Preferences.LastDatabaseName := FDbClient.ConnectProfile.Name; 134 Form Tables.DbClient := DbClient;143 FormMain.FormTables.DbClient := DbClient; 135 144 end; 136 145 UpdateInterface; … … 176 185 Translator1.POFilesFolder := '/usr/share/MyData/languages'; 177 186 {$ENDIF} 178 FormConnect.Init;179 187 Initialized := True; 180 188 LoadConfig; 181 FormDatabases.ReloadList;182 189 UpdateInterface; 183 190 if Preferences.RememberDatabase then begin
Note:
See TracChangeset
for help on using the changeset viewer.