Changeset 227 for trunk/Forms
- Timestamp:
- Sep 9, 2018, 11:45:45 AM (6 years ago)
- Location:
- trunk/Forms
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormClient.pas
r223 r227 302 302 ToolBar1.Visible := AToolBarVisible.Checked; 303 303 StatusBar1.Visible := AStatusBarVisible.Checked; 304 AGameEndTurn.Enabled := Assigned(Client .ControlPlayer) and304 AGameEndTurn.Enabled := Assigned(Client) and Assigned(Client.ControlPlayer) and 305 305 Client.ControlPlayer.IsAlive and TurnActive; 306 ASurrender.Enabled := Assigned(Client .ControlPlayer) and306 ASurrender.Enabled := Assigned(Client) and Assigned(Client.ControlPlayer) and 307 307 Client.ControlPlayer.IsAlive; 308 308 end; -
trunk/Forms/UFormMain.lfm
r222 r227 9 9 DesignTimePPI = 144 10 10 Menu = MainMenu1 11 OnActivate = FormActivate 11 12 OnClose = FormClose 12 13 OnCreate = FormCreate -
trunk/Forms/UFormMain.pas
r221 r227 69 69 procedure AToolBarBigIconsExecute(Sender: TObject); 70 70 procedure AToolBarVisibleExecute(Sender: TObject); 71 procedure FormActivate(Sender: TObject); 71 72 procedure FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); 72 73 procedure FormShow(Sender: TObject); … … 77 78 procedure Timer1Timer(Sender: TObject); 78 79 private 80 FormActivated: Boolean; 81 procedure ApplicationStart(Ptr: IntPtr); 79 82 public 80 83 procedure LoadConfig(Config: TXmlConfig; Path: string); … … 173 176 end; 174 177 178 procedure TFormMain.FormActivate(Sender: TObject); 179 begin 180 if not FormActivated then begin 181 FormActivated := True; 182 end; 183 end; 184 175 185 procedure TFormMain.FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState 176 186 ); … … 191 201 begin 192 202 FormClient.Free; 203 end; 204 205 procedure TFormMain.ApplicationStart(Ptr: IntPtr); 206 begin 207 Core.ReopenGameOnInit; 193 208 end; 194 209 … … 202 217 ReloadView; 203 218 FormClient.Show; 219 Application.QueueAsyncCall(ApplicationStart, 0); 204 220 end; 205 221
Note:
See TracChangeset
for help on using the changeset viewer.