- Timestamp:
- Nov 14, 2012, 2:58:35 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Dochazka.lpi
r7 r8 89 89 </Item4> 90 90 </RequiredPackages> 91 <Units Count=" 9">91 <Units Count="10"> 92 92 <Unit0> 93 93 <Filename Value="Dochazka.lpr"/> … … 148 148 <UnitName Value="UFormEdit"/> 149 149 </Unit8> 150 <Unit9> 151 <Filename Value="UDataView.pas"/> 152 <IsPartOfProject Value="True"/> 153 <UnitName Value="UDataView"/> 154 </Unit9> 150 155 </Units> 151 156 </ProjectOptions> -
trunk/Dochazka.lpr
r7 r8 9 9 Interfaces, // this includes the LCL widgetset 10 10 Forms, UFormMain, UCore, UAttendance, UPersistentForm, CoolWeb, Common, 11 CoolTranslator, UFormSetting, SysUtils, UFormList, UFormEdit 11 CoolTranslator, UFormSetting, SysUtils, UFormList, UFormEdit, UDataView 12 12 { you can add units after this }; 13 13 -
trunk/Forms/UFormEdit.lfm
r7 r8 8 8 ClientWidth = 538 9 9 OnCreate = FormCreate 10 OnDestroy = FormDestroy 10 11 LCLVersion = '1.1' 11 12 object ButtonOk: TButton -
trunk/Forms/UFormEdit.pas
r7 r8 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 Buttons, ExtCtrls ;9 Buttons, ExtCtrls, SpecializedList, SpecializedDictionary; 10 10 11 11 type 12 TControlType = (ctLabel, ctCheckBox, ctEdit, ctMemo, ctDate, ctTime, 13 ctComboBox); 14 15 TFormItem = class 16 Caption: string; 17 Name: string; 18 Visible: Boolean; 19 Rect: TRect; 20 ControlType: TControlType; 21 TitlePlacement: TAlign; 22 end; 23 24 { TFormItems } 25 26 TFormItems = class(TListObject) 27 function AddItem(Caption, Name: string; ControlType: TControlType; 28 Visible: Boolean; Rect: TRect): TFormItem; 29 end; 12 30 13 31 { TFormEdit } … … 18 36 ButtonCancel: TButton; 19 37 procedure FormCreate(Sender: TObject); 38 procedure FormDestroy(Sender: TObject); 20 39 private 21 40 { private declarations } 22 41 public 23 { public declarations } 42 RuntimeControls: TListObject; 43 FormItems: TFormItems; 44 Values: TDictionaryStringString; 45 procedure Update; 24 46 end; 25 47 … … 29 51 implementation 30 52 53 { TFormItems } 54 55 function TFormItems.AddItem(Caption, Name: string; ControlType: TControlType; 56 Visible: Boolean; Rect: TRect): TFormItem; 57 begin 58 Result := TFormItem.Create; 59 Result.Caption := Caption; 60 Result.Name := Name; 61 Result.Visible := Visible; 62 Result.Rect := Rect; 63 Result.ControlType := ControlType; 64 Add(Result); 65 end; 66 31 67 {$R *.lfm} 32 68 … … 35 71 procedure TFormEdit.FormCreate(Sender: TObject); 36 72 begin 73 FormItems := TFormItems.Create; 74 Values := TDictionaryStringString.Create; 75 RuntimeControls := TListObject.Create; 76 end; 37 77 78 procedure TFormEdit.FormDestroy(Sender: TObject); 79 begin 80 Values.Free; 81 RuntimeControls.Free; 82 FormItems.Free; 83 end; 84 85 procedure TFormEdit.Update; 86 var 87 NewControl: TControl; 88 I: Integer; 89 TitleRect: TRect; 90 const 91 W = 50; 92 H = 32; 93 begin 94 RuntimeControls.Clear; 95 for I := 0 to FormItems.Count - 1 do 96 with TFormItem(FormItems[I]) do begin 97 if TitlePlacement <> alNone then begin 98 NewControl := TLabel.Create(Self); 99 NewControl.Parent := Self; 100 NewControl.Caption := Caption; 101 TitleRect := Rect; 102 case TitlePlacement of 103 alLeft: TitleRect.Left := TitleRect.Left - 1; 104 alRight: TitleRect.Left := TitleRect.Left + 1; 105 alTop: TitleRect.Top := TitleRect.Top - 1; 106 alBottom: TitleRect.Top := TitleRect.Top + 1; 107 end; 108 NewControl.SetBounds(TitleRect.Left * W, TitleRect.Top * H, 109 (TitleRect.Right - TitleRect.Left) * W, (TitleRect.Bottom - TitleRect.Top) * H); 110 NewControl.Show; 111 end; 112 if ControlType = ctLabel then begin 113 NewControl := TLabel.Create(Self); 114 NewControl.Parent := Self; 115 NewControl.Caption := Values.Values[Name]; 116 NewControl.SetBounds(Rect.Left * W, Rect.Top * H, 117 (Rect.Right - Rect.Left) * W, (Rect.Bottom - Rect.Top) * H); 118 NewControl.Show; 119 end else 120 if ControlType = ctEdit then begin 121 NewControl.Show; 122 NewControl := TEdit.Create(Self); 123 TEdit(NewControl).Text := Values.Values[Name]; 124 NewControl.Parent := Self; 125 NewControl.SetBounds((Rect.Left + 1) * W, Rect.Top * H, 126 (Rect.Right - Rect.Left) * W, (Rect.Bottom - Rect.Top) * H); 127 NewControl.Show; 128 end else 129 if ControlType = ctEdit then begin 130 NewControl := TMemo.Create(Self); 131 NewControl.Parent := Self; 132 TMemo(NewControl).Lines.Text := Values.Values[Name]; 133 NewControl.SetBounds((Rect.Left + 1) * W, Rect.Top * H, 134 (Rect.Right - Rect.Left) * W, (Rect.Bottom - Rect.Top) * H); 135 NewControl.Show; 136 end else 137 if ControlType = ctCheckBox then begin 138 NewControl := TCheckBox.Create(Self); 139 NewControl.Parent := Self; 140 TCheckBox(NewControl).Enabled := Values.Values[Name] = '1'; 141 NewControl.SetBounds((Rect.Left + 1) * W, Rect.Top * H, 142 (Rect.Right - Rect.Left) * W, (Rect.Bottom - Rect.Top) * H); 143 NewControl.Show; 144 end else 145 if ControlType = ctComboBox then begin 146 NewControl := TComboBox.Create(Self); 147 NewControl.Parent := Self; 148 TComboBox(NewControl).Text := Values.Values[Name]; 149 NewControl.SetBounds((Rect.Left + 1) * W, Rect.Top * H, 150 (Rect.Right - Rect.Left) * W, (Rect.Bottom - Rect.Top) * H); 151 NewControl.Show; 152 end; 153 end; 38 154 end; 39 155 -
trunk/Forms/UFormList.lfm
r7 r8 1 1 object FormList: TFormList 2 Left = 38 43 Height = 2404 Top = 1 805 Width = 4702 Left = 385 3 Height = 397 4 Top = 172 5 Width = 588 6 6 Caption = 'List' 7 ClientHeight = 2408 ClientWidth = 4707 ClientHeight = 397 8 ClientWidth = 588 9 9 OnCreate = FormCreate 10 10 OnDestroy = FormDestroy … … 14 14 Left = 0 15 15 Height = 46 16 Top = 19417 Width = 47016 Top = 351 17 Width = 588 18 18 Align = alBottom 19 19 ButtonHeight = 44 … … 62 62 object ListView1: TListView 63 63 Left = 0 64 Height = 19464 Height = 333 65 65 Top = 0 66 Width = 47066 Width = 588 67 67 Align = alClient 68 68 Columns = <> … … 77 77 OnDblClick = AModifyExecute 78 78 OnSelectItem = ListView1SelectItem 79 end 80 object Panel1: TPanel 81 Left = 0 82 Height = 18 83 Top = 333 84 Width = 588 85 Align = alBottom 86 ClientHeight = 18 87 ClientWidth = 588 88 TabOrder = 2 89 object LabelItemCount: TLabel 90 Left = 8 91 Height = 13 92 Top = 2 93 Width = 75 94 Caption = 'Item count: %s' 95 ParentColor = False 96 end 79 97 end 80 98 object ActionList1: TActionList -
trunk/Forms/UFormList.lrt
r7 r8 1 1 TFORMLIST.CAPTION=List 2 TFORMLIST.LABELITEMCOUNT.CAPTION=Item count: %s 2 3 TFORMLIST.AADD.CAPTION=Add 3 4 TFORMLIST.AADD.HINT=Add new item -
trunk/Forms/UFormList.pas
r7 r8 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 9 ActnList, Menus, SpecializedList, USqlDatabase, UListViewSort; 9 ActnList, Menus, StdCtrls, ExtCtrls, SpecializedList, USqlDatabase, 10 UListViewSort, UDataView, URegistry; 10 11 11 12 type … … 21 22 TListDbColumn = class(TListObject) 22 23 procedure AddItem(Caption, Name: string; Visible: Boolean; Width: Integer); 24 end; 25 26 { TDataViewList } 27 28 TDataViewList = class(TDataView) 29 Caption: string; 30 Name: string; 31 ImageIndex: Integer; 32 Columns: TListDbColumn; 33 constructor Create; 34 destructor Destroy; override; 35 procedure LoadFromRegistry(Context: TRegistryContext); 36 procedure SaveToRegistry(Context: TRegistryContext); 23 37 end; 24 38 … … 34 48 ADuplicate: TAction; 35 49 ActionList1: TActionList; 50 LabelItemCount: TLabel; 36 51 ListView1: TListView; 37 52 MenuItem1: TMenuItem; … … 40 55 MenuItem4: TMenuItem; 41 56 MenuItem5: TMenuItem; 57 Panel1: TPanel; 42 58 PopupMenu1: TPopupMenu; 43 59 ToolBar1: TToolBar; … … 60 76 Selected: Boolean); 61 77 private 78 FDataViewList: TDataViewList; 79 procedure SetDataViewList(AValue: TDataViewList); 62 80 public 63 Columns: TListDbColumn;64 81 DbRows: TDbRows; 65 Table: string;82 property DataViewList: TDataViewList read FDataViewList write SetDataViewList; 66 83 procedure UpdateInterface; 67 84 procedure UpdateData; … … 80 97 resourcestring 81 98 SItemDeletion = 'Item deletion'; 82 SDoYouWantToDeleteItem = 'Do you want to delte item'; 99 SDoYouWantToDeleteItem = 'Do you want to really delete item?'; 100 SItemCount = 'Item count: %s'; 101 102 { TDataViewList } 103 104 constructor TDataViewList.Create; 105 begin 106 Columns := TListDbColumn.Create; 107 end; 108 109 destructor TDataViewList.Destroy; 110 begin 111 Columns.Free; 112 inherited Destroy; 113 end; 114 115 procedure TDataViewList.LoadFromRegistry(Context: TRegistryContext); 116 begin 117 118 end; 119 120 procedure TDataViewList.SaveToRegistry(Context: TRegistryContext); 121 begin 122 123 end; 83 124 84 125 { TListColumns } … … 101 142 procedure TFormList.FormCreate(Sender: TObject); 102 143 begin 103 Columns := TListDbColumn.Create;104 144 DbRows := TDbRows.Create; 105 145 end; … … 122 162 if MessageDlg(SItemDeletion, SDoYouWantToDeleteItem, mtConfirmation, 123 163 [mbYes, mbNo], 0) = mrYes then begin 124 Core.Database.Query(nil, 'DELETE FROM `' + Table + '` WHERE `Id` = ' + IntToStr(0)); 164 Core.Database.Query(nil, 'DELETE FROM `' + DataViewList.Name + 165 '` WHERE `Id` = ' + IntToStr(Integer(ListView1.Selected.Data))); 125 166 end; 126 167 end; … … 137 178 ListView1.Items.Count := 0; 138 179 FreeAndNil(DbRows); 139 FreeAndNil(Columns);140 180 end; 141 181 … … 150 190 begin 151 191 if (Item.Index >= 0) and (Item.Index < DbRows.Count) then begin 152 for I := 0 to Columns.Count - 1 do begin 192 for I := 0 to DataViewList.Columns.Count - 1 do begin 193 Item.Data := Pointer(StrToInt(DbRows[Item.Index].Values['Id'])); 153 194 if I = 0 then Item.Caption := DbRows[Item.Index].Items[0].Value 154 else Item.SubItems.Add(DbRows[Item.Index]. Items[I].Value);195 else Item.SubItems.Add(DbRows[Item.Index].Values[TDbColumn(DataViewList.Columns[I]).Name]); 155 196 end; 156 197 end; … … 161 202 begin 162 203 UpdateInterface; 204 end; 205 206 procedure TFormList.SetDataViewList(AValue: TDataViewList); 207 begin 208 if FDataViewList=AValue then Exit; 209 if Assigned(AValue) then begin 210 end else begin 211 DbRows.Clear; 212 ListView1.Items.Clear; 213 end; 214 FDataViewList := AValue; 163 215 end; 164 216 … … 178 230 begin 179 231 ListView1.Columns.Clear; 180 Filter := ''; 181 for I := 0 to Columns.Count - 1 do begin 232 Filter := 'Id'; 233 for I := 0 to DataViewList.Columns.Count - 1 do 234 with TDbColumn(DataViewList.Columns[I]) do begin 182 235 NewColumn := ListView1.Columns.Add; 183 NewColumn.Caption := TDbColumn(Columns[I]).Caption; 184 NewColumn.Width := TDbColumn(Columns[I]).Width; 185 NewColumn.Visible := TDbColumn(Columns[I]).Visible; 186 if I > 0 then Filter := Filter + ', '; 187 Filter := Filter + TDbColumn(Columns[I]).Name; 188 end; 189 Core.Database.Query(DbRows, 'SELECT ' + Filter + ' FROM ' + Table); 190 191 ListView1.Items.Count := DbRows.Count;; 236 NewColumn.Caption := Caption; 237 NewColumn.Width := Width; 238 NewColumn.Visible := Visible; 239 Filter := Filter + ', `' + Name + '`'; 240 end; 241 Core.Database.Query(DbRows, 'SELECT ' + Filter + ' FROM ' + DataViewList.Name); 242 243 ListView1.Items.Count := DbRows.Count; 192 244 ListView1.Refresh; 245 246 LabelItemCount.Caption := Format(SItemCount, [IntToStr(DbRows.Count)]); 193 247 end; 194 248 -
trunk/Forms/UFormMain.lfm
r7 r8 1 1 object FormMain: TFormMain 2 Left = 2352 Left = 377 3 3 Height = 455 4 Top = 13 64 Top = 138 5 5 Width = 733 6 6 Caption = 'Attendance' … … 14 14 LCLVersion = '1.1' 15 15 WindowState = wsMaximized 16 object PageControl1: TPageControl17 Left = 018 Height = 39019 Top = 2620 Width = 73321 ActivePage = TabSheetOperations22 Align = alClient23 Images = ImageList124 TabIndex = 425 TabOrder = 026 object TabSheetUsers: TTabSheet27 Caption = 'Users'28 OnShow = TabSheetUsersShow29 end30 object TabSheetAttendance: TTabSheet31 Caption = 'Attendance'32 OnShow = TabSheetAttendanceShow33 end34 object TabSheetTerminals: TTabSheet35 Caption = 'Terminals'36 OnShow = TabSheetTerminalsShow37 end38 object TabSheetHolidays: TTabSheet39 Caption = 'Holidays'40 OnShow = TabSheetHolidaysShow41 end42 object TabSheetOperations: TTabSheet43 Caption = 'Operations'44 OnShow = TabSheetOperationsShow45 end46 object TabSheetPassage: TTabSheet47 Caption = 'Passage'48 OnShow = TabSheetPassageShow49 end50 end51 16 object StatusBar1: TStatusBar 52 17 Left = 0 … … 64 29 ParentShowHint = False 65 30 ShowHint = True 66 TabOrder = 231 TabOrder = 1 67 32 Visible = False 68 33 object ToolButton1: TToolButton … … 71 36 Action = ASetting 72 37 end 38 end 39 object PageControl1: TPageControl 40 Left = 0 41 Height = 390 42 Top = 26 43 Width = 733 44 Align = alClient 45 Images = ImageList1 46 ParentFont = False 47 TabOrder = 2 73 48 end 74 49 object MainMenu1: TMainMenu … … 104 79 top = 168 105 80 Bitmap = { 106 4C690 8000000100000001000000000000000000000000000000000000000000081 4C690F0000001000000010000000000000000000000000000000000000000000 107 82 0000000000000000000000000000000000000000000000000000000000000000 108 83 000000000000000000000000000000000000000000008C8CBBFF000088FF8C8C … … 360 335 FF00191919FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 361 336 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 337 FF00FFFFFF00FFFFFF00FFFFFF004B4B4ACF4C4C4BFD616160FF7B7B7BFF8080 338 80FF7F7F7FFF848484FF626362FF5A5A59F73C3C3B8D0000000CFFFFFF00FFFF 339 FF00FFFFFF00FFFFFF00FFFFFF00595958FD8F8E8EFF8F8F8FFF8C8C8BFF8786 340 86FF81807FFF7E7D7CFF7E7D7CFF6F6F6EFF2F302FB500000014FFFFFF00FFFF 341 FF00FFFFFF00FFFFFF00FFFFFF00565654FFAAA8A9FFA9A9A9FF9F9E9FFF9796 342 96FF908E8FFF8E8D8DFF949393FF797878FF2A2A29B900000014FFFFFF00FFFF 343 FF00FFFFFF00FFFFFF00FFFFFF00373734FF5D5D5BFF5E5E5CFF5A5A58FF5555 344 53FF545351FF535351FF555552FF4C4C49FF21211EB700000014FFFFFF00FFFF 345 FF00FFFFFF00FFFFFF00FFFFFF002F2F2BFF454541FF494944FF4A4B46FF4D4E 346 48FF50504BFF535350FF575753FF60605CFF363633B900000016FFFFFF00FFFF 347 FF00FFFFFF00FFFFFF00FFFFFF0033332FFF292923FF2A2A23FF2A2B24FF2C2C 348 25FF2D2D27FF2F2F28FF2F2F29FF3B3B34FF262623AF00000006FFFFFF00FFFF 349 FF00FFFFFF00FFFFFF00FFFFFF003C3C38FF1D1D15FF191912FF191912FF1919 350 12FF1A1A13FF14130BFF0B0900FF1C1B11FF0706009FFFFFFF00FFFFFF00FFFF 351 FF00FFFFFF00FFFFFF00FFFFFF0040403CFF202019FF1C1C15FF1D1D16FF1D1D 352 16FF18170FFF383B3CFF59636EFF353838FF282B2A91FFFFFF00FFFFFF00FFFF 353 FF00FFFFFF00FFFFFF00FFFFFF0040403DFF202019FF1C1C15FF1D1D16FF1D1D 354 16FF17150DFF3A3F40FF9AADC9FF727F91FF606B79B5C9E5FF4AA7C1E95AAEC6 355 EC52B3C9EC3EFFFFFF00FFFFFF0041413EFF21211BFF1D1D17FF1E1E18FF1E1E 356 18FF1D1D16FF16160EFF717D8DFFA4B7D4FF97A9C5F1B6CEF3E3B0C8ECF7B3C9 357 EDEDB5CAEDCBA4BEEA24FFFFFF00424240FF21211BFF1D1D17FF1E1E18FF1E1E 358 18FF1F1F18FF16150BFF353939FF91A2BCFFC7DEFFFFB8CDEDFFBACEEEFFB9CE 359 EEFFB8CDEEFFB4C9EDA3ABC4EB02434341FF22221BFF1E1E17FF1F1F18FF1F1F 360 18FF1F1F18FF1F1F17FF15140AFF57606BFFB3C8EAFFBBD0F2FFB8CDEEFFB8CD 361 EEFFB8CDEEFFB6CBEDFFABC4EB3E444442FF22221CFF1E1E18FF1F1F19FF1F1F 362 19FF1F1F19FF1F1E18FF191910FF4A525AFF9FB3D0FFBED4F6FFB8CDEEFFB8CD 363 EEFFB8CDEEFFB7CDEEFBB0C8ECBB464643FF23231CFF1F1F18FF202019FF2020 364 19FF202019FF1C1B13FF282925FF8190A3FFC9E0FFFFB7CCEDFFB8CDEEFFB8CD 365 EEFFB8CDEEFFB8CDEEFFB5CBEDF7474745FF24241EFF20201AFF21211BFF2121 366 1BFF20201AFF1E1E17FF1B1B15FF6B7685FFC0D7F9FFB9CEEFFFB8CDEEFFB8CD 367 EEFFB8CDEEFFB8CDEEFFB8CDEEFF41413FFF2F2F2BFF2E2E29FF2E2E29FF2D2D 368 27FF24241DFF202019FF1B1A11FF353838FF8694ACFFC1D7FBFFB8CDEEFFB8CD 369 EEFFB8CDEEFFB8CDEEFFB8CDEEFFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 370 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 371 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 372 FF00FFFFFF000050851D226791AC185F8C7B002F5E0BFFFFFF00FFFFFF00FFFF 373 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 374 FF00005281254A7897FC99ACBDFFD2E5F6FF4F7F9DF30000000CFFFFFF00FFFF 375 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 376 FF00236189BFB8D6F2FFE3EFF9FFF7FAFEFFE3EFFAFF02324F6700000001FFFF 377 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 378 FF001C5B82AAB3D3F1FFD2E6F6FFE8F2FAFFD6E7F7FF001B2C6900000002FFFF 379 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 380 FF0000243B2B477899F9B8D6F3FFC4DDF5FF8EB4D3F80000003500000001FFFF 381 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 382 FF0000000002282AB7C9364FBAF8404EC4F80000387400000007FFFFFF00FFFF 383 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 384 00011517B88D5255E7FE999AEEFFC4C5EEFF5659D0F80000503000000001FFFF 385 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000B0B 386 AD5B2527E0FC4343EEFF7272EEFFA0A2EEFFC7C9EEFF4F51CCF50000441EFFFF 387 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000001171A 388 C6F01F1FDDFF2626EBFF4A4BEEFF797AEEFFA8A9EEFFABAEECFF0909788F0000 389 0002FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000005609181A 390 C8FA1919D2FF2020DFFF2828EDFF5252EEFF8081EEFFADAEEEFF3032B2DE0000 391 000DFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000873E181A 392 C6FD1313C6FF1A1AD4FF2121E1FF2A2AEEFF595AEEFF8788EEFF4749CBF70000 393 001CFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00050598661213 394 BEFF0C0CBBFF1414C9FF1B1BD6FF2323E4FF3232EEFF6061EEFF4A4CD6FA0000 395 0026FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000082421314 396 BFFD0606B0FF0E0EBDFF1515CBFF1C1CD8FF2424E6FF3838EEFF2C2ECAF60000 397 0023FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000070A0B 398 769E1214A7E31315ABE31416ADE31517AFE31719B1E31416A5DB00001E790000 399 0010FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000010000 400 0009000000190000001A0000001A0000001A0000001A000000190000000D0000 401 0001FFFFFF00FFFFFF00FFFFFF000101E3000101E4000101AC00000000370000 402 005F000000370101AC000101E5000101E5000101AC00000000370000005F0000 403 00370101AC000101E4000101E3000101E3000101E4820101E4AC000095CCD6D6 404 D6FF000095CC0101E4AC0101E4AC0101E4AC0101E4AC000095CCD6D6D6FF0000 405 95CC0101E4AC0101E4820101E3000101DD000101DDB28383FFFF3D3DD5FFB1B1 406 B1FF3D3DD5FF7E7EFFFF7E7EFFFF7E7EFFFF7E7EFFFF3D3DD5FFB1B1B1FF3D3D 407 D5FF8383FFFF0101DDB20101DD000101D5000101D5B97777FDFF2F2FC1FF1111 408 88FF2F2FC1FF6E6EFBFF6E6EFBFF6E6EFBFF6E6EFBFF2F2FC1FF111188FF2F2F 409 C1FF7777FDFF0101D5B90101D5000000CB000000CBC26D6DFAFFD6D6FBFFA1A1 410 ECFFA8A8F1FFC4C4E8FF6464F5FF6464F5FF6464F5FF5C5CEFFF4E4EE4FF5C5C 411 EFFF6D6DFAFF0000CBC20000CB000000C3000000C3C96363F8FF4646DEFF5050 412 E7FF5050E7FF4646DEFF5A5AF0FF5A5AF0FF5A5AF0FF5A5AF0FF5A5AF0FF5A5A 413 F0FF6363F8FF0000C3C90000C3000000280000002872FFFFFFFFFFFFFEFFFFFF 414 FEFFFFFFFEFFFFFFFEFFFFFFFEFFFFFFFEFFFFFFFEFFFFFFFEFFFFFFFEFFFFFF 415 FEFFFFFFFFFF00002872000028000000270000002775FEFEFCFFFCFCFAFFB1B1 416 A4FF989887FFA5A596FFFCFCFAFFFCFCFAFFB1B1A4FF989886FFFCFCFAFFFCFC 417 FAFFFEFEFCFF00002775000027000000260000002678FCFCF8FFF9F9F5FFF9F9 418 F5FFF9F9F5FF8E8E7DFFF9F9F5FFF9F9F5FFF9F9F5FF8E8E7DFFF9F9F5FFF9F9 419 F5FFFCFCF8FF0000267800002600000026000000267BFAFAF4FFF5F5EFFFD8D8 420 CFFF828271FFBCBCB0FFF5F5EFFFF5F5EFFFF5F5EFFF828271FFF5F5EFFFF5F5 421 EFFFFAFAF4FF0000267B00002600000025000000257FF8F8EFFFF1F1E8FFF1F1 422 E8FFF1F1E8FF747463FFF1F1E8FFF1F1E8FFF1F1E8FF747463FFF1F1E8FFF1F1 423 E8FFF8F8EFFF0000257F000025000000240000002482F6F6EBFFEDEDE2FFEDED 424 E2FFDFDFD3FF666655FFEDEDE2FFEDEDE2FF666655FF666655FF666655FFEDED 425 E2FFF6F6EBFF00002482000024000000230000002386F5F5E7FFDCDCCEFF7171 426 60FF828271FFB6B6A7FFEAEADCFFEAEADCFFEAEADCFFEAEADCFFEAEADCFFEAEA 427 DCFFF5F5E7FF000023860000230001011A000101228DF9F9EAFFF3F3E4FFF3F3 428 E4FFF3F3E4FFF3F3E4FFF3F3E4FFF3F3E4FFF3F3E4FFF3F3E4FFF3F3E4FFF3F3 429 E4FFF9F9EAFF0101228D01011A000000001A01011F9A9999AAFF9999AAFF9999 430 AAFF9999AAFF9999AAFF9999AAFF9999AAFF9999AAFF9999AAFF9999AAFF9999 431 AAFF9999AAFF01011F9A0000001A000000330101168801011DA501011DA50101 432 1DA501011DA501011DA501011DA501011DA501011DA501011DA501011DA50101 433 1DA501011DA50101168800000033000000000000000000000000000000000000 434 0000000000000000000000000000000000000000000000000000000000000000 435 0000000000000000000000000000000000000000000000A0C44400A0C4FF00A0 436 C44400A0C4FF00A0C44400A0C4FF00A0C44400A0C4FF00A0C44400A0C4FF00A0 437 C44400000000000000000000000000000000858A886600A0C4FFC6E8F9FF00A0 438 C4FFC6E8F9FF00A0C4FFC6E8F9FF00A0C4FFC6E8F9FF00A0C4FFC6E8F9FF00A0 439 C4FF00000000000000000000000000000000858A88FF00A0C4FF3DB1EBFF00A0 440 C4FF3DB1EBFF00A0C4FF3DB1EBFF00A0C4FF3DB1EBFF00A0C4FF3DB1EBFF00A0 441 C4FF02598FFF02598FFF02598F5C00000000858A88FFEBEBEBFF00A0C4FFBCBC 442 BCFF00A0C4FFB8B8B8FF00A0C4FFB8B8B8FF00A0C4FFB8B8B8FF00A0C4FF0259 443 8FFFC6EAEEFF71ADCFFF02598FFF00000000858A88FFFFFFFFFFECECECFFECEC 444 ECFFECECECFFECECECFFECECECFFECECECFFECECECFFD3D3D3FF02598FFFC7EB 445 EFFF6AACD2FF5583A1FC02598FFF00000000858A88FFFFFFFFFFDBDBDBFFCCCC 446 CCFFCCCCCCFFCCCCCCFFCCCCCCFFCCCCCCFFB7B7B7FF02598FFFC7EBEFFF6AAC 447 D2FF5787A4FF02598FFF02598F3300000000858A88FFFFFFFFFFECECECFFECEC 448 ECFFECECECFFECECECFFECECECFFD3D3D3FF02598FFFC6EAEEFF69AACFFF5683 449 A0FF02598FFF02598F330000000000000000858A88FFFFFFFFFFDBDBDBFFCCCC 450 CCFFCCCCCCFFCCCCCCFFB7B7B7FF02598FFFC5E6EDFF68A6CEFF5784A0FF0259 451 8FFF858A88FF000000000000000100000000858A88FFFFFFFFFFECECECFFECEC 452 ECFFECECECFFEBEBEBFF02598FFFC4E5EDFF649FC8FF5787A4FF02598FFF7171 453 71FF858A88FF000000000000000100000000858A88FFFFFFFFFFDBDBDBFFCCCC 454 CCFFCBCBCBFF757575FF395B70FF8AABC2FF5585A3FF02598FFF8F8F8FFF8686 455 86FF858A88FF000000010000000000000000858A88FFFFFFFFFFECECECFFECEC 456 ECFFE9E9E9FF02598FFF26424CFF36576BFF02598FFF9D9D9DFFD6D6D6FFAEAE 457 AEFF858A88FF000000000000000000000000858A88FFFFFFFFFFDBDBDBFFCBCB 458 CBFFC4C4C4FF000000FF02598FFF636363FF8C8C8CFFCACACAFFDADADAFFB2B2 459 B2FF858A88FF000000020000000000000000858A88FFFFFFFFFFECECECFFEBEB 460 EBFFEAEAEAFFEAEAEAFFE9E9E9FFEBEBEBFFEAEAEAFFEBEBEBFFECECECFFB2B2 461 B2FF858A88FF000000000000000000000000858A88FFEEEEEEFFB2B2B2FFB2B2 462 B2FFB2B2B2FFB2B2B2FFB2B2B2FFB2B2B2FFB2B2B2FFB1B1B1FFB2B2B2FFB2B2 463 B2FF858A88FF000000000000000000000000858A88A3858A88FF858A88FF858A 464 88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A 465 88FF858A88A30000000000000000000000000000000000000000000000000000 466 000000000000303030FF303030FF000000000000000000000000000000000000 467 0000000000000000000000000000000000000000000000000000000000000000 468 0000303030FF303030FF303030FF303030FF0000000000000000000000000000 469 0000000000000000000000000000000000000000000000000000000000000000 470 0000303030FF303030FF303030FF303030FF0000000000000000000000000000 471 0000000000000000000000000000000000000000000000000000000000000000 472 000000000000303030FF303030FF000000000000000000000000000000000000 473 00000000000000000000000000000000000000000000303030FF000000000000 474 00000000000000000000303030FF303030FF303030FF303030FF303030FF0000 475 00000000000000000000000000000000000000000000303030FF303030FF0000 476 0000303030FF303030FF303030FF303030FF0000000000000000303030FF0000 477 0000000000000000000000000000000000000000000000000000303030FF3030 478 30FF303030FF303030FF303030FF303030FF0000000000000000303030FF0000 479 0000000000000000000000000000000000000000000000000000000000003030 480 30FF0000000000000000303030FF303030FF0000000000000000303030FF0000 481 0000000000000000000000000000000000000000000000000000000000000000 482 00000000000000000000303030FF303030FF0000000000000000000000000000 483 0000000000000000000000000000000000000000000000000000000000000000 484 000000000000303030FF303030FF303030FF303030FF00000000000000000000 485 0000000000000000000000000000000000000000000000000000000000000000 486 0000303030FF303030FF303030FF303030FF303030FF303030FF303030FF3030 487 30FF303030FF0000000000000000000000000000000000000000000000000000 488 0000303030FF303030FF0000000000000000303030FF303030FF303030FF3030 489 30FF303030FF0000000000000000000000000000000000000000000000000000 490 0000303030FF303030FF00000000000000000000000000000000000000000000 491 0000303030FF0000000000000000000000000000000000000000000000000000 492 0000303030FF303030FF00000000000000000000000000000000000000000000 493 0000303030FF0000000000000000000000000000000000000000303030FF3030 494 30FF303030FF303030FF00000000000000000000000000000000000000000000 495 0000000000000000000000000000000000000000000000000000000000000000 496 0000000000000000000000000000000000000000000000000000000000000000 497 0000000000000000000000000000000000000000000000000000000000000000 498 000000000000A19588FF9C9083FF9C9083FFA19588FF00000000000000000000 499 00000000000000000000000000000000000000000000000000009C9083FF9C90 500 83FF00000000998D80FFFFFFFFFFFFFFFFFF998D80FF000000009C9083FF9C90 501 83FF0000000000000000000000000000000000000000998F83FFCCC5BEFFF6F1 502 EEFF908377FF908377FFEDE7E0FFEDE7E0FF908377FF908377FFF6F1EEFFCCC5 503 BEFFA9A096FF000000000000000000000000675D50FFCDC6BFFFF6F1EEFFF8F7 504 F4FFF8F7F4FFFFFFFFFFFCFDFDFFFCFDFDFFFFFFFFFFF8F7F4FFF8F7F4FFF6F1 505 EEFFCDC6BFFF696053FF0000000000000000696053FFF6F1EEFFBBAC9DFFDFD8 506 D3FFEEEFEFFFEBE7E2FFE3D9D1FFE3D9D1FFEBE7E2FFEEEFEFFFDFD8D3FFBBAC 507 9DFFF6F1EEFF696053FF000000000000000000000000696053FFDFDFDEFFDFDF 508 DEFFD1C4BAFF8E8377FF44392EFF44392EFF8E8377FFD1C4BAFFDFDFDEFFDFDF 509 DEFF696053FF00000000000000008E8378FF897D72FF84796CFFD8D5D3FFC9C2 510 B9FFA99C90FF594F45FFFFFFFF00FFFFFF0060564DFFA99C90FFC9C2B9FFD8D5 511 D3FF84796CFF897D72FF8E8378FF877B70FFFFFFFFFFFFFFFFFFBFBCB8FFD6CD 512 C5FF695E53FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00695E53FFD6CDC5FFBFBC 513 B8FFFFFFFFFFFFFFFFFF877B70FF897E74FFE8E0D7FFE8E0D7FFB0ACA8FFE8E3 514 DDFF695E53FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00695E53FFE8E3DDFFB0AC 515 A8FFE8E0D7FFE8E0D7FF897E74FF463B2FFF3E3328FF61564CFFAFA8A4FFC1BC 516 B6FFAFA8A4FF695E53FFFFFFFF00FFFFFF00695E53FFAFA8A4FFC1BCB6FFAFA8 517 A4FF61564CFF3E3328FF463B2FFF000000000000000061564CFFE1D9D1FFACA3 518 9BFFE4E1DCFFAFA8A4FF695E53FF695E53FFAFA8A4FFE4E1DCFFACA39BFFE1D9 519 D1FF61564CFF0000000000000000000000003F3428FFE1D9D1FFEBE7E2FFE1D9 520 D1FFAEA7A0FFE2DDDAFFB7B1ABFFB7B1ABFFE2DDDAFFAEA7A0FFE1D9D1FFEBE7 521 E2FFE1D9D1FF3F3428FF00000000000000003F3428FFB6B0A9FFE1D9D1FFC8BE 522 B4FFE1D9D1FFC8BEB4FFEDE5DDFFEDE5DDFFC8BEB4FFE1D9D1FFC8BEB4FFE1D9 523 D1FFB6B0A9FF3F3428FF0000000000000000000000003F3428FF877D73FFE1D9 524 D1FF574D42FF766C63FFEDE5DDFFEDE5DDFF766C63FF574D42FFE1D9D1FF877D 525 73FF3F3428FF00000000000000000000000000000000000000003F3428FF3F34 526 28FF00000000776D66FFE5DBD2FFE5DBD2FF776D66FF000000003F3428FF3F34 527 28FF000000000000000000000000000000000000000000000000000000000000 528 0000000000003F3428FF3F3428FF3F3428FF3F3428FF00000000000000000000 529 0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 530 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 531 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008AA8 532 BF427EABC6BD78B3CDED7BB8D0FA7AB4CDFA71A9C4E8719DB9B07A99B039FFFF 533 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0086AAC29678BA 534 D2F9C8D9E3FFDDE7EAFFEEF1F1FFECF0F0FFD2E0E4FFA8C4D2FF679CB8F46C8F 535 A97DFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0085A8C09197CCDCFFE1EB 536 EEFFEEE1D9FFDFBEACFFD5AD96FFD4AA92FFDCB7A3FFE8DACEFFC6D9DFFF689B 537 B6FF64859F75FFFFFF00FFFFFF00FFFFFF0088A3B93C74B3CCFADFE9ECFFE6CF 538 C2FFDFBFAEFFF1E3DCFFF3F1ECFFF4F1EBFFF1E2D9FFDCBAA3FFDEC1AFFFB7CF 539 D8FF5883A4F56A869B31FFFFFF00FFFFFF0077A1BCB6B7CFDBFFEDE0D7FFDEBD 540 AAFFFFFFFFFFF0F0EEFFE7E5DAFFFFFFF7FFFFFFF7FFFFFEF3FFDCB498FFE1D1 541 C4FF73A4BBFF597C98A3FFFFFF00FFFFFF006DA2BEE7D3E1E6FFDBB9A4FFF1E3 542 D6FFFEFBF5FFF5F5F3FF9F9E95FFF0F0E9FFF8F8F2FFBEB9ADFFF0DAC2FFD1A7 543 8BFFA9CAD3FF537B9BDFFFFFFF00FFFFFF006CA1BDF7E4ECEEFFD1A58AFFFAF6 544 E9FFFDF8EEFFFFFFF9FF818079FFB1AEA4FF817F77FFC9C6BAFFFAF0D3FFC995 545 72FFC9DFE2FF547B9EF6FFFFFF00FFFFFF00679AB8F7DDEAECFFCF9F81FFFAF3 546 E2FFFDF6E9FFF2F0E3FF8D8C84FF817F77FFD2CFC2FFFFFBEBFFFAECCCFFC790 547 6DFFC1DDE1FF53799DF6FFFFFF00FFFFFF005E8EADDEB7D3DDFFD1AA90FFF0DB 548 C1FFFFF7E6FFFAF2E3FFC5C0B6FFF1EDDEFFFFFCE8FFFFF5DFFFEFD4AFFFC99B 549 7BFF92C2D0FF507595E2FFFFFF00FFFFFF005E85A09F78A9C0FFDAD1C6FFD9AA 550 88FFFFFEEBFFFFFAEEFFFFFDF2FFFFFEF2FFFFFCEFFFFFFDEBFFD9A37AFFCBC6 551 B9FF5894B1FF547490AAFFFFFF00FFFFFF006B879D305782A2F6A2CCD8FFCDB7 552 A5FFD8AA89FFEFDFCFFFFAF6F3FFFAF5F3FFEFDFD1FFD7A785FFC3AC98FF82BD 553 CEFF4D7194F7627B9135FFFFFF00FFFFFF00FFFFFF0061819A785588A6FF96C8 554 D6FFCCCABFFFC89F86FFC59276FFC49073FFC49A80FFC3C4B9FF7DBDCDFF4777 555 98FF5A778F80FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF005D7C957D5078 556 9AF35A97B1FF85BDCEFFA4D6DEFFA0D5DEFF7BB9CBFF4F8CABFF4D7294F45976 557 8F82FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00617D 558 9536537591A74E7293E14D7497F64D7497F64E7293E1527490A95E7A9137FFFF 559 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 560 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 362 561 FF00FFFFFF00FFFFFF00FFFFFF00 363 562 } -
trunk/Forms/UFormMain.lrt
r7 r8 1 1 TFORMMAIN.CAPTION=Attendance 2 TFORMMAIN.TABSHEETUSERS.CAPTION=Users3 TFORMMAIN.TABSHEETATTENDANCE.CAPTION=Attendance4 TFORMMAIN.TABSHEETTERMINALS.CAPTION=Terminals5 TFORMMAIN.TABSHEETHOLIDAYS.CAPTION=Holidays6 TFORMMAIN.TABSHEETOPERATIONS.CAPTION=Operations7 TFORMMAIN.TABSHEETPASSAGE.CAPTION=Passage8 2 TFORMMAIN.MENUITEMSYSTEM.CAPTION=System 9 3 TFORMMAIN.AEXIT.CAPTION=Exit -
trunk/Forms/UFormMain.pas
r7 r8 1 1 unit UFormMain; 2 2 3 {$mode objfpc}{$H+}3 {$mode delphi}{$H+} 4 4 5 5 interface … … 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 9 Menus, ActnList ;9 Menus, ActnList, UFormList, SpecializedList; 10 10 11 11 type … … 24 24 PageControl1: TPageControl; 25 25 StatusBar1: TStatusBar; 26 TabSheetPassage: TTabSheet;27 TabSheetHolidays: TTabSheet;28 TabSheetOperations: TTabSheet;29 TabSheetUsers: TTabSheet;30 TabSheetAttendance: TTabSheet;31 TabSheetTerminals: TTabSheet;32 26 ToolBar1: TToolBar; 33 27 ToolButton1: TToolButton; … … 38 32 procedure FormDestroy(Sender: TObject); 39 33 procedure FormShow(Sender: TObject); 40 procedure TabSheetAttendanceShow(Sender: TObject); 41 procedure TabSheetHolidaysShow(Sender: TObject); 42 procedure TabSheetOperationsShow(Sender: TObject); 43 procedure TabSheetPassageShow(Sender: TObject); 44 procedure TabSheetTerminalsShow(Sender: TObject); 45 procedure TabSheetUsersShow(Sender: TObject); 34 procedure TabSheetShow(Sender: TObject); 46 35 private 47 { private declarations } 36 DataViewLists: TListObject; 37 procedure InitModules; 38 procedure ReloadPages; 48 39 public 49 40 { public declarations } … … 56 47 57 48 uses 58 UCore, UForm List, UFormSetting;49 UCore, UFormSetting; 59 50 60 51 {$R *.lfm} … … 82 73 SYear = 'Year'; 83 74 SKeyNumber = 'Key number'; 75 SText = 'Text'; 76 SAttendance = 'Attendance'; 77 SPassage = 'Passage'; 78 STimeFrom = 'Time from'; 79 STimeTo = 'Time to'; 80 SHoliday = 'Holiday'; 81 SLog = 'Log'; 84 82 85 83 { TFormMain } … … 91 89 procedure TFormMain.FormCreate(Sender: TObject); 92 90 begin 91 DataViewLists := TListObject.Create; 93 92 Core.Init; 94 93 Core.PersistentForm.Load(Self); 94 InitModules; 95 ReloadPages; 95 96 end; 96 97 97 98 procedure TFormMain.FormDestroy(Sender: TObject); 98 99 begin 100 DataViewLists.Free; 99 101 Core.PersistentForm.Save(Self); 100 102 Core.Done; … … 115 117 end; 116 118 117 procedure TFormMain.TabSheetAttendanceShow(Sender: TObject); 118 begin 119 end; 120 121 procedure TFormMain.TabSheetHolidaysShow(Sender: TObject); 119 procedure TFormMain.TabSheetShow(Sender: TObject); 122 120 begin 123 121 if Assigned(Core.FormList) then Core.FormList.Free; … … 128 126 Align := alClient; 129 127 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'; 128 DataViewList := TDataViewList(DataViewLists[TTabSheet(Sender).Tag]); 138 129 UpdateData; 139 130 end; 140 131 end; 141 132 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 180 procedure TFormMain.TabSheetTerminalsShow(Sender: TObject); 181 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 186 ManualDock(TTabSheet(Sender)); 187 Align := alClient; 188 Show; 189 with Columns do begin 190 AddItem(SName, 'Name', True, 80); 191 AddItem(SEnabled, 'Enabled', True, 30); 192 AddItem(SAddress, 'Address', True, 120); 193 AddItem(SPort, 'Port', True, 50); 194 AddItem(SType, 'Type', True, 80); 195 AddItem(SNote, 'Note', True, 80); 196 end; 197 Table := 'Terminal'; 198 UpdateData; 199 end; 200 end; 201 202 procedure TFormMain.TabSheetUsersShow(Sender: TObject); 203 begin 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; 133 procedure TFormMain.InitModules; 134 var 135 NewDataView: TDataViewList; 136 begin 137 NewDataView := TDataViewList.Create; 138 with NewDataView do begin 211 139 with Columns do begin 212 140 AddItem(SEnabled, 'Enabled', True, 30); … … 220 148 AddItem(SNote, 'Note', False, 80); 221 149 end; 222 Table := 'User'; 223 UpdateData; 150 Name := 'User'; 151 Caption := SUser; 152 ImageIndex := 9; 153 end; 154 DataViewLists.Add(NewDataView); 155 156 NewDataView := TDataViewList.Create; 157 with NewDataView do begin 158 with Columns do begin 159 AddItem(STime, 'Time', True, 150); 160 AddItem(SUser, 'User', True, 80); 161 AddItem(SOperation, 'Operation', True, 80); 162 AddItem(STerminal, 'Terminal', True, 80); 163 end; 164 Name := 'Passage'; 165 Caption := SPassage; 166 ImageIndex := 12; 167 end; 168 DataViewLists.Add(NewDataView); 169 170 NewDataView := TDataViewList.Create; 171 with NewDataView do begin 172 with Columns do begin 173 AddItem(SUser, 'User', True, 80); 174 AddItem(STimeFrom, 'TimeFrom', True, 120); 175 AddItem(STimeTo, 'TimeTo', True, 120); 176 end; 177 Name := 'Attendance'; 178 Caption := SAttendance; 179 ImageIndex := 14; 180 end; 181 DataViewLists.Add(NewDataView); 182 183 NewDataView := TDataViewList.Create; 184 with NewDataView do begin 185 with Columns do begin 186 AddItem(SEnabled, 'Enabled', True, 30); 187 AddItem(SName, 'Name', True, 300); 188 AddItem(SDay, 'Day', True, 50); 189 AddItem(SMonth, 'Month', True, 50); 190 AddItem(SYear, 'Year', True, 50); 191 end; 192 Name := 'Holiday'; 193 Caption := SHoliday; 194 ImageIndex := 10; 195 end; 196 DataViewLists.Add(NewDataView); 197 198 NewDataView := TDataViewList.Create; 199 with NewDataView do begin 200 with Columns do begin 201 AddItem(SName, 'Name', True, 100); 202 AddItem(SKeyNumber, 'KeyId', True, 100); 203 end; 204 Name := 'Operation'; 205 Caption := SOperation; 206 ImageIndex := 13; 207 end; 208 DataViewLists.Add(NewDataView); 209 210 NewDataView := TDataViewList.Create; 211 with NewDataView do begin 212 with Columns do begin 213 AddItem(SName, 'Name', True, 80); 214 AddItem(SEnabled, 'Enabled', True, 30); 215 AddItem(SAddress, 'Address', True, 120); 216 AddItem(SPort, 'Port', True, 50); 217 AddItem(SType, 'Type', True, 80); 218 AddItem(SNote, 'Note', True, 80); 219 end; 220 Name := 'Terminal'; 221 Caption := STerminal; 222 ImageIndex := 8; 223 end; 224 DataViewLists.Add(NewDataView); 225 226 NewDataView := TDataViewList.Create; 227 with NewDataView do begin 228 with Columns do begin 229 AddItem(STime, 'Time', True, 120); 230 AddItem(SUser, 'User', True, 80); 231 AddItem(SText, 'Text', True, 400); 232 end; 233 Name := 'Log'; 234 Caption := SLog; 235 ImageIndex := 11; 236 end; 237 DataViewLists.Add(NewDataView); 238 end; 239 240 procedure TFormMain.ReloadPages; 241 var 242 NewPage: TTabSheet; 243 I: Integer; 244 begin 245 for I := 0 to DataViewLists.Count - 1 do 246 with TDataViewList(DataViewLists[I]) do begin 247 NewPage := TTabSheet.Create(PageControl1); 248 NewPage.Caption := Caption; 249 NewPage.Tag := I; 250 NewPage.ImageIndex := ImageIndex; 251 NewPage.OnShow := TabSheetShow; 252 NewPage.PageControl := PageControl1; 253 NewPage.Visible := True; 224 254 end; 225 255 end; -
trunk/Languages/Dochazka.cs.po
r7 r8 128 128 msgstr "Seznam" 129 129 130 #: tformlist.labelitemcount.caption 131 #, fuzzy 132 #| msgid "Item count:" 133 msgctxt "tformlist.labelitemcount.caption" 134 msgid "Item count: %s" 135 msgstr "PoÄet poloÅŸek:" 136 130 137 #: tformmain.aexit.caption 131 138 msgctxt "tformmain.aexit.caption" … … 156 163 msgstr "Systém" 157 164 158 #: tformmain.tabsheetattendance.caption159 msgctxt "tformmain.tabsheetattendance.caption"160 msgid "Attendance"161 msgstr "Docházka"162 163 #: tformmain.tabsheetholidays.caption164 msgctxt "tformmain.tabsheetholidays.caption"165 msgid "Holidays"166 msgstr "Svátky"167 168 #: tformmain.tabsheetoperations.caption169 msgctxt "tformmain.tabsheetoperations.caption"170 msgid "Operations"171 msgstr "Operace"172 173 #: tformmain.tabsheetpassage.caption174 msgid "Passage"175 msgstr "Průchody"176 177 #: tformmain.tabsheetterminals.caption178 msgctxt "tformmain.tabsheetterminals.caption"179 msgid "Terminals"180 msgstr "Terminály"181 182 #: tformmain.tabsheetusers.caption183 msgctxt "tformmain.tabsheetusers.caption"184 msgid "Users"185 msgstr "UÅŸivatelé"186 187 165 #: tformsetting.caption 188 166 msgctxt "tformsetting.caption" … … 191 169 192 170 #: uformlist.sdoyouwanttodeleteitem 193 msgid "Do you want to delte item" 194 msgstr "Chcete vymazat poloÅŸku?" 171 #| msgid "Do you want to delte item" 172 msgid "Do you want to really delete item?" 173 msgstr "Chcete opravdu vymazat poloÅŸku?" 174 175 #: uformlist.sitemcount 176 msgctxt "uformlist.sitemcount" 177 msgid "Item count: %s" 178 msgstr "PoÄet poloÅŸek: %s" 195 179 196 180 #: uformlist.sitemdeletion … … 202 186 msgstr "Adresa" 203 187 188 #: uformmain.sattendance 189 msgctxt "uformmain.sattendance" 190 msgid "Attendance" 191 msgstr "Docházka" 192 204 193 #: uformmain.scardcode 205 194 msgid "Card code" … … 222 211 msgstr "Jméno" 223 212 213 #: uformmain.sholiday 214 msgid "Holiday" 215 msgstr "" 216 224 217 #: uformmain.skeynumber 225 218 msgid "Key number" 226 msgstr "" 219 msgstr "ÄÃslo klÃÄe" 220 221 #: uformmain.slog 222 msgctxt "uformmain.slog" 223 msgid "Log" 224 msgstr "Záznam" 227 225 228 226 #: uformmain.slogin … … 246 244 msgstr "Operace" 247 245 246 #: uformmain.spassage 247 msgctxt "uformmain.spassage" 248 msgid "Passage" 249 msgstr "Průchody" 250 248 251 #: uformmain.spassword 249 252 msgid "Password" … … 266 269 msgstr "Terminál" 267 270 271 #: uformmain.stext 272 msgid "Text" 273 msgstr "Text" 274 268 275 #: uformmain.stime 269 276 msgid "Time" 270 277 msgstr "Äas" 271 278 279 #: uformmain.stimefrom 280 msgid "Time from" 281 msgstr "" 282 283 #: uformmain.stimeto 284 msgid "Time to" 285 msgstr "" 286 272 287 #: uformmain.stype 273 288 msgid "Type" -
trunk/Languages/Dochazka.po
r7 r8 119 119 msgstr "" 120 120 121 #: tformlist.labelitemcount.caption 122 msgctxt "tformlist.labelitemcount.caption" 123 msgid "Item count: %s" 124 msgstr "" 125 121 126 #: tformmain.aexit.caption 122 127 msgctxt "TFORMMAIN.AEXIT.CAPTION" … … 147 152 msgstr "" 148 153 149 #: tformmain.tabsheetattendance.caption150 msgctxt "TFORMMAIN.TABSHEETATTENDANCE.CAPTION"151 msgid "Attendance"152 msgstr ""153 154 #: tformmain.tabsheetholidays.caption155 msgctxt "TFORMMAIN.TABSHEETHOLIDAYS.CAPTION"156 msgid "Holidays"157 msgstr ""158 159 #: tformmain.tabsheetoperations.caption160 msgctxt "TFORMMAIN.TABSHEETOPERATIONS.CAPTION"161 msgid "Operations"162 msgstr ""163 164 #: tformmain.tabsheetpassage.caption165 msgid "Passage"166 msgstr ""167 168 #: tformmain.tabsheetterminals.caption169 msgctxt "TFORMMAIN.TABSHEETTERMINALS.CAPTION"170 msgid "Terminals"171 msgstr ""172 173 #: tformmain.tabsheetusers.caption174 msgctxt "TFORMMAIN.TABSHEETUSERS.CAPTION"175 msgid "Users"176 msgstr ""177 178 154 #: tformsetting.caption 179 155 msgctxt "TFORMSETTING.CAPTION" … … 182 158 183 159 #: uformlist.sdoyouwanttodeleteitem 184 msgid "Do you want to delte item" 160 msgid "Do you want to really delete item?" 161 msgstr "" 162 163 #: uformlist.sitemcount 164 msgctxt "uformlist.sitemcount" 165 msgid "Item count: %s" 185 166 msgstr "" 186 167 … … 193 174 msgstr "" 194 175 176 #: uformmain.sattendance 177 msgctxt "uformmain.sattendance" 178 msgid "Attendance" 179 msgstr "" 180 195 181 #: uformmain.scardcode 196 182 msgid "Card code" … … 213 199 msgstr "" 214 200 201 #: uformmain.sholiday 202 msgid "Holiday" 203 msgstr "" 204 215 205 #: uformmain.skeynumber 216 206 msgid "Key number" 217 207 msgstr "" 218 208 209 #: uformmain.slog 210 msgctxt "uformmain.slog" 211 msgid "Log" 212 msgstr "" 213 219 214 #: uformmain.slogin 220 215 msgid "Login" … … 237 232 msgstr "" 238 233 234 #: uformmain.spassage 235 msgctxt "uformmain.spassage" 236 msgid "Passage" 237 msgstr "" 238 239 239 #: uformmain.spassword 240 240 msgid "Password" … … 257 257 msgstr "" 258 258 259 #: uformmain.stext 260 msgid "Text" 261 msgstr "" 262 259 263 #: uformmain.stime 260 264 msgid "Time" 261 265 msgstr "" 262 266 267 #: uformmain.stimefrom 268 msgid "Time from" 269 msgstr "" 270 271 #: uformmain.stimeto 272 msgid "Time to" 273 msgstr "" 274 263 275 #: uformmain.stype 264 276 msgid "Type" -
trunk/Tasks.txt
r4 r8 1 * tabulky zamÄstnanci, terminály, průchody, docházka, svátky, operace 1 Základnà funkce: 2 * zobrazovánà tabulek 2 3 * pÅipojovacà dialog k do systému. ovÄÅenà jméno, heslo 3 4 * tiskové vÃœstupy, vÃœkazy, sestavy 4 * naÄÃtánà dat z terminálu BF-6305 * naÄÃtánà dat z terminálu Chyiu technology BF-630 5 6 * perzistence dat, SQL dotazy, inicializace 6 7 * nápovÄda 7 8 8 9 NároÄnÄjÅ¡Ã ménÄ důleÅŸité: 10 * hromadné operace v tabulkách (tisk, export, mazánÃ, aj.) 9 11 * exporty CSV, XML, ODT, ODS, XLS, DOC, RTF, TXT, aj. 10 12 * podpora dalÅ¡Ãch terminálů 11 13 * vÃceuÅŸivatelská architektura klient/server 14 * tÅÃvrstvá architektura, komunikaÄnà API 12 15 * grafické styly, témata, barevná schémata 13 16 * podpora vÃce typů databázà 14 17 * zásuvné moduly, doplÅky, pluginy, addony, addiny, rozÅ¡ÃÅenà 15 * komunikaÄnà API16 18 * vÃceplatformnà Windows, Linux, Mac OS 17 19 * uÅŸivatelsky definované sestavy 18 20 * podpora vÃce jazyků 19 21 * podpora pro zpracovánà vÃce firem 22 * historie otevÅenÃœch oken 23 * oblÃbené poloÅŸky jako uÅŸivatelskÃœ vÃœbÄr funkcà programu 24 25 26 Základnà datové tabulky: 27 * zamÄstnanci 28 * terminály 29 * průchody terminály 30 * docházka osob 31 * svátky 32 * operace 33 * systémovÃœ záznam akcà 34 * pracovnà rozvrhy 35 36 DoplÅkové tabulky: 37 * firmy 38 * zakázky
Note:
See TracChangeset
for help on using the changeset viewer.