Changeset 288
- Timestamp:
- Mar 24, 2019, 10:52:35 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormNation.lfm
r283 r288 8 8 ClientWidth = 480 9 9 DesignTimePPI = 144 10 LCLVersion = ' 1.8.4.0'10 LCLVersion = '2.0.0.4' 11 11 object LabelName: TLabel 12 12 Left = 20 … … 48 48 Caption = 'OK' 49 49 ModalResult = 1 50 OnClick = ButtonOkClick 50 51 TabOrder = 2 51 52 end -
trunk/Forms/UFormNation.pas
r284 r288 20 20 LabelName: TLabel; 21 21 LabelHealth: TLabel; 22 procedure ButtonOkClick(Sender: TObject); 22 23 private 23 24 public 24 FNation: TNation; 25 25 procedure Load(Nation: TNation); 26 26 procedure Save(Nation: TNation); 27 procedure SetNation(AValue: TNation); 28 public 29 property Nation: TNation read FNation write SetNation; 27 30 end; 28 31 … … 36 39 37 40 { TFormNation } 41 42 procedure TFormNation.ButtonOkClick(Sender: TObject); 43 begin 44 Save(FNation); 45 end; 38 46 39 47 procedure TFormNation.Load(Nation: TNation); … … 50 58 end; 51 59 60 procedure TFormNation.SetNation(AValue: TNation); 61 begin 62 if FNation = AValue then Exit; 63 FNation := AValue; 64 if Assigned(FNation) then Load(FNation); 65 end; 66 52 67 end. 53 68 -
trunk/Forms/UFormNations.lfm
r284 r288 11 11 OnCreate = FormCreate 12 12 OnShow = FormShow 13 LCLVersion = ' 1.8.4.0'13 LCLVersion = '2.0.0.4' 14 14 object ListView1: TListView 15 15 Left = 0 -
trunk/Forms/UFormNations.pas
r284 r288 102 102 FormNation := TFormNation.Create(Self); 103 103 try 104 FormNation. Load(TempEntry);104 FormNation.Nation := TempEntry; 105 105 if FormNation.ShowModal = mrOk then begin 106 FormNation.Save(TempEntry);107 106 TNation(ListView1.Selected.Data).Assign(TempEntry); 108 107 UpdateList; … … 124 123 try 125 124 TempEntry.Name := SNewUnitKind; 126 FormNation. Load(TempEntry);125 FormNation.Nation := TempEntry; 127 126 if FormNation.ShowModal = mrOk then begin 128 FormNation.Save(TempEntry);129 127 Nations.Add(TempEntry); 130 128 TempEntry := nil; … … 149 147 try 150 148 TempEntry.Name := Nations.GetNextAvailableName(TempEntry.Name); 151 FormNation. Load(TempEntry);149 FormNation.Nation := TempEntry; 152 150 if FormNation.ShowModal = mrOk then begin 153 FormNation.Save(TempEntry);154 151 Nations.Add(TempEntry); 155 152 TempEntry := nil; -
trunk/Forms/UFormNew.pas
r287 r288 600 600 procedure TFormNew.AServerAddExecute(Sender: TObject); 601 601 var 602 NewServer : TServerInfo;602 NewServerInfo: TServerInfo; 603 603 begin 604 604 FormServer := TFormServer.Create(nil); 605 NewServer := TServerInfo.Create;606 FormServer. Load(NewServer);605 NewServerInfo := TServerInfo.Create; 606 FormServer.ServerInfo := NewServerInfo; 607 607 if FormServer.ShowModal = mrOK then begin 608 FormServer.Save(NewServer); 609 ServerList.Items.Add(NewServer); 608 ServerList.Items.Add(NewServerInfo); 610 609 ReloadView; 611 end else NewServer .Free;610 end else NewServerInfo.Free; 612 611 FormServer.Free; 613 612 end; … … 615 614 procedure TFormNew.AServerModifyExecute(Sender: TObject); 616 615 var 617 Server : TServerInfo;616 ServerInfo: TServerInfo; 618 617 begin 619 618 FormServer := TFormServer.Create(nil); 620 Server := TServerInfo(ListViewServers.Selected.Data);621 FormServer. Load(Server);619 ServerInfo := TServerInfo(ListViewServers.Selected.Data); 620 FormServer.ServerInfo := ServerInfo; 622 621 if FormServer.ShowModal = mrOK then begin 623 FormServer.Save(Server);624 622 ReloadView; 625 623 end; -
trunk/Forms/UFormPlayer.lfm
r282 r288 14 14 OnShow = FormShow 15 15 Position = poMainFormCenter 16 LCLVersion = ' 1.8.4.0'16 LCLVersion = '2.0.0.4' 17 17 object Label1: TLabel 18 18 Left = 24 … … 50 50 Default = True 51 51 ModalResult = 1 52 OnClick = ButtonOkClick 52 53 TabOrder = 2 53 54 end -
trunk/Forms/UFormPlayer.pas
r282 r288 29 29 Label6: TLabel; 30 30 SpinEditStartUnits: TSpinEdit; 31 procedure ButtonOkClick(Sender: TObject); 31 32 procedure ComboBoxModeChange(Sender: TObject); 32 33 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); … … 34 35 procedure FormShow(Sender: TObject); 35 36 private 36 { private declarations } 37 FPlayer: TPlayer; 38 procedure LoadData(Player: TPlayer); 39 procedure SaveData(Player: TPlayer); 40 procedure SetPlayer(AValue: TPlayer); 37 41 public 38 42 procedure Translate; 39 43 procedure UpdateInterface; 40 procedure LoadData(Player: TPlayer); 41 procedure SaveData(Player: TPlayer); 44 property Player: TPlayer read FPlayer write SetPlayer; 42 45 end; 43 46 … … 64 67 begin 65 68 UpdateInterface; 69 end; 70 71 procedure TFormPlayer.ButtonOkClick(Sender: TObject); 72 begin 73 SaveData(FPlayer); 66 74 end; 67 75 … … 149 157 end; 150 158 159 procedure TFormPlayer.SetPlayer(AValue: TPlayer); 160 begin 161 if FPlayer = AValue then Exit; 162 FPlayer := AValue; 163 if Assigned(FPlayer) then LoadData(FPlayer); 164 end; 165 151 166 end. 152 167 -
trunk/Forms/UFormPlayers.pas
r284 r288 106 106 FormPlayer := TFormPlayer.Create(Self); 107 107 try 108 FormPlayer. LoadData(TempEntry);108 FormPlayer.Player := TempEntry; 109 109 if FormPlayer.ShowModal = mrOk then begin 110 FormPlayer.SaveData(TempEntry);111 110 TPlayer(ListView1.Selected.Data).Assign(TempEntry); 112 111 UpdateList; … … 136 135 TempEntry.Agressivity := caMedium; 137 136 TempEntry.Game := Players.Game; 138 FormPlayer. LoadData(TempEntry);137 FormPlayer.Player := TempEntry; 139 138 if FormPlayer.ShowModal = mrOk then begin 140 FormPlayer.SaveData(TempEntry);141 139 Players.Add(TempEntry); 142 140 TempEntry := nil; -
trunk/Forms/UFormServer.lfm
r243 r288 1 1 object FormServer: TFormServer 2 2 Left = 691 3 Height = 2 103 Height = 252 4 4 Top = 389 5 Width = 4 035 Width = 484 6 6 Caption = 'Server' 7 ClientHeight = 2 108 ClientWidth = 4 039 DesignTimePPI = 1 207 ClientHeight = 252 8 ClientWidth = 484 9 DesignTimePPI = 144 10 10 OnShow = FormShow 11 LCLVersion = ' 1.8.2.0'11 LCLVersion = '2.0.0.4' 12 12 object Label1: TLabel 13 Left = 1 014 Height = 2 015 Top = 2 016 Width = 4313 Left = 12 14 Height = 26 15 Top = 24 16 Width = 56 17 17 Caption = 'Name:' 18 18 ParentColor = False 19 ParentFont = False 19 20 end 20 21 object EditName: TEdit 21 Left = 136 22 Height = 28 23 Top = 14 24 Width = 234 22 Left = 163 23 Height = 43 24 Top = 17 25 Width = 281 26 ParentFont = False 25 27 TabOrder = 0 26 28 end 27 29 object Label2: TLabel 28 Left = 829 Height = 2 030 Top = 5431 Width = 5630 Left = 12 31 Height = 26 32 Top = 72 33 Width = 74 32 34 Caption = 'Address:' 33 35 ParentColor = False 36 ParentFont = False 34 37 end 35 38 object EditAddress: TEdit 36 Left = 134 37 Height = 28 38 Top = 48 39 Width = 236 39 Left = 163 40 Height = 43 41 Top = 64 42 Width = 283 43 ParentFont = False 40 44 TabOrder = 1 41 45 end 42 46 object Label3: TLabel 43 Left = 844 Height = 2 045 Top = 8646 Width = 3047 Left = 12 48 Height = 26 49 Top = 120 50 Width = 41 47 51 Caption = 'Port:' 48 52 ParentColor = False 53 ParentFont = False 49 54 end 50 55 object SpinEdit1: TSpinEdit 51 Left = 1 3652 Height = 2853 Top = 8054 Width = 9756 Left = 163 57 Height = 43 58 Top = 112 59 Width = 116 55 60 MaxValue = 65535 61 ParentFont = False 56 62 TabOrder = 2 57 63 end 58 64 object ButtonCancel: TButton 59 Left = 2 4060 Height = 3 161 Top = 1 5562 Width = 9465 Left = 288 66 Height = 37 67 Top = 186 68 Width = 113 63 69 Caption = 'Cancel' 64 70 ModalResult = 2 71 ParentFont = False 65 72 TabOrder = 3 66 73 end 67 74 object ButtonOk: TButton 68 Left = 8069 Height = 3 170 Top = 1 5571 Width = 9475 Left = 96 76 Height = 37 77 Top = 186 78 Width = 113 72 79 Caption = 'OK' 73 80 ModalResult = 1 81 OnClick = ButtonOkClick 82 ParentFont = False 74 83 TabOrder = 4 75 84 end -
trunk/Forms/UFormServer.pas
r243 r288 22 22 Label3: TLabel; 23 23 SpinEdit1: TSpinEdit; 24 procedure ButtonOkClick(Sender: TObject); 24 25 procedure FormShow(Sender: TObject); 25 26 private 26 27 public27 FServerInfo: TServerInfo; 28 procedure SetServerInfo(AValue: TServerInfo); 28 29 procedure Load(Server: TServerInfo); 29 30 procedure Save(Server: TServerInfo); 31 public 32 property ServerInfo: TServerInfo read FServerInfo write SetServerInfo; 30 33 end; 31 34 … … 47 50 end; 48 51 52 procedure TFormServer.ButtonOkClick(Sender: TObject); 53 begin 54 Save(FServerInfo); 55 end; 56 57 procedure TFormServer.SetServerInfo(AValue: TServerInfo); 58 begin 59 if FServerInfo = AValue then Exit; 60 FServerInfo := AValue; 61 if Assigned(FServerInfo) then Load(FServerInfo); 62 end; 63 49 64 procedure TFormServer.Load(Server: TServerInfo); 50 65 begin -
trunk/Languages/xtactics.cs.po
r286 r288 796 796 msgid "Units" 797 797 msgstr "Jednotky" 798 799 #: tformserver.buttoncancel.caption 800 msgctxt "tformserver.buttoncancel.caption" 801 msgid "Cancel" 802 msgstr "Zrušit" 803 804 #: tformserver.buttonok.caption 805 msgctxt "tformserver.buttonok.caption" 806 msgid "OK" 807 msgstr "OK" 808 809 #: tformserver.caption 810 msgid "Server" 811 msgstr "Server" 812 813 #: tformserver.label1.caption 814 msgctxt "tformserver.label1.caption" 815 msgid "Name:" 816 msgstr "Jméno:" 817 818 #: tformserver.label2.caption 819 msgctxt "tformserver.label2.caption" 820 msgid "Address:" 821 msgstr "Adresa:" 822 823 #: tformserver.label3.caption 824 msgctxt "tformserver.label3.caption" 825 msgid "Port:" 826 msgstr "Port:" 798 827 799 828 #: tformsettings.buttoncancel.caption -
trunk/Languages/xtactics.po
r286 r288 781 781 msgctxt "tformplayersstats.listview1.columns[5].caption" 782 782 msgid "Units" 783 msgstr "" 784 785 #: tformserver.buttoncancel.caption 786 msgctxt "tformserver.buttoncancel.caption" 787 msgid "Cancel" 788 msgstr "" 789 790 #: tformserver.buttonok.caption 791 msgctxt "tformserver.buttonok.caption" 792 msgid "OK" 793 msgstr "" 794 795 #: tformserver.caption 796 msgid "Server" 797 msgstr "" 798 799 #: tformserver.label1.caption 800 msgctxt "tformserver.label1.caption" 801 msgid "Name:" 802 msgstr "" 803 804 #: tformserver.label2.caption 805 msgctxt "tformserver.label2.caption" 806 msgid "Address:" 807 msgstr "" 808 809 #: tformserver.label3.caption 810 msgctxt "tformserver.label3.caption" 811 msgid "Port:" 783 812 msgstr "" 784 813
Note:
See TracChangeset
for help on using the changeset viewer.