Changeset 358
- Timestamp:
- Dec 31, 2024, 11:06:34 AM (7 days ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormGameSystem.pas
r349 r358 51 51 52 52 uses 53 MapType, ItemList ;53 MapType, ItemList, Core; 54 54 55 55 resourcestring … … 87 87 FormUnitKinds.Align := alClient; 88 88 FormUnitKinds.Visible := True; 89 FormUnitKinds.Images := Core.Core.ImageListSmall; 89 90 FormNations := TFormList.Create(nil); 90 91 FormNations.ManualDock(TabSheetNations, nil, alClient); 91 92 FormNations.Align := alClient; 92 93 FormNations.Visible := True; 94 FormNations.Images := Core.Core.ImageListSmall; 93 95 FormBuildingKinds := TFormList.Create(nil); 94 96 FormBuildingKinds.ManualDock(TabSheetBuildings, nil, alClient); 95 97 FormBuildingKinds.Align := alClient; 96 98 FormBuildingKinds.Visible := True; 99 FormBuildingKinds.Images := Core.Core.ImageListSmall; 97 100 Translate; 98 101 end; -
trunk/Forms/FormNew.lfm
r330 r358 1 1 object FormNew: TFormNew 2 2 Left = 470 3 Height = 7953 Height = 662 4 4 Top = 353 5 Width = 10965 Width = 913 6 6 Caption = 'New game' 7 ClientHeight = 7958 ClientWidth = 10969 Constraints.MinHeight = 50210 Constraints.MinWidth = 66711 DesignTimePPI = 1 447 ClientHeight = 662 8 ClientWidth = 913 9 Constraints.MinHeight = 418 10 Constraints.MinWidth = 556 11 DesignTimePPI = 120 12 12 OnCreate = FormCreate 13 13 OnDestroy = FormDestroy 14 14 OnShow = FormShow 15 15 Position = poMainFormCenter 16 LCLVersion = '3. 4.0.0'16 LCLVersion = '3.6.0.0' 17 17 object PageControl1: TPageControl 18 Left = 419 Height = 67720 Top = 6021 Width = 69118 Left = 3 19 Height = 564 20 Top = 50 21 Width = 576 22 22 ActivePage = TabSheetMap 23 23 Align = alClient 24 BorderSpacing.Around = 424 BorderSpacing.Around = 3 25 25 ParentFont = False 26 26 TabIndex = 2 … … 29 29 object TabSheetMode: TTabSheet 30 30 Caption = 'Mode' 31 ClientHeight = 63932 ClientWidth = 68331 ClientHeight = 531 32 ClientWidth = 568 33 33 ParentFont = False 34 34 object Panel3: TPanel 35 35 Left = 0 36 Height = 63936 Height = 531 37 37 Top = 0 38 Width = 68338 Width = 568 39 39 Align = alClient 40 40 BevelOuter = bvNone 41 ClientHeight = 63942 ClientWidth = 68341 ClientHeight = 531 42 ClientWidth = 568 43 43 ParentFont = False 44 44 TabOrder = 0 45 45 object RadioButtonModeLocal: TRadioButton 46 Left = 1047 Height = 2 948 Top = 1 449 Width = 6546 Left = 8 47 Height = 24 48 Top = 12 49 Width = 56 50 50 Caption = 'Local' 51 51 Checked = True … … 56 56 end 57 57 object RadioButtonModeNetworkServer: TRadioButton 58 Left = 1059 Height = 2 960 Top = 4 861 Width = 1 4458 Left = 8 59 Height = 24 60 Top = 40 61 Width = 120 62 62 Caption = 'Network server' 63 63 ParentFont = False … … 66 66 end 67 67 object RadioButtonModeNetworkClient: TRadioButton 68 Left = 1069 Height = 2 970 Top = 1 6071 Width = 1 3868 Left = 8 69 Height = 24 70 Top = 133 71 Width = 117 72 72 Caption = 'Network client' 73 73 ParentFont = False … … 76 76 end 77 77 object EditServerAddress: TEdit 78 Left = 2 479 Height = 3380 Top = 11281 Width = 22078 Left = 20 79 Height = 28 80 Top = 93 81 Width = 183 82 82 ParentFont = False 83 83 TabOrder = 3 84 84 end 85 85 object SpinEditServerPort: TSpinEdit 86 Left = 2 5687 Height = 3388 Top = 11289 Width = 7986 Left = 213 87 Height = 28 88 Top = 93 89 Width = 66 90 90 MaxValue = 65535 91 91 ParentFont = False … … 93 93 end 94 94 object Label11: TLabel 95 Left = 2 5696 Height = 2 597 Top = 8098 Width = 3695 Left = 213 96 Height = 20 97 Top = 67 98 Width = 29 99 99 Caption = 'Port:' 100 100 ParentColor = False … … 102 102 end 103 103 object Label12: TLabel 104 Left = 2 4105 Height = 2 5106 Top = 80107 Width = 69104 Left = 20 105 Height = 20 106 Top = 67 107 Width = 56 108 108 Caption = 'Address:' 109 109 ParentColor = False … … 111 111 end 112 112 object ListViewServers: TListView 113 Left = 2 6114 Height = 3 86115 Top = 200116 Width = 334113 Left = 22 114 Height = 320 115 Top = 167 116 Width = 278 117 117 Anchors = [akTop, akLeft, akBottom] 118 118 Columns = < 119 119 item 120 120 Caption = 'Name' 121 Width = 100121 Width = 83 122 122 end 123 123 item 124 124 Caption = 'Address' 125 Width = 219125 Width = 182 126 126 end> 127 127 MultiSelect = True … … 139 139 end 140 140 object Button1: TButton 141 Left = 2 6142 Height = 3 8143 Top = 594144 Width = 94141 Left = 22 142 Height = 32 143 Top = 493 144 Width = 78 145 145 Action = AServerAdd 146 146 Anchors = [akLeft, akBottom] … … 149 149 end 150 150 object Button2: TButton 151 Left = 2 48152 Height = 3 8153 Top = 594154 Width = 94151 Left = 207 152 Height = 32 153 Top = 493 154 Width = 78 155 155 Action = AServerRemove 156 156 Anchors = [akLeft, akBottom] … … 159 159 end 160 160 object Button3: TButton 161 Left = 1 36162 Height = 3 8163 Top = 594164 Width = 94161 Left = 113 162 Height = 32 163 Top = 493 164 Width = 78 165 165 Action = AServerModify 166 166 Anchors = [akLeft, akBottom] … … 172 172 object TabSheetPlayers: TTabSheet 173 173 Caption = 'Players' 174 ClientHeight = 639175 ClientWidth = 683174 ClientHeight = 531 175 ClientWidth = 568 176 176 ParentFont = False 177 177 object Panel2: TPanel 178 178 Left = 0 179 Height = 639179 Height = 531 180 180 Top = 0 181 Width = 683181 Width = 568 182 182 Align = alClient 183 183 BevelOuter = bvNone … … 188 188 object TabSheetMap: TTabSheet 189 189 Caption = 'Map' 190 ClientHeight = 639191 ClientWidth = 683190 ClientHeight = 531 191 ClientWidth = 568 192 192 OnShow = TabSheetMapShow 193 193 ParentFont = False 194 194 object Panel1: TPanel 195 195 Left = 0 196 Height = 639196 Height = 531 197 197 Top = 0 198 Width = 683198 Width = 568 199 199 Align = alClient 200 200 BevelOuter = bvNone 201 ClientHeight = 639202 ClientWidth = 683201 ClientHeight = 531 202 ClientWidth = 568 203 203 ParentFont = False 204 204 TabOrder = 0 205 205 object Label1: TLabel 206 Left = 8207 Height = 2 5208 Top = 10209 Width = 89206 Left = 7 207 Height = 20 208 Top = 8 209 Width = 74 210 210 Caption = 'Map width:' 211 211 ParentColor = False … … 213 213 end 214 214 object Label2: TLabel 215 Left = 8216 Height = 2 5217 Top = 58218 Width = 95215 Left = 7 216 Height = 20 217 Top = 48 218 Width = 79 219 219 Caption = 'Map height:' 220 220 ParentColor = False … … 222 222 end 223 223 object SpinEditMapSizeX: TSpinEdit 224 Left = 1 28225 Height = 33226 Top = 4227 Width = 98224 Left = 107 225 Height = 28 226 Top = 3 227 Width = 82 228 228 MinValue = 2 229 229 OnChange = SpinEditMapSizeXChange … … 233 233 end 234 234 object SpinEditMapSizeY: TSpinEdit 235 Left = 1 28236 Height = 33237 Top = 55238 Width = 98235 Left = 107 236 Height = 28 237 Top = 46 238 Width = 82 239 239 MinValue = 2 240 240 OnChange = SpinEditMapSizeYChange … … 244 244 end 245 245 object TrackBarSizeX: TTrackBar 246 Left = 2 40247 Height = 58248 Top = 8249 Width = 432246 Left = 200 247 Height = 48 248 Top = 7 249 Width = 359 250 250 Max = 100 251 251 Min = 2 … … 258 258 end 259 259 object TrackBarSizeY: TTrackBar 260 Left = 2 40261 Height = 58262 Top = 4 9263 Width = 432260 Left = 200 261 Height = 48 262 Top = 41 263 Width = 359 264 264 Max = 100 265 265 Min = 2 … … 272 272 end 273 273 object Label5: TLabel 274 Left = 8275 Height = 2 5276 Top = 104277 Width = 77274 Left = 7 275 Height = 20 276 Top = 87 277 Width = 64 278 278 Caption = 'Grid type:' 279 279 ParentColor = False … … 281 281 end 282 282 object ComboBoxGridType: TComboBox 283 Left = 1 46284 Height = 33285 Top = 104286 Width = 304287 ItemHeight = 2 5283 Left = 122 284 Height = 28 285 Top = 87 286 Width = 253 287 ItemHeight = 20 288 288 Items.Strings = ( 289 289 'Hexagon vertical' … … 300 300 end 301 301 object ComboBoxMapShape: TComboBox 302 Left = 1 46303 Height = 33304 Top = 1 44305 Width = 304306 ItemHeight = 2 5302 Left = 122 303 Height = 28 304 Top = 120 305 Width = 253 306 ItemHeight = 20 307 307 Items.Strings = ( 308 308 'Hexagonal' … … 316 316 end 317 317 object Label8: TLabel 318 Left = 8319 Height = 2 5320 Top = 1 44321 Width = 92318 Left = 7 319 Height = 20 320 Top = 120 321 Width = 76 322 322 Caption = 'Map shape:' 323 323 ParentColor = False … … 325 325 end 326 326 object CheckBoxSymetricMap: TCheckBox 327 Left = 8328 Height = 2 9329 Top = 2 48330 Width = 1 34327 Left = 7 328 Height = 24 329 Top = 207 330 Width = 112 331 331 Caption = 'Symetric map' 332 332 ParentFont = False … … 335 335 end 336 336 object SpinEditVoidPercent: TSpinEdit 337 Left = 216338 Height = 33339 Top = 314340 Width = 106337 Left = 180 338 Height = 28 339 Top = 262 340 Width = 88 341 341 MinValue = 1 342 342 OnChange = SpinEditVoidPercentChange … … 346 346 end 347 347 object CheckBoxVoid: TCheckBox 348 Left = 8349 Height = 2 9350 Top = 318351 Width = 1 72348 Left = 7 349 Height = 24 350 Top = 265 351 Width = 146 352 352 Caption = 'Inaccessible places' 353 353 ParentFont = False … … 356 356 end 357 357 object CheckBoxCity: TCheckBox 358 Left = 8359 Height = 2 9360 Top = 3 68361 Width = 67358 Left = 7 359 Height = 24 360 Top = 307 361 Width = 57 362 362 Caption = 'Cities' 363 363 ParentFont = False … … 366 366 end 367 367 object SpinEditCityPercent: TSpinEdit 368 Left = 216369 Height = 33370 Top = 3 60371 Width = 106368 Left = 180 369 Height = 28 370 Top = 300 371 Width = 88 372 372 MinValue = 1 373 373 OnChange = SpinEditCityPercentChange … … 377 377 end 378 378 object Label4: TLabel 379 Left = 331380 Height = 2 5381 Top = 3 68382 Width = 1 5379 Left = 276 380 Height = 20 381 Top = 307 382 Width = 12 383 383 Caption = '%' 384 384 ParentColor = False … … 386 386 end 387 387 object Label3: TLabel 388 Left = 331389 Height = 2 5390 Top = 324391 Width = 1 5388 Left = 276 389 Height = 20 390 Top = 270 391 Width = 12 392 392 Caption = '%' 393 393 ParentColor = False … … 395 395 end 396 396 object SpinEditNeutralUnits: TSpinEdit 397 Left = 312398 Height = 33399 Top = 4 88400 Width = 98397 Left = 260 398 Height = 28 399 Top = 407 400 Width = 82 401 401 MaxValue = 99 402 402 OnChange = SpinEditNeutralUnitsChange … … 406 406 end 407 407 object Label7: TLabel 408 Left = 8409 Height = 2 5410 Top = 4 96411 Width = 207408 Left = 7 409 Height = 20 410 Top = 413 411 Width = 172 412 412 Caption = 'Max random neutral units:' 413 413 ParentColor = False … … 415 415 end 416 416 object EditImageFile: TEdit 417 Left = 1 44418 Height = 33419 Top = 1 84420 Width = 415417 Left = 120 418 Height = 28 419 Top = 153 420 Width = 345 421 421 Anchors = [akTop, akLeft, akRight] 422 422 ParentFont = False … … 425 425 end 426 426 object ButtonImageBrowse: TButton 427 Left = 568428 Height = 3 8429 Top = 1 82430 Width = 98427 Left = 472 428 Height = 32 429 Top = 152 430 Width = 82 431 431 Anchors = [akTop, akRight] 432 432 Caption = 'Browse' … … 436 436 end 437 437 object Label9: TLabel 438 Left = 8439 Height = 2 5440 Top = 1 84441 Width = 82438 Left = 7 439 Height = 20 440 Top = 153 441 Width = 70 442 442 Caption = 'Image file:' 443 443 ParentColor = False … … 445 445 end 446 446 object CheckBoxBridges: TCheckBox 447 Left = 8448 Height = 2 9449 Top = 408450 Width = 1 94447 Left = 7 448 Height = 24 449 Top = 340 450 Width = 165 451 451 Caption = 'Bridges between cells' 452 452 ParentFont = False … … 455 455 end 456 456 object SpinEditMaxPower: TSpinEdit 457 Left = 312458 Height = 33459 Top = 440460 Width = 98457 Left = 260 458 Height = 28 459 Top = 367 460 Width = 82 461 461 MaxValue = 1000000 462 462 MinValue = 1 … … 467 467 end 468 468 object Label10: TLabel 469 Left = 8470 Height = 2 5471 Top = 448472 Width = 1 41469 Left = 7 470 Height = 20 471 Top = 373 472 Width = 119 473 473 Caption = 'Max units per cell:' 474 474 ParentColor = False … … 476 476 end 477 477 object CheckBoxCyclicMap: TCheckBox 478 Left = 8479 Height = 2 9480 Top = 2 83481 Width = 110478 Left = 7 479 Height = 24 480 Top = 236 481 Width = 93 482 482 Caption = 'Cyclic map' 483 483 ParentFont = False … … 486 486 end 487 487 object Image1: TImage 488 Left = 419489 Height = 316490 Top = 2 72491 Width = 2 55488 Left = 349 489 Height = 263 490 Top = 227 491 Width = 211 492 492 Anchors = [akTop, akLeft, akRight] 493 493 OnResize = Image1Resize 494 494 end 495 495 object Label15: TLabel 496 Left = 419497 Height = 2 5498 Top = 2 40499 Width = 64496 Left = 349 497 Height = 20 498 Top = 200 499 Width = 54 500 500 Caption = 'Preview:' 501 501 ParentColor = False … … 503 503 end 504 504 object ButtonRandomize: TButton 505 Left = 10506 Height = 3 8507 Top = 540508 Width = 1 54505 Left = 8 506 Height = 32 507 Top = 450 508 Width = 128 509 509 Caption = 'Randomize' 510 510 ParentFont = False … … 516 516 object TabSheetRules: TTabSheet 517 517 Caption = 'Rules' 518 ClientHeight = 639519 ClientWidth = 683518 ClientHeight = 531 519 ClientWidth = 568 520 520 ParentFont = False 521 521 object Panel4: TPanel 522 522 Left = 0 523 Height = 639523 Height = 531 524 524 Top = 0 525 Width = 683525 Width = 568 526 526 Align = alClient 527 527 BevelOuter = bvNone 528 ClientHeight = 639529 ClientWidth = 683528 ClientHeight = 531 529 ClientWidth = 568 530 530 ParentFont = False 531 531 TabOrder = 0 532 532 object RadioGroupGrowCells: TRadioGroup 533 Left = 1 4534 Height = 1 28535 Top = 1 20536 Width = 312533 Left = 12 534 Height = 107 535 Top = 100 536 Width = 260 537 537 AutoFill = True 538 538 Caption = 'Growing cells' … … 544 544 ChildSizing.Layout = cclLeftToRightThenTopToBottom 545 545 ChildSizing.ControlsPerLine = 1 546 ClientHeight = 98547 ClientWidth = 308546 ClientHeight = 82 547 ClientWidth = 256 548 548 Items.Strings = ( 549 549 'None' … … 555 555 end 556 556 object Label6: TLabel 557 Left = 8558 Height = 2 5559 Top = 2 67560 Width = 111557 Left = 7 558 Height = 20 559 Top = 222 560 Width = 94 561 561 Caption = 'Win objective:' 562 562 ParentColor = False … … 564 564 end 565 565 object ComboBoxWinObjective: TComboBox 566 Left = 216567 Height = 33568 Top = 2 67569 Width = 328570 ItemHeight = 2 5566 Left = 180 567 Height = 28 568 Top = 222 569 Width = 273 570 ItemHeight = 20 571 571 Items.Strings = ( 572 572 'Defeat all oponents' … … 581 581 end 582 582 object RadioGroupGrowAmount: TRadioGroup 583 Left = 1 4584 Height = 92585 Top = 1 6586 Width = 305583 Left = 12 584 Height = 77 585 Top = 13 586 Width = 254 587 587 AutoFill = True 588 588 Caption = 'Per turn grow amount' … … 594 594 ChildSizing.Layout = cclLeftToRightThenTopToBottom 595 595 ChildSizing.ControlsPerLine = 1 596 ClientHeight = 62597 ClientWidth = 301596 ClientHeight = 52 597 ClientWidth = 250 598 598 Items.Strings = ( 599 599 'By one' … … 604 604 end 605 605 object CheckBoxFogOfWar: TCheckBox 606 Left = 336607 Height = 2 9608 Top = 2 4609 Width = 111606 Left = 280 607 Height = 24 608 Top = 20 609 Width = 92 610 610 Caption = 'Fog of war' 611 611 ParentFont = False … … 613 613 end 614 614 object PageControlWinObjective: TPageControl 615 Left = 1 2616 Height = 110617 Top = 314618 Width = 660615 Left = 10 616 Height = 92 617 Top = 262 618 Width = 549 619 619 ActivePage = TabSheetCaptureEntireMap 620 620 Anchors = [akTop, akLeft, akRight] … … 630 630 end 631 631 object TabSheetCaptureCells: TTabSheet 632 ClientHeight = 102633 ClientWidth = 652632 ClientHeight = 84 633 ClientWidth = 541 634 634 ParentFont = False 635 635 object Label14: TLabel 636 Left = 8637 Height = 2 5638 Top = 1 6639 Width = 1 47636 Left = 7 637 Height = 20 638 Top = 13 639 Width = 125 640 640 Caption = 'Special cells count:' 641 641 ParentColor = False … … 643 643 end 644 644 object SpinEditSpecialCells: TSpinEdit 645 Left = 236646 Height = 33647 Top = 8648 Width = 1 58645 Left = 197 646 Height = 28 647 Top = 7 648 Width = 132 649 649 MaxValue = 1000 650 650 MinValue = 1 … … 655 655 end 656 656 object TabSheetStayAliveTurns: TTabSheet 657 ClientHeight = 102658 ClientWidth = 652657 ClientHeight = 84 658 ClientWidth = 541 659 659 ParentFont = False 660 660 object Label13: TLabel 661 Left = 8662 Height = 2 5663 Top = 1 6664 Width = 1 36661 Left = 7 662 Height = 20 663 Top = 13 664 Width = 111 665 665 Caption = 'Number of turns:' 666 666 ParentColor = False … … 668 668 end 669 669 object SpinEditTurns: TSpinEdit 670 Left = 236671 Height = 33672 Top = 8673 Width = 1 58670 Left = 197 671 Height = 28 672 Top = 7 673 Width = 132 674 674 MaxValue = 1000 675 675 MinValue = 1 … … 691 691 object PanelButtons: TPanel 692 692 Left = 0 693 Height = 54694 Top = 741695 Width = 1096693 Height = 45 694 Top = 617 695 Width = 913 696 696 Align = alBottom 697 697 BevelOuter = bvNone 698 ClientHeight = 54699 ClientWidth = 1096698 ClientHeight = 45 699 ClientWidth = 913 700 700 ParentFont = False 701 701 TabOrder = 1 702 702 object ButtonOk: TButton 703 Left = 976704 Height = 3 8705 Top = 8706 Width = 106703 Left = 813 704 Height = 32 705 Top = 6 706 Width = 88 707 707 Anchors = [akRight, akBottom] 708 708 Caption = 'Ok' … … 713 713 end 714 714 object ButtonCancel: TButton 715 Left = 845716 Height = 3 8717 Top = 8718 Width = 114715 Left = 704 716 Height = 32 717 Top = 6 718 Width = 95 719 719 Anchors = [akRight, akBottom] 720 720 Caption = 'Cancel' … … 725 725 end 726 726 object PanelChat: TPanel 727 Left = 705728 Height = 685729 Top = 56730 Width = 3 91727 Left = 587 728 Height = 570 729 Top = 47 730 Width = 326 731 731 Align = alRight 732 732 BevelOuter = bvNone … … 735 735 end 736 736 object Splitter1: TSplitter 737 Left = 699738 Height = 685739 Top = 56740 Width = 6737 Left = 582 738 Height = 570 739 Top = 47 740 Width = 5 741 741 Align = alRight 742 742 ResizeAnchor = akRight … … 744 744 object Panel5: TPanel 745 745 Left = 0 746 Height = 56746 Height = 47 747 747 Top = 0 748 Width = 1096748 Width = 913 749 749 Align = alTop 750 750 BevelOuter = bvNone 751 ClientHeight = 56752 ClientWidth = 1096751 ClientHeight = 47 752 ClientWidth = 913 753 753 ParentFont = False 754 754 TabOrder = 4 755 755 object Label16: TLabel 756 Left = 1 2757 Height = 2 5758 Top = 1 4759 Width = 111756 Left = 10 757 Height = 20 758 Top = 12 759 Width = 91 760 760 Caption = 'Game system:' 761 761 ParentColor = False … … 763 763 end 764 764 object ComboBoxGameSystem: TComboBox 765 Left = 1 76766 Height = 33767 Top = 1 2768 Width = 2 54769 ItemHeight = 2 5765 Left = 147 766 Height = 28 767 Top = 10 768 Width = 212 769 ItemHeight = 20 770 770 ParentFont = False 771 771 Style = csDropDownList … … 774 774 end 775 775 object ButtonGameSystems: TButton 776 Left = 443777 Height = 3 8778 Top = 10779 Width = 113776 Left = 369 777 Height = 32 778 Top = 8 779 Width = 94 780 780 Caption = 'Manage' 781 781 ParentFont = False … … 786 786 object ActionList1: TActionList 787 787 Images = Core.ImageListSmall 788 Left = 864789 Top = 216788 Left = 720 789 Top = 180 790 790 object AServerAdd: TAction 791 791 Caption = 'Add' … … 802 802 end 803 803 object OpenPictureDialog1: TOpenPictureDialog 804 Left = 864805 Top = 3 60804 Left = 720 805 Top = 300 806 806 end 807 807 object PopupMenuServers: TPopupMenu 808 Left = 864809 Top = 1 36808 Left = 720 809 Top = 113 810 810 object MenuItem4: TMenuItem 811 811 Action = AServerAdd … … 821 821 Interval = 500 822 822 OnTimer = TimerMapPreviewTimer 823 Left = 864824 Top = 446823 Left = 720 824 Top = 372 825 825 end 826 826 end -
trunk/Forms/FormNew.pas
r349 r358 524 524 FormPlayers.Align := alClient; 525 525 FormPlayers.Visible := True; 526 FormPlayers.Images := Core.Core.ImageListSmall; 526 527 Translate; 527 528 end; -
trunk/Packages/Common/Forms/FormList.lfm
r355 r358 1 1 object FormList: TFormList 2 2 Left = 1040 3 Height = 3 123 Height = 300 4 4 Top = 540 5 Width = 4 175 Width = 400 6 6 Caption = 'List' 7 ClientHeight = 3 128 ClientWidth = 4 179 DesignTimePPI = 12 57 ClientHeight = 300 8 ClientWidth = 400 9 DesignTimePPI = 120 10 10 OnCreate = FormCreate 11 11 OnDestroy = FormDestroy … … 14 14 object ListView1: TListView 15 15 Left = 0 16 Height = 2 7916 Height = 268 17 17 Top = 0 18 Width = 4 1718 Width = 400 19 19 Align = alClient 20 20 Columns = < 21 21 item 22 22 Caption = 'Name' 23 Width = 40523 Width = 389 24 24 end> 25 25 MultiSelect = True … … 40 40 object ToolBar1: TToolBar 41 41 Left = 0 42 Height = 33 43 Top = 279 44 Width = 417 42 Top = 268 43 Width = 400 45 44 Align = alBottom 46 Images = Core.ImageListSmall47 45 ParentFont = False 48 46 ParentShowHint = False … … 55 53 end 56 54 object ToolButton2: TToolButton 57 Left = 3 155 Left = 30 58 56 Top = 2 59 57 Action = AModify 60 58 end 61 59 object ToolButton3: TToolButton 62 Left = 6160 Left = 59 63 61 Top = 2 64 62 Action = ARemove 65 63 end 66 64 object ToolButton4: TToolButton 67 Left = 9165 Left = 88 68 66 Top = 2 69 67 Action = AClone … … 71 69 end 72 70 object ActionList1: TActionList 73 Images = Core.ImageListSmall 74 Left = 181 75 Top = 141 71 Left = 174 72 Top = 133 76 73 object AAdd: TAction 77 74 Caption = 'Add' 78 75 ImageIndex = 16 79 76 OnExecute = AAddExecute 77 ShortCut = 45 80 78 end 81 79 object AModify: TAction … … 83 81 ImageIndex = 6 84 82 OnExecute = AModifyExecute 83 ShortCut = 13 85 84 end 86 85 object ARemove: TAction … … 88 87 ImageIndex = 18 89 88 OnExecute = ARemoveExecute 89 ShortCut = 46 90 90 end 91 91 object AClone: TAction … … 101 101 end 102 102 object PopupMenu1: TPopupMenu 103 Images = Core.ImageListSmall 104 Left = 306 105 Top = 139 103 Left = 294 104 Top = 133 106 105 object MenuItem1: TMenuItem 107 106 Action = AAdd -
trunk/Packages/Common/Forms/FormList.pas
r355 r358 47 47 Selected: Boolean); 48 48 private 49 FImages: TImageList; 49 50 FList: TBaseItemList; 51 procedure SetImages(AValue: TImageList); 50 52 procedure SetList(AValue: TBaseItemList); 51 53 procedure UpdateListViewColumns; … … 56 58 procedure UpdateList; 57 59 property List: TBaseItemList read FList write SetList; 60 property Images: TImageList read FImages write SetImages; 58 61 end; 59 62 … … 264 267 end; 265 268 269 procedure TFormList.SetImages(AValue: TImageList); 270 begin 271 if FImages = AValue then Exit; 272 FImages := AValue; 273 ToolBar1.Images := FImages; 274 PopupMenu1.Images := FImages; 275 end; 276 266 277 procedure TFormList.UpdateListViewColumns; 267 278 var … … 293 304 procedure TFormList.UpdateInterface; 294 305 begin 295 ARemove.Enabled := Assigned(FList) and Assigned(ListView1.Selected) and ( List.Count >MinItemCount);306 ARemove.Enabled := Assigned(FList) and Assigned(ListView1.Selected) and ((List.Count - ListView1.SelCount) >= MinItemCount); 296 307 AModify.Enabled := Assigned(FList) and Assigned(ListView1.Selected); 297 308 AAdd.Enabled := Assigned(FList) and ((MaxItemCount = -1) or ((MaxItemCount <> -1) and (List.Count < MaxItemCount)));
Note:
See TracChangeset
for help on using the changeset viewer.