Changeset 11 for trunk/Forms
- Timestamp:
- Nov 15, 2012, 6:44:18 AM (12 years ago)
- Location:
- trunk/Forms
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.lfm
r10 r11 1 1 object FormMain: TFormMain 2 Left = 3 772 Left = 306 3 3 Height = 455 4 Top = 1 384 Top = 127 5 5 Width = 733 6 6 Caption = 'Attendance' 7 ClientHeight = 43 07 ClientHeight = 436 8 8 ClientWidth = 733 9 9 Menu = MainMenu1 … … 16 16 object StatusBar1: TStatusBar 17 17 Left = 0 18 Height = 2 119 Top = 4 0918 Height = 20 19 Top = 416 20 20 Width = 733 21 21 Panels = <> … … 39 39 object PageControl1: TPageControl 40 40 Left = 0 41 Height = 3 8341 Height = 390 42 42 Top = 26 43 43 Width = 733 … … 52 52 object MenuItemSystem: TMenuItem 53 53 Caption = 'System' 54 object MenuItem3: TMenuItem 55 Caption = 'Database' 56 object MenuItem4: TMenuItem 57 Action = AConnectionSettings 58 end 59 end 54 60 object MenuItem1: TMenuItem 55 61 Action = ASetting … … 73 79 Hint = 'Show global setting' 74 80 OnExecute = ASettingExecute 81 ShortCut = 120 82 end 83 object AConnectionSettings: TAction 84 Caption = 'Connection settings' 85 OnExecute = AConnectionSettingsExecute 86 ShortCut = 121 75 87 end 76 88 end -
trunk/Forms/UFormMain.lrt
r10 r11 1 1 TFORMMAIN.CAPTION=Attendance 2 2 TFORMMAIN.MENUITEMSYSTEM.CAPTION=System 3 TFORMMAIN.MENUITEM3.CAPTION=Database 3 4 TFORMMAIN.AEXIT.CAPTION=Exit 4 5 TFORMMAIN.AEXIT.HINT=Close application 5 6 TFORMMAIN.ASETTING.CAPTION=Setting 6 7 TFORMMAIN.ASETTING.HINT=Show global setting 8 TFORMMAIN.ACONNECTIONSETTINGS.CAPTION=Connection settings -
trunk/Forms/UFormMain.pas
r10 r11 14 14 15 15 TFormMain = class(TForm) 16 AConnectionSettings: TAction; 16 17 ASetting: TAction; 17 18 AExit: TAction; … … 20 21 MainMenu1: TMainMenu; 21 22 MenuItem1: TMenuItem; 23 MenuItem3: TMenuItem; 24 MenuItem4: TMenuItem; 22 25 MenuItemSystem: TMenuItem; 23 26 MenuItem2: TMenuItem; … … 26 29 ToolBar1: TToolBar; 27 30 ToolButton1: TToolButton; 31 procedure AConnectionSettingsExecute(Sender: TObject); 28 32 procedure AExitExecute(Sender: TObject); 29 33 procedure ASettingExecute(Sender: TObject); … … 47 51 48 52 uses 49 UCore, UFormSetting ;53 UCore, UFormSetting, UFormConnection; 50 54 51 55 {$R *.lfm} … … 108 112 procedure TFormMain.AExitExecute(Sender: TObject); 109 113 begin 110 Exit; 114 Close; 115 end; 116 117 procedure TFormMain.AConnectionSettingsExecute(Sender: TObject); 118 begin 119 FormConnection.LoadFromDatabase(Core.Database); 120 if FormConnection.ShowModal = mrOk then begin 121 FormConnection.SaveToDatabase(Core.Database); 122 Core.Connect; 123 end; 111 124 end; 112 125
Note:
See TracChangeset
for help on using the changeset viewer.