Changeset 75 for trunk/Packages/ModularSystem/FormModuleList.pas
- Timestamp:
- Jun 4, 2024, 12:22:49 AM (5 months ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/ModularSystem/FormModuleList.pas
r74 r75 1 unit UFormModuleList; 2 3 {$mode delphi} 1 unit FormModuleList; 4 2 5 3 interface … … 7 5 uses 8 6 Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, 9 ComCtrls, ExtCtrls, Menus, ActnList, StdCtrls, SpecializedList, DateUtils,10 UListViewSort, UModularSystem;7 ComCtrls, ExtCtrls, Menus, ActnList, StdCtrls, Generics.Collections, DateUtils, 8 ListViewSort, ModularSystem, Common; 11 9 12 10 type … … 87 85 function ModuleToStr(Module: TObject): string; 88 86 87 89 88 implementation 90 89 … … 130 129 if Version <> '' then Item.SubItems.Add(Version) 131 130 else Item.SubItems.Add(' '); 132 Item.SubItems.Add( Dependencies.Implode(',', StrToStr));131 Item.SubItems.Add(Implode(',', Dependencies)); 133 132 if FileName <> '' then Item.SubItems.Add(FileName) 134 133 else Item.SubItems.Add(' '); … … 150 149 if (mloShowLicense in FOptions) and (License <> '') then Memo1.Lines.Add(SLicense + ': ' + License); 151 150 if (mloShowDependencies in FOptions) and (Dependencies.Count > 0) then 152 Memo1.Lines.Add(SDependencies + ': ' + Dependencies.Implode(', ', StrToStr));151 Memo1.Lines.Add(SDependencies + ': ' + Implode(', ', Dependencies)); 153 152 if (mloShowDescription in FOptions) and (Description.Count > 0) then 154 Memo1.Lines.Add(SDescription + ': ' + Description.Implode(', ', StrToStr));153 Memo1.Lines.Add(SDescription + ': ' + Implode(', ', Description)); 155 154 end; 156 155 end; … … 191 190 procedure TFormModuleList.AStartExecute(Sender: TObject); 192 191 var 193 Modules: T ListModule;192 Modules: TModules; 194 193 I: Integer; 195 194 begin … … 199 198 if not Running then 200 199 try 201 Modules := T ListModule.Create;200 Modules := TModules.Create; 202 201 Modules.OwnsObjects := False; 203 202 EnumDependenciesCascade(Modules, [mcNotRunning]); 204 203 if Modules.Count > 0 then begin 205 204 if MessageDlg(Format(SAdditionalModulesStart, [ 206 Identification, Modules. Implode(',', ModuleToStr)]),205 Identification, Modules.GetNames]), 207 206 mtConfirmation, [mbYes, mbNo], 0) = mrYes then 208 207 Start; … … 216 215 procedure TFormModuleList.AStopExecute(Sender: TObject); 217 216 var 218 Modules: T ListModule;217 Modules: TModules; 219 218 I: Integer; 220 219 begin … … 224 223 if Running then 225 224 try 226 Modules := T ListModule.Create;225 Modules := TModules.Create; 227 226 Modules.OwnsObjects := False; 228 227 EnumSuperiorDependenciesCascade(Modules, [mcRunning]); 229 228 if Modules.Count > 0 then begin 230 229 if MessageDlg(Format(SAdditionalModulesStop, [ 231 Identification, 232 Modules.Implode(',', ModuleToStr)]), 230 Identification, Modules.GetNames]), 233 231 mtConfirmation, [mbYes, mbNo], 0) = mrYes then 234 232 Stop; … … 242 240 procedure TFormModuleList.AUninstallExecute(Sender: TObject); 243 241 var 244 Modules: T ListModule;242 Modules: TModules; 245 243 I: Integer; 246 244 begin … … 250 248 if Installed then 251 249 try 252 Modules := T ListModule.Create;250 Modules := TModules.Create; 253 251 Modules.OwnsObjects := False; 254 252 EnumSuperiorDependenciesCascade(Modules, [mcInstalled]); 255 253 if Modules.Count > 0 then begin 256 254 if MessageDlg(Format(SAdditionalModulesUninstall, [ 257 Identification, 258 Modules.Implode(',', ModuleToStr)]), 255 Identification, Modules.GetNames]), 259 256 mtConfirmation, [mbYes, mbNo], 0) = mrYes then 260 257 Uninstall; … … 275 272 procedure TFormModuleList.AInstallExecute(Sender: TObject); 276 273 var 277 Modules: T ListModule;274 Modules: TModules; 278 275 I: Integer; 279 276 begin … … 283 280 if not Installed then 284 281 try 285 Modules := T ListModule.Create;282 Modules := TModules.Create; 286 283 Modules.OwnsObjects := False; 287 284 EnumDependenciesCascade(Modules, [mcNotInstalled]); 288 285 if Modules.Count > 0 then begin 289 286 if MessageDlg(Format(SAdditionalModulesInstall, [ 290 Identification, 291 Modules.Implode(',', ModuleToStr)]), 287 Identification, Modules.GetNames]), 292 288 mtConfirmation, [mbYes, mbNo], 0) = mrYes then 293 289 Install; … … 301 297 procedure TFormModuleList.AEnableExecute(Sender: TObject); 302 298 var 303 Modules: T ListModule;299 Modules: TModules; 304 300 I: Integer; 305 301 begin … … 309 305 if not Enabled then 310 306 try 311 Modules := T ListModule.Create;307 Modules := TModules.Create; 312 308 Modules.OwnsObjects := False; 313 309 EnumDependenciesCascade(Modules, [mcNotRunning]); 314 310 if Modules.Count > 0 then begin 315 311 if MessageDlg(Format(SAdditionalModulesStart, [ 316 Identification, Modules. Implode(',', ModuleToStr)]),312 Identification, Modules.GetNames]), 317 313 mtConfirmation, [mbYes, mbNo], 0) = mrYes then begin 318 314 Enable; … … 331 327 procedure TFormModuleList.ADisableExecute(Sender: TObject); 332 328 var 333 Modules: T ListModule;329 Modules: TModules; 334 330 I: Integer; 335 331 begin … … 339 335 if Enabled then 340 336 try 341 Modules := T ListModule.Create;337 Modules := TModules.Create; 342 338 Modules.OwnsObjects := False; 343 339 EnumSuperiorDependenciesCascade(Modules, [mcInstalled]); 344 340 if Modules.Count > 0 then begin 345 341 if MessageDlg(Format(SAdditionalModulesUninstall, [ 346 Identification, 347 Modules.Implode(',', ModuleToStr)]), 342 Identification, Modules.GetNames]), 348 343 mtConfirmation, [mbYes, mbNo], 0) = mrYes then begin 349 344 Stop; … … 400 395 7: Result := CompareString(TModule(Item1).Version, TModule( 401 396 Item2).Version); 402 8: Result := CompareString( TModule(Item1).Dependencies.Implode(',', StrToStr),403 TModule(Item2).Dependencies.Implode(',', StrToStr));397 8: Result := CompareString(Implode(',', TModule(Item1).Dependencies), 398 Implode(',', TModule(Item2).Dependencies)); 404 399 9: Result := CompareString(TModule(Item1).FileName, 405 400 TModule(Item2).FileName); … … 500 495 501 496 initialization 502 {$I UFormModuleList.lrs}497 {$I FormModuleList.lrs} 503 498 504 499 end.
Note:
See TracChangeset
for help on using the changeset viewer.