Changeset 100 for trunk/Forms
- Timestamp:
- Feb 8, 2022, 5:13:22 PM (3 years ago)
- Location:
- trunk/Forms
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormContact.lfm
r95 r100 18 18 Top = 8 19 19 Width = 1009 20 ActivePage = TabSheet Work20 ActivePage = TabSheetGeneral 21 21 Anchors = [akTop, akLeft, akRight, akBottom] 22 22 ParentFont = False 23 TabIndex = 223 TabIndex = 0 24 24 TabOrder = 0 25 25 object TabSheetGeneral: TTabSheet … … 114 114 Height = 43 115 115 Top = 442 116 Width = 2 65116 Width = 216 117 117 ParentFont = False 118 118 TabOrder = 14 … … 229 229 Height = 43 230 230 Top = 442 231 Width = 2 65231 Width = 217 232 232 ParentFont = False 233 233 TabOrder = 15 … … 334 334 ImageIndex = 16 335 335 OnClick = SpeedButtonEmailClick 336 ShowHint = True 337 ParentShowHint = False 338 end 339 object SpeedButtonBirthDay: TSpeedButton 340 Left = 372 341 Height = 43 342 Hint = 'Select date' 343 Top = 442 344 Width = 43 345 Images = Core.ImageList1 346 ImageIndex = 17 347 OnClick = SpeedButtonBirthDayClick 348 ShowHint = True 349 ParentShowHint = False 350 end 351 object SpeedButtonAniversary: TSpeedButton 352 Left = 821 353 Height = 43 354 Hint = 'Select date' 355 Top = 442 356 Width = 43 357 Images = Core.ImageList1 358 ImageIndex = 17 359 OnClick = SpeedButtonAniversaryClick 336 360 ShowHint = True 337 361 ParentShowHint = False … … 436 460 TabOrder = 6 437 461 object Label36: TLabel 438 Left = 8462 Left = 10 439 463 Height = 27 440 464 Top = 19 … … 572 596 Images = Core.ImageList1 573 597 ImageIndex = 15 574 OnClick = peedButtonHomeWebClick598 OnClick = SpeedButtonHomeWebClick 575 599 ShowHint = True 576 600 ParentShowHint = False … … 1365 1389 object PopupMenuPhoto: TPopupMenu 1366 1390 Images = Core.ImageList1 1367 Left = 4831368 Top = 5 081391 Left = 872 1392 Top = 592 1369 1393 object MenuItem1: TMenuItem 1370 1394 Action = APhotoLoad … … 1378 1402 end 1379 1403 object OpenPictureDialog1: TOpenPictureDialog 1404 Title = 'Open existing file' 1380 1405 Left = 175 1381 1406 Top = 575 1382 1407 end 1383 1408 object SavePictureDialog1: TSavePictureDialog 1409 Title = 'Save file as' 1384 1410 Left = 176 1385 1411 Top = 488 1386 1412 end 1413 object CalendarDialog1: TCalendarDialog 1414 Title = 'Select date' 1415 Date = 44600 1416 OKCaption = '&OK' 1417 CancelCaption = 'Cancel' 1418 Left = 448 1419 Top = 608 1420 end 1387 1421 end -
trunk/Forms/UFormContact.lrj
r95 r100 21 21 {"hash":262626066,"name":"tformcontact.speedbuttonweb.hint","sourcebytes":[79,112,101,110,32,105,110,32,119,101,98,32,98,114,111,119,115,101,114],"value":"Open in web browser"}, 22 22 {"hash":102887636,"name":"tformcontact.speedbuttonemail.hint","sourcebytes":[79,112,101,110,32,105,110,32,101,109,97,105,108,32,99,108,105,101,110,116],"value":"Open in email client"}, 23 {"hash":171928085,"name":"tformcontact.speedbuttonbirthday.hint","sourcebytes":[83,101,108,101,99,116,32,100,97,116,101],"value":"Select date"}, 24 {"hash":171928085,"name":"tformcontact.speedbuttonaniversary.hint","sourcebytes":[83,101,108,101,99,116,32,100,97,116,101],"value":"Select date"}, 23 25 {"hash":325173,"name":"tformcontact.tabsheethome.caption","sourcebytes":[72,111,109,101],"value":"Home"}, 24 26 {"hash":138641338,"name":"tformcontact.label7.caption","sourcebytes":[69,45,109,97,105,108,58],"value":"E-mail:"}, … … 92 94 {"hash":8431845,"name":"tformcontact.aphotoload.caption","sourcebytes":[76,111,97,100,32,102,114,111,109,32,102,105,108,101],"value":"Load from file"}, 93 95 {"hash":9308581,"name":"tformcontact.aphotosave.caption","sourcebytes":[83,97,118,101,32,116,111,32,102,105,108,101],"value":"Save to file"}, 94 {"hash":4860802,"name":"tformcontact.aphotoclear.caption","sourcebytes":[67,108,101,97,114],"value":"Clear"} 96 {"hash":4860802,"name":"tformcontact.aphotoclear.caption","sourcebytes":[67,108,101,97,114],"value":"Clear"}, 97 {"hash":218146437,"name":"tformcontact.openpicturedialog1.title","sourcebytes":[79,112,101,110,32,101,120,105,115,116,105,110,103,32,102,105,108,101],"value":"Open existing file"}, 98 {"hash":159035875,"name":"tformcontact.savepicturedialog1.title","sourcebytes":[83,97,118,101,32,102,105,108,101,32,97,115],"value":"Save file as"}, 99 {"hash":171928085,"name":"tformcontact.calendardialog1.title","sourcebytes":[83,101,108,101,99,116,32,100,97,116,101],"value":"Select date"}, 100 {"hash":11067,"name":"tformcontact.calendardialog1.okcaption","sourcebytes":[38,79,75],"value":"&OK"}, 101 {"hash":77089212,"name":"tformcontact.calendardialog1.cancelcaption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"} 95 102 ]} -
trunk/Forms/UFormContact.pas
r95 r100 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 9 ComCtrls, ActnList, Menus, ExtCtrls, ExtDlgs, Buttons, UContact, LCLIntf, 10 UFormProperties ;10 UFormProperties, DateUtils{$IFDEF LCLGTK2}, Gtk2Globals{$ENDIF}; 11 11 12 12 type … … 23 23 ButtonOk: TButton; 24 24 ButtonPrevious: TButton; 25 CalendarDialog1: TCalendarDialog; 25 26 EditAim: TEdit; 26 27 EditCategories: TEdit; … … 173 174 PopupMenuPhoto: TPopupMenu; 174 175 SavePictureDialog1: TSavePictureDialog; 176 SpeedButtonBirthDay: TSpeedButton; 177 SpeedButtonAniversary: TSpeedButton; 175 178 SpeedButtonHomeEmail: TSpeedButton; 176 179 SpeedButtonEmail: TSpeedButton; … … 195 198 procedure FormDestroy(Sender: TObject); 196 199 procedure FormShow(Sender: TObject); 197 procedure peedButtonHomeWebClick(Sender: TObject); 200 procedure SpeedButtonHomeWebClick(Sender: TObject); 201 procedure SpeedButtonAniversaryClick(Sender: TObject); 202 procedure SpeedButtonBirthDayClick(Sender: TObject); 198 203 procedure SpeedButtonEmailClick(Sender: TObject); 199 204 procedure SpeedButtonHomeEmailClick(Sender: TObject); … … 246 251 UCore, UCommon; 247 252 253 function DateToISO(Date: TDateTime): string; 254 begin 255 Result := FormatDateTime('yyyy-mm-dd', Date); 256 end; 257 248 258 { TFormContact } 249 259 250 260 procedure TFormContact.FormShow(Sender: TObject); 251 261 begin 262 {$IFDEF LCLGTK2} 263 // GTK2 bug workaround https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/35720 264 if Visible then LastMouse.WinControl := PageControlContact.ActivePage; 265 {$ENDIF} 252 266 Core.PersistentForm1.Load(Self); 253 267 … … 266 280 end; 267 281 268 procedure TFormContact. peedButtonHomeWebClick(Sender: TObject);282 procedure TFormContact.SpeedButtonHomeWebClick(Sender: TObject); 269 283 begin 270 284 if EditHomeWeb.Text <> '' then OpenURL(EditHomeWeb.Text); 285 end; 286 287 procedure TFormContact.SpeedButtonAniversaryClick(Sender: TObject); 288 var 289 Date: TDateTime; 290 begin 291 if TryISOStrToDate(EditAniversary.Text, Date) then 292 CalendarDialog1.Date := Date 293 else CalendarDialog1.Date := Now; 294 if CalendarDialog1.Execute then 295 EditAniversary.Text := DateToISO(CalendarDialog1.Date); 296 end; 297 298 procedure TFormContact.SpeedButtonBirthDayClick(Sender: TObject); 299 var 300 Date: TDateTime; 301 begin 302 if TryISOStrToDate(EditBirthday.Text, Date) then 303 CalendarDialog1.Date := Date 304 else CalendarDialog1.Date := Now; 305 if CalendarDialog1.Execute then 306 EditBirthday.Text := DateToISO(CalendarDialog1.Date); 271 307 end; 272 308
Note:
See TracChangeset
for help on using the changeset viewer.