Changeset 7 for trunk/Forms
- Timestamp:
- Nov 14, 2012, 12:33:52 PM (12 years ago)
- Location:
- trunk/Forms
- Files:
-
- 3 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormList.lfm
r6 r7 1 1 object FormList: TFormList 2 Left = 4592 Left = 384 3 3 Height = 240 4 Top = 2365 Width = 3204 Top = 180 5 Width = 470 6 6 Caption = 'List' 7 7 ClientHeight = 240 8 ClientWidth = 3208 ClientWidth = 470 9 9 OnCreate = FormCreate 10 10 OnDestroy = FormDestroy … … 15 15 Height = 46 16 16 Top = 194 17 Width = 32017 Width = 470 18 18 Align = alBottom 19 19 ButtonHeight = 44 … … 49 49 Action = AReload 50 50 end 51 object ToolButton6: TToolButton 52 Left = 245 53 Top = 2 54 Action = APrint 55 end 56 object ToolButton7: TToolButton 57 Left = 293 58 Top = 2 59 Action = AExport 60 end 51 61 end 52 62 object ListView1: TListView … … 54 64 Height = 194 55 65 Top = 0 56 Width = 32066 Width = 470 57 67 Align = alClient 58 68 Columns = <> … … 65 75 ViewStyle = vsReport 66 76 OnData = ListView1Data 77 OnDblClick = AModifyExecute 67 78 OnSelectItem = ListView1SelectItem 68 79 end … … 75 86 Hint = 'Add new item' 76 87 ImageIndex = 1 88 OnExecute = AAddExecute 77 89 end 78 90 object ADuplicate: TAction … … 80 92 Hint = 'Duplicate item' 81 93 ImageIndex = 2 94 OnExecute = ADuplicateExecute 82 95 end 83 96 object ADelete: TAction … … 85 98 Hint = 'Delete item' 86 99 ImageIndex = 0 100 OnExecute = ADeleteExecute 87 101 end 88 102 object AModify: TAction … … 90 104 Hint = 'Modify item' 91 105 ImageIndex = 4 106 OnExecute = AModifyExecute 92 107 end 93 108 object AReload: TAction … … 95 110 Hint = 'Reload data' 96 111 ImageIndex = 5 112 end 113 object APrint: TAction 114 Caption = 'Print' 115 Hint = 'Send to printer' 116 ImageIndex = 6 117 end 118 object AExport: TAction 119 Caption = 'Export' 120 Hint = 'Export to different format' 121 ImageIndex = 7 97 122 end 98 123 end … … 220 245 object MenuItem4: TMenuItem 221 246 Action = AModify 247 Default = True 222 248 Bitmap.Data = { 223 249 36040000424D3604000000000000360000002800000010000000100000000100 -
trunk/Forms/UFormList.lrt
r6 r7 10 10 TFORMLIST.ARELOAD.CAPTION=Reload 11 11 TFORMLIST.ARELOAD.HINT=Reload data 12 TFORMLIST.APRINT.CAPTION=Print 13 TFORMLIST.APRINT.HINT=Send to printer 14 TFORMLIST.AEXPORT.CAPTION=Export 15 TFORMLIST.AEXPORT.HINT=Export to different format -
trunk/Forms/UFormList.pas
r6 r7 27 27 TFormList = class(TForm) 28 28 AAdd: TAction; 29 APrint: TAction; 30 AExport: TAction; 29 31 AReload: TAction; 30 32 AModify: TAction; … … 45 47 ToolButton4: TToolButton; 46 48 ToolButton5: TToolButton; 49 ToolButton6: TToolButton; 50 ToolButton7: TToolButton; 51 procedure AAddExecute(Sender: TObject); 52 procedure ADeleteExecute(Sender: TObject); 53 procedure ADuplicateExecute(Sender: TObject); 54 procedure AModifyExecute(Sender: TObject); 47 55 procedure FormCreate(Sender: TObject); 48 56 procedure FormDestroy(Sender: TObject); … … 68 76 69 77 uses 70 UCore; 78 UCore, UFormEdit; 79 80 resourcestring 81 SItemDeletion = 'Item deletion'; 82 SDoYouWantToDeleteItem = 'Do you want to delte item'; 71 83 72 84 { TListColumns } … … 91 103 Columns := TListDbColumn.Create; 92 104 DbRows := TDbRows.Create; 105 end; 106 107 procedure TFormList.AModifyExecute(Sender: TObject); 108 begin 109 if FormEdit.ShowModal = mrOk then begin 110 end; 111 end; 112 113 procedure TFormList.AAddExecute(Sender: TObject); 114 begin 115 if FormEdit.ShowModal = mrOk then begin 116 end; 117 end; 118 119 procedure TFormList.ADeleteExecute(Sender: TObject); 120 begin 121 if FormEdit.ShowModal = mrOk then begin 122 if MessageDlg(SItemDeletion, SDoYouWantToDeleteItem, mtConfirmation, 123 [mbYes, mbNo], 0) = mrYes then begin 124 Core.Database.Query(nil, 'DELETE FROM `' + Table + '` WHERE `Id` = ' + IntToStr(0)); 125 end; 126 end; 127 end; 128 129 procedure TFormList.ADuplicateExecute(Sender: TObject); 130 begin 131 if FormEdit.ShowModal = mrOk then begin 132 end; 93 133 end; 94 134 -
trunk/Forms/UFormMain.lfm
r6 r7 19 19 Top = 26 20 20 Width = 733 21 ActivePage = TabSheet Terminals21 ActivePage = TabSheetOperations 22 22 Align = alClient 23 23 Images = ImageList1 24 TabIndex = 224 TabIndex = 4 25 25 TabOrder = 0 26 26 object TabSheetUsers: TTabSheet 27 27 Caption = 'Users' 28 OnHide = TabSheetUsersHide29 28 OnShow = TabSheetUsersShow 30 29 end 31 30 object TabSheetAttendance: TTabSheet 32 31 Caption = 'Attendance' 32 OnShow = TabSheetAttendanceShow 33 33 end 34 34 object TabSheetTerminals: TTabSheet … … 38 38 object TabSheetHolidays: TTabSheet 39 39 Caption = 'Holidays' 40 OnShow = TabSheetHolidaysShow 40 41 end 41 42 object TabSheetOperations: TTabSheet 42 43 Caption = 'Operations' 44 OnShow = TabSheetOperationsShow 45 end 46 object TabSheetPassage: TTabSheet 47 Caption = 'Passage' 48 OnShow = TabSheetPassageShow 43 49 end 44 50 end … … 98 104 top = 168 99 105 Bitmap = { 100 4C690 60000001000000010000000000000000000000000000000000000000000106 4C69080000001000000010000000000000000000000000000000000000000000 101 107 0000000000000000000000000000000000000000000000000000000000000000 102 108 000000000000000000000000000000000000000000008C8CBBFF000088FF8C8C … … 290 296 0000000000000000000000000000000000000000000000000000000000000000 291 297 0000000000000000000000000000000000000000000000000000000000000000 292 0000000000000000000000000000 298 0000000000000000000000000000000000000000000000000000C17D4460C88B 299 4DBBC88C4FFEC88C4FFFC88D4FF7C98C4FF7C5894CFEC4763B94000000000000 300 0000000000000000000000000000000000000000000000000000C48649FAF7F2 301 ECFFF8F4EEFFF8F3EDFFF8F3EDFFF8F2ECFFF2E6D7FFE2B27DFFDA9163F6B46B 302 3E07000000000000000000000000000000000000000000000000C6894CF6F9F5 303 F1FFFCE3CDFFFBE3CDFFF9E0C8FFF8DCC2FFFDFBF8FFFCE6CDFFE2B684FFBF79 304 42A6000000000000000000000000000000000000000000000000C6894BF7F9F5 305 F1FFFCE3CFFFFCE4CFFFFAE1CAFFF9DDC4FFF4E9DFFFF7F2ECFFF5EFE9FFC27E 306 45FB000000000000000000000000000000000000000081818109C5894BF9F9F4 307 F0FFFCE6D3FFFDE7D3FFFBE3CDFFFAE0C8FFF5D6BBFFF3D4B5FFF8F4F0FFC382 308 46F96060600900000000000000000000000081818163818181F3C5894CFFF9F4 309 EFFFFEE7D7FFFDE7D5FFFCE6D2FFFBE1CCFFF8DCC2FFF6DABDFFFAF4EFFFC483 310 48FF595959F35353536300000000818181459A9A9AFFCCCCCCFFC78B4EFFF9F4 311 EDFFFEE8D8FFFEE8D7FFFDE5D3FFFCE4D1FFFAE0C7FFF9DDC3FFFAF4EDFFC785 312 4AFFC3C3C3FF747474FF47474745818181D2D2D2D2FFE8E8E8FF7D7D7DFF7D7D 313 7DFF7D7D7DFF7D7D7DFF7D7D7DFF7D7D7DFF7D7D7DFF7D7D7DFF7D7D7DFF7D7D 314 7DFFE8E8E8FFC4C4C4FF565656DC818181F9FCFCFCFFFCFCFCFFCBCBCBFFF2F2 315 F2FFF2F2F2FFF2F2F2FFF2F2F2FFF2F2F2FFF2F2F2FFF2F2F2FFF2F2F2FFC6C6 316 C6FFFCFCFCFFFCFCFCFF707070FE7E7E7EFFF9F9F9FFF9F9F9FFABABABFFDFDF 317 DFFFCBCBCBFFCBCBCBFFCBCBCBFFCBCBCBFFCBCBCBFFCBCBCBFFDFDFDFFFA3A3 318 A3FFF9F9F9FFF9F9F9FF616161FF7A7A7AFFD7D7D7FFD7D7D7FF979797FFD8D8 319 D8FFBFBFBFFFBFBFBFFFBFBFBFFFBFBFBFFFBFBFBFFFBFBFBFFFD7D7D7FF8E8E 320 8EFFD7D7D7FFD7D7D7FF3F3F3FFF757575FFBBBBBBFFBBBBBBFF8D8D8DFFD4D4 321 D4FFB9B9B9FFB9B9B9FFB9B9B9FFB9B9B9FFB9B9B9FFB9B9B9FFD3D3D3FF8383 322 83FFBBBBBBFFBBBBBBFF2A2A2AFF707070FFB5B5B5FFB5B5B5FF959595FF8181 323 81FF818181FF797979FF6E6E6EFF616161FF525252FF434343FF424242FF6E6E 324 6EFFB5B5B5FFB5B5B5FF252525FF6A6A6AFDA7A7A7FFB5B5B5FF818181FFAFAC 325 AAFFC5C0BDFFC5C0BDFFC5C0BDFFC5C0BDFFC5C0BDFFC5C0BDFFADAAA8FF2C2C 326 2CFFB5B5B5FF9B9B9BFF232323FF636363995D5D5DD2585858FFC79561FFF9F7 327 F6FFF9F1ECFFF9F1EBFFF8F0E9FFF7EDE6FFF4EAE1FFF2E8DEFFFAF8F6FFC794 328 61FF242424FF232323D12323237A000000000000000000000000C89561FDCA98 329 65FFCA9765FFCA9765FFCA9765FFCA9764FFC99764FFC99764FFCA9865FFC894 330 61FD000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 331 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 332 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 333 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 334 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00757575FF757575FF757575FF7575 335 75FF757575FF757575FF757575FF757575FF757575FF757575FF757575FFFFFF 336 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00757575FFAAAAAAFFAAAAAAFFAAAA 337 AAFFAAAAAAFFAAAAAAFFAAAAAAFFAAAAAAFFAAAAAAFFAAAAAAFF757575FFFFFF 338 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00757575FFFFFFFFFFFFFFFFFFFFFF 339 FFFFFFFFFFFFFFFFFFFFF9F9F9FFF6F6F6FFF1F1F1FFEDEDEDFF757575FFFFFF 340 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00757575FFFFFFFFFF999999FFFFFF 341 FFFF999999FFFCFCFCFF999999FFF6F6F6FF999999FFEDEDEDFF757575FFFFFF 342 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00757575FFFFFFFFFF999999FFFDFD 343 FDFF999999FFF6F6F6FF999999FFEDEDEDFF999999FFE7E7E7FF757575FFFFFF 344 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00757575FFFFFFFFFF999999FFF9F9 345 F9FF999999FFF1F1F1FF999999FFE8E8E8FF999999FFE2E2E2FF757575FFFFFF 346 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00757575FFFFFFFFFF999999FFF6F6 347 F6FF999999FFEDEDEDFF999999FFE3E3E3FF999999FFDBDBDBFF757575FFFFFF 348 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00757575FFFFFFFFFF999999FFF1F1 349 F1FF999999FFE8E8E8FF999999FFDFDFDFFF999999FFD7D7D7FF757575FFFFFF 350 FF00FFFFFFFFFFFFFF00FFFFFF00FFFFFF00757575FFFFFFFFFF999999FFEDED 351 EDFF999999FFE3E3E3FF999999FFDADADAFFD6D6D6FFEDEDEDFFC8C8C8FFFFFF 352 FF00191919FFFFFFFFFFFFFFFF00FFFFFF00757575FFFFFFFFFFEDEDEDFFE8E8 353 E8FFE3E3E3FFDFDFDFFFDADADAFFC2C2C2FFA0A0A0FF7C7C7CFF303030FF3E3E 354 3EFF1A1A1AFF000000FFFFFFFFFFFFFFFF00757575FF757575FF757575FF7575 355 75FF757575FF757575FF757575FF6A6A6AFF595959FF454545FF303030FF3E3E 356 3EFF191919FF000000FF000000FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 357 FF00FFFFFF00FFFFFF00FFFFFF00E6E6E6FFC1C1C1FF969696FF696969FF3E3E 358 3EFF191919FF000000FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 359 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 360 FF00191919FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 361 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 362 FF00FFFFFF00FFFFFF00FFFFFF00 293 363 } 294 364 end -
trunk/Forms/UFormMain.lrt
r6 r7 5 5 TFORMMAIN.TABSHEETHOLIDAYS.CAPTION=Holidays 6 6 TFORMMAIN.TABSHEETOPERATIONS.CAPTION=Operations 7 TFORMMAIN.TABSHEETPASSAGE.CAPTION=Passage 7 8 TFORMMAIN.MENUITEMSYSTEM.CAPTION=System 8 9 TFORMMAIN.AEXIT.CAPTION=Exit -
trunk/Forms/UFormMain.pas
r6 r7 24 24 PageControl1: TPageControl; 25 25 StatusBar1: TStatusBar; 26 TabSheetPassage: TTabSheet; 26 27 TabSheetHolidays: TTabSheet; 27 28 TabSheetOperations: TTabSheet; … … 37 38 procedure FormDestroy(Sender: TObject); 38 39 procedure FormShow(Sender: TObject); 40 procedure TabSheetAttendanceShow(Sender: TObject); 41 procedure TabSheetHolidaysShow(Sender: TObject); 42 procedure TabSheetOperationsShow(Sender: TObject); 43 procedure TabSheetPassageShow(Sender: TObject); 39 44 procedure TabSheetTerminalsShow(Sender: TObject); 40 procedure TabSheetUsersHide(Sender: TObject);41 45 procedure TabSheetUsersShow(Sender: TObject); 42 46 private … … 70 74 SLogin = 'Login'; 71 75 SPassword = 'Password'; 76 STerminal = 'Terminal'; 77 SUser = 'User'; 78 STime = 'Time'; 79 SOperation = 'Operation'; 80 SDay = 'Day'; 81 SMonth = 'Month'; 82 SYear = 'Year'; 83 SKeyNumber = 'Key number'; 72 84 73 85 { TFormMain } … … 103 115 end; 104 116 117 procedure TFormMain.TabSheetAttendanceShow(Sender: TObject); 118 begin 119 end; 120 121 procedure TFormMain.TabSheetHolidaysShow(Sender: TObject); 122 begin 123 if Assigned(Core.FormList) then Core.FormList.Free; 124 Core.FormList := TFormList.Create(Self); 125 Core.CoolTranslator1.TranslateComponentRecursive(Core.FormList); 126 with TFormList(Core.FormList) do begin 127 ManualDock(TTabSheet(Sender)); 128 Align := alClient; 129 Show; 130 with Columns do begin 131 AddItem(SEnabled, 'Enabled', True, 30); 132 AddItem(SName, 'Name', True, 300); 133 AddItem(SDay, 'Day', True, 50); 134 AddItem(SMonth, 'Month', True, 50); 135 AddItem(SYear, 'Year', True, 50); 136 end; 137 Table := 'Holiday'; 138 UpdateData; 139 end; 140 end; 141 142 procedure TFormMain.TabSheetOperationsShow(Sender: TObject); 143 begin 144 if Assigned(Core.FormList) then Core.FormList.Free; 145 Core.FormList := TFormList.Create(Self); 146 Core.CoolTranslator1.TranslateComponentRecursive(Core.FormList); 147 with TFormList(Core.FormList) do begin 148 ManualDock(TTabSheet(Sender)); 149 Align := alClient; 150 Show; 151 with Columns do begin 152 AddItem(SEnabled, 'Name', True, 100); 153 AddItem(SKeyNumber, 'KeyId', True, 30); 154 end; 155 Table := 'Operation'; 156 UpdateData; 157 end; 158 end; 159 160 procedure TFormMain.TabSheetPassageShow(Sender: TObject); 161 begin 162 if Assigned(Core.FormList) then Core.FormList.Free; 163 Core.FormList := TFormList.Create(Self); 164 Core.CoolTranslator1.TranslateComponentRecursive(Core.FormList); 165 with TFormList(Core.FormList) do begin 166 ManualDock(TTabSheet(Sender)); 167 Align := alClient; 168 Show; 169 with Columns do begin 170 AddItem(STime, 'Time', True, 80); 171 AddItem(SUser, 'User', True, 80); 172 AddItem(SOperation, 'Operation', True, 80); 173 AddItem(STerminal, 'Terminal', True, 80); 174 end; 175 Table := 'Passage'; 176 UpdateData; 177 end; 178 end; 179 105 180 procedure TFormMain.TabSheetTerminalsShow(Sender: TObject); 106 181 begin 107 Core.FormTerminals := TFormList.Create(Self); 108 with TFormList(Core.FormTerminals) do begin 182 if Assigned(Core.FormList) then Core.FormList.Free; 183 Core.FormList := TFormList.Create(Self); 184 Core.CoolTranslator1.TranslateComponentRecursive(Core.FormList); 185 with TFormList(Core.FormList) do begin 109 186 ManualDock(TTabSheet(Sender)); 110 187 Align := alClient; … … 112 189 with Columns do begin 113 190 AddItem(SName, 'Name', True, 80); 114 AddItem(SEnabled, 'Enabled', True, 80);115 AddItem(SAddress, 'Address', True, 80);116 AddItem(SPort, 'Port', True, 80);191 AddItem(SEnabled, 'Enabled', True, 30); 192 AddItem(SAddress, 'Address', True, 120); 193 AddItem(SPort, 'Port', True, 50); 117 194 AddItem(SType, 'Type', True, 80); 118 195 AddItem(SNote, 'Note', True, 80); … … 123 200 end; 124 201 125 procedure TFormMain.TabSheetUsersHide(Sender: TObject);126 begin127 FreeAndNil(Core.FormUsers);128 end;129 130 202 procedure TFormMain.TabSheetUsersShow(Sender: TObject); 131 203 begin 132 Core.FormUsers := TFormList.Create(Self); 133 with TFormList(Core.FormUsers) do begin 134 ManualDock(TTabSheet(Sender)); 135 Align := alClient; 136 Show; 137 with Columns do begin 138 AddItem(SEnabled, 'Enabled', True, 80); 204 if Assigned(Core.FormList) then Core.FormList.Free; 205 Core.FormList := TFormList.Create(Self); 206 Core.CoolTranslator1.TranslateComponentRecursive(Core.FormList); 207 with TFormList(Core.FormList) do begin 208 ManualDock(TTabSheet(Sender)); 209 Align := alClient; 210 Show; 211 with Columns do begin 212 AddItem(SEnabled, 'Enabled', True, 30); 139 213 AddItem(SPersonalId, 'PersonalId', True, 80); 140 214 AddItem(SLogin, 'Login', False, 80);
Note:
See TracChangeset
for help on using the changeset viewer.