Changeset 249 for trunk/Forms/UFormMain.pas
- Timestamp:
- Sep 22, 2018, 9:37:16 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r243 r249 18 18 19 19 TFormMain = class(TForm) 20 AStatusBarVisible: TAction; 20 21 AToolBarVisible: TAction; 21 22 AToolBarBigIcons: TAction; … … 67 68 ToolButton5: TToolButton; 68 69 ToolButton9: TToolButton; 70 procedure AStatusBarVisibleExecute(Sender: TObject); 69 71 procedure AToolBarBigIconsExecute(Sender: TObject); 70 72 procedure AToolBarVisibleExecute(Sender: TObject); … … 80 82 FormActivated: Boolean; 81 83 procedure ApplicationStart(Ptr: IntPtr); 84 procedure UpdateClientForms; 82 85 public 83 86 procedure LoadConfig(Config: TXmlConfig; Path: string); … … 121 124 AToolBarBigIcons.Checked := GetValue(DOMString(Path + '/LargeIcons'), False); 122 125 AToolBarVisible.Checked := GetValue(DOMString(Path + '/ToolBarVisible'), True); 126 AStatusBarVisible.Checked := GetValue(DOMString(Path + '/StatusBarVisible'), False); 123 127 end; 124 128 end; … … 129 133 SetValue(DOMString(Path + '/LargeIcons'), AToolBarBigIcons.Checked); 130 134 SetValue(DOMString(Path + '/ToolBarVisible'), AToolBarVisible.Checked); 135 SetValue(DOMString(Path + '/StatusBarVisible'), AStatusBarVisible.Checked); 131 136 end; 132 137 end; … … 164 169 end; 165 170 171 procedure TFormMain.AStatusBarVisibleExecute(Sender: TObject); 172 begin 173 AStatusBarVisible.Checked := not AStatusBarVisible.Checked; 174 UpdateClientForms; 175 end; 176 166 177 procedure TFormMain.AToolBarBigIconsExecute(Sender: TObject); 167 178 begin 168 179 AToolBarBigIcons.Checked := not AToolBarBigIcons.Checked; 169 180 ReloadView; 181 UpdateClientForms; 170 182 end; 171 183 … … 174 186 AToolBarVisible.Checked := not AToolBarVisible.Checked; 175 187 ReloadView; 188 UpdateClientForms; 176 189 end; 177 190 … … 206 219 begin 207 220 Core.ReopenGameOnInit; 221 end; 222 223 procedure TFormMain.UpdateClientForms; 224 var 225 I: Integer; 226 begin 227 FormClient.AToolBarBigIcons.Checked := AToolBarBigIcons.Checked; 228 FormClient.AToolBarBigIcons.Update; 229 FormClient.AToolBarVisible.Checked := AToolBarVisible.Checked; 230 FormClient.AToolBarVisible.Update; 231 FormClient.AStatusBarVisible.Checked := AStatusBarVisible.Checked; 232 FormClient.AStatusBarVisible.Update; 233 for I := 0 to Core.FormClients.Count - 1 do begin 234 Core.FormClients[I].AToolBarBigIcons.Checked := AToolBarBigIcons.Checked; 235 Core.FormClients[I].AToolBarBigIcons.Update; 236 Core.FormClients[I].AToolBarVisible.Checked := AToolBarVisible.Checked; 237 Core.FormClients[I].AToolBarVisible.Update; 238 Core.FormClients[I].AStatusBarVisible.Checked := AStatusBarVisible.Checked; 239 Core.FormClients[I].AStatusBarVisible.Update; 240 end; 208 241 end; 209 242 … … 218 251 ReloadView; 219 252 FormClient.Show; 253 UpdateClientForms; 220 254 Application.QueueAsyncCall(ApplicationStart, 0); 221 255 end;
Note:
See TracChangeset
for help on using the changeset viewer.