Changeset 8 for trunk


Ignore:
Timestamp:
Nov 14, 2012, 2:58:35 PM (12 years ago)
Author:
chronos
Message:
  • Přidáno: Ikony k záložkám jednotlivých tabulek.
  • Upraveno: Zobecněn systém pohledů na dynamickou strukturu.
Location:
trunk
Files:
8 added
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Dochazka.lpi

    r7 r8  
    8989      </Item4>
    9090    </RequiredPackages>
    91     <Units Count="9">
     91    <Units Count="10">
    9292      <Unit0>
    9393        <Filename Value="Dochazka.lpr"/>
     
    148148        <UnitName Value="UFormEdit"/>
    149149      </Unit8>
     150      <Unit9>
     151        <Filename Value="UDataView.pas"/>
     152        <IsPartOfProject Value="True"/>
     153        <UnitName Value="UDataView"/>
     154      </Unit9>
    150155    </Units>
    151156  </ProjectOptions>
  • trunk/Dochazka.lpr

    r7 r8  
    99  Interfaces, // this includes the LCL widgetset
    1010  Forms, UFormMain, UCore, UAttendance, UPersistentForm, CoolWeb, Common,
    11   CoolTranslator, UFormSetting, SysUtils, UFormList, UFormEdit
     11  CoolTranslator, UFormSetting, SysUtils, UFormList, UFormEdit, UDataView
    1212  { you can add units after this };
    1313
  • trunk/Forms/UFormEdit.lfm

    r7 r8  
    88  ClientWidth = 538
    99  OnCreate = FormCreate
     10  OnDestroy = FormDestroy
    1011  LCLVersion = '1.1'
    1112  object ButtonOk: TButton
  • trunk/Forms/UFormEdit.pas

    r7 r8  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   Buttons, ExtCtrls;
     9  Buttons, ExtCtrls, SpecializedList, SpecializedDictionary;
    1010
    1111type
     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;
    1230
    1331  { TFormEdit }
     
    1836    ButtonCancel: TButton;
    1937    procedure FormCreate(Sender: TObject);
     38    procedure FormDestroy(Sender: TObject);
    2039  private
    2140    { private declarations }
    2241  public
    23     { public declarations }
     42    RuntimeControls: TListObject;
     43    FormItems: TFormItems;
     44    Values: TDictionaryStringString;
     45    procedure Update;
    2446  end;
    2547
     
    2951implementation
    3052
     53{ TFormItems }
     54
     55function TFormItems.AddItem(Caption, Name: string; ControlType: TControlType;
     56  Visible: Boolean; Rect: TRect): TFormItem;
     57begin
     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);
     65end;
     66
    3167{$R *.lfm}
    3268
     
    3571procedure TFormEdit.FormCreate(Sender: TObject);
    3672begin
     73  FormItems := TFormItems.Create;
     74  Values := TDictionaryStringString.Create;
     75  RuntimeControls := TListObject.Create;
     76end;
    3777
     78procedure TFormEdit.FormDestroy(Sender: TObject);
     79begin
     80  Values.Free;
     81  RuntimeControls.Free;
     82  FormItems.Free;
     83end;
     84
     85procedure TFormEdit.Update;
     86var
     87  NewControl: TControl;
     88  I: Integer;
     89  TitleRect: TRect;
     90const
     91  W = 50;
     92  H = 32;
     93begin
     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;
    38154end;
    39155
  • trunk/Forms/UFormList.lfm

    r7 r8  
    11object FormList: TFormList
    2   Left = 384
    3   Height = 240
    4   Top = 180
    5   Width = 470
     2  Left = 385
     3  Height = 397
     4  Top = 172
     5  Width = 588
    66  Caption = 'List'
    7   ClientHeight = 240
    8   ClientWidth = 470
     7  ClientHeight = 397
     8  ClientWidth = 588
    99  OnCreate = FormCreate
    1010  OnDestroy = FormDestroy
     
    1414    Left = 0
    1515    Height = 46
    16     Top = 194
    17     Width = 470
     16    Top = 351
     17    Width = 588
    1818    Align = alBottom
    1919    ButtonHeight = 44
     
    6262  object ListView1: TListView
    6363    Left = 0
    64     Height = 194
     64    Height = 333
    6565    Top = 0
    66     Width = 470
     66    Width = 588
    6767    Align = alClient
    6868    Columns = <>
     
    7777    OnDblClick = AModifyExecute
    7878    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
    7997  end
    8098  object ActionList1: TActionList
  • trunk/Forms/UFormList.lrt

    r7 r8  
    11TFORMLIST.CAPTION=List
     2TFORMLIST.LABELITEMCOUNT.CAPTION=Item count: %s
    23TFORMLIST.AADD.CAPTION=Add
    34TFORMLIST.AADD.HINT=Add new item
  • trunk/Forms/UFormList.pas

    r7 r8  
    77uses
    88  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;
    1011
    1112type
     
    2122  TListDbColumn = class(TListObject)
    2223    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);
    2337  end;
    2438
     
    3448    ADuplicate: TAction;
    3549    ActionList1: TActionList;
     50    LabelItemCount: TLabel;
    3651    ListView1: TListView;
    3752    MenuItem1: TMenuItem;
     
    4055    MenuItem4: TMenuItem;
    4156    MenuItem5: TMenuItem;
     57    Panel1: TPanel;
    4258    PopupMenu1: TPopupMenu;
    4359    ToolBar1: TToolBar;
     
    6076      Selected: Boolean);
    6177  private
     78    FDataViewList: TDataViewList;
     79    procedure SetDataViewList(AValue: TDataViewList);
    6280  public
    63     Columns: TListDbColumn;
    6481    DbRows: TDbRows;
    65     Table: string;
     82    property DataViewList: TDataViewList read FDataViewList write SetDataViewList;
    6683    procedure UpdateInterface;
    6784    procedure UpdateData;
     
    8097resourcestring
    8198  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
     104constructor TDataViewList.Create;
     105begin
     106  Columns := TListDbColumn.Create;
     107end;
     108
     109destructor TDataViewList.Destroy;
     110begin
     111  Columns.Free;
     112  inherited Destroy;
     113end;
     114
     115procedure TDataViewList.LoadFromRegistry(Context: TRegistryContext);
     116begin
     117
     118end;
     119
     120procedure TDataViewList.SaveToRegistry(Context: TRegistryContext);
     121begin
     122
     123end;
    83124
    84125{ TListColumns }
     
    101142procedure TFormList.FormCreate(Sender: TObject);
    102143begin
    103   Columns := TListDbColumn.Create;
    104144  DbRows := TDbRows.Create;
    105145end;
     
    122162    if MessageDlg(SItemDeletion, SDoYouWantToDeleteItem, mtConfirmation,
    123163      [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)));
    125166    end;
    126167  end;
     
    137178  ListView1.Items.Count := 0;
    138179  FreeAndNil(DbRows);
    139   FreeAndNil(Columns);
    140180end;
    141181
     
    150190begin
    151191  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']));
    153194      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]);
    155196    end;
    156197  end;
     
    161202begin
    162203  UpdateInterface;
     204end;
     205
     206procedure TFormList.SetDataViewList(AValue: TDataViewList);
     207begin
     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;
    163215end;
    164216
     
    178230begin
    179231  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
    182235    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;
    192244  ListView1.Refresh;
     245
     246  LabelItemCount.Caption := Format(SItemCount, [IntToStr(DbRows.Count)]);
    193247end;
    194248
  • trunk/Forms/UFormMain.lfm

    r7 r8  
    11object FormMain: TFormMain
    2   Left = 235
     2  Left = 377
    33  Height = 455
    4   Top = 136
     4  Top = 138
    55  Width = 733
    66  Caption = 'Attendance'
     
    1414  LCLVersion = '1.1'
    1515  WindowState = wsMaximized
    16   object PageControl1: TPageControl
    17     Left = 0
    18     Height = 390
    19     Top = 26
    20     Width = 733
    21     ActivePage = TabSheetOperations
    22     Align = alClient
    23     Images = ImageList1
    24     TabIndex = 4
    25     TabOrder = 0
    26     object TabSheetUsers: TTabSheet
    27       Caption = 'Users'
    28       OnShow = TabSheetUsersShow
    29     end
    30     object TabSheetAttendance: TTabSheet
    31       Caption = 'Attendance'
    32       OnShow = TabSheetAttendanceShow
    33     end
    34     object TabSheetTerminals: TTabSheet
    35       Caption = 'Terminals'
    36       OnShow = TabSheetTerminalsShow
    37     end
    38     object TabSheetHolidays: TTabSheet
    39       Caption = 'Holidays'
    40       OnShow = TabSheetHolidaysShow
    41     end
    42     object TabSheetOperations: TTabSheet
    43       Caption = 'Operations'
    44       OnShow = TabSheetOperationsShow
    45     end
    46     object TabSheetPassage: TTabSheet
    47       Caption = 'Passage'
    48       OnShow = TabSheetPassageShow
    49     end
    50   end
    5116  object StatusBar1: TStatusBar
    5217    Left = 0
     
    6429    ParentShowHint = False
    6530    ShowHint = True
    66     TabOrder = 2
     31    TabOrder = 1
    6732    Visible = False
    6833    object ToolButton1: TToolButton
     
    7136      Action = ASetting
    7237    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
    7348  end
    7449  object MainMenu1: TMainMenu
     
    10479    top = 168
    10580    Bitmap = {
    106       4C69080000001000000010000000000000000000000000000000000000000000
     81      4C690F0000001000000010000000000000000000000000000000000000000000
    10782      0000000000000000000000000000000000000000000000000000000000000000
    10883      000000000000000000000000000000000000000000008C8CBBFF000088FF8C8C
     
    360335      FF00191919FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
    361336      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
    362561      FF00FFFFFF00FFFFFF00FFFFFF00
    363562    }
  • trunk/Forms/UFormMain.lrt

    r7 r8  
    11TFORMMAIN.CAPTION=Attendance
    2 TFORMMAIN.TABSHEETUSERS.CAPTION=Users
    3 TFORMMAIN.TABSHEETATTENDANCE.CAPTION=Attendance
    4 TFORMMAIN.TABSHEETTERMINALS.CAPTION=Terminals
    5 TFORMMAIN.TABSHEETHOLIDAYS.CAPTION=Holidays
    6 TFORMMAIN.TABSHEETOPERATIONS.CAPTION=Operations
    7 TFORMMAIN.TABSHEETPASSAGE.CAPTION=Passage
    82TFORMMAIN.MENUITEMSYSTEM.CAPTION=System
    93TFORMMAIN.AEXIT.CAPTION=Exit
  • trunk/Forms/UFormMain.pas

    r7 r8  
    11unit UFormMain;
    22
    3 {$mode objfpc}{$H+}
     3{$mode delphi}{$H+}
    44
    55interface
     
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
    9   Menus, ActnList;
     9  Menus, ActnList, UFormList, SpecializedList;
    1010
    1111type
     
    2424    PageControl1: TPageControl;
    2525    StatusBar1: TStatusBar;
    26     TabSheetPassage: TTabSheet;
    27     TabSheetHolidays: TTabSheet;
    28     TabSheetOperations: TTabSheet;
    29     TabSheetUsers: TTabSheet;
    30     TabSheetAttendance: TTabSheet;
    31     TabSheetTerminals: TTabSheet;
    3226    ToolBar1: TToolBar;
    3327    ToolButton1: TToolButton;
     
    3832    procedure FormDestroy(Sender: TObject);
    3933    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);
    4635  private
    47     { private declarations }
     36    DataViewLists: TListObject;
     37    procedure InitModules;
     38    procedure ReloadPages;
    4839  public
    4940    { public declarations }
     
    5647
    5748uses
    58   UCore, UFormList, UFormSetting;
     49  UCore, UFormSetting;
    5950
    6051{$R *.lfm}
     
    8273  SYear = 'Year';
    8374  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';
    8482
    8583{ TFormMain }
     
    9189procedure TFormMain.FormCreate(Sender: TObject);
    9290begin
     91  DataViewLists := TListObject.Create;
    9392  Core.Init;
    9493  Core.PersistentForm.Load(Self);
     94  InitModules;
     95  ReloadPages;
    9596end;
    9697
    9798procedure TFormMain.FormDestroy(Sender: TObject);
    9899begin
     100  DataViewLists.Free;
    99101  Core.PersistentForm.Save(Self);
    100102  Core.Done;
     
    115117end;
    116118
    117 procedure TFormMain.TabSheetAttendanceShow(Sender: TObject);
    118 begin
    119 end;
    120 
    121 procedure TFormMain.TabSheetHolidaysShow(Sender: TObject);
     119procedure TFormMain.TabSheetShow(Sender: TObject);
    122120begin
    123121  if Assigned(Core.FormList) then Core.FormList.Free;
     
    128126    Align := alClient;
    129127    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]);
    138129    UpdateData;
    139130  end;
    140131end;
    141132
    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;
     133procedure TFormMain.InitModules;
     134var
     135  NewDataView: TDataViewList;
     136begin
     137  NewDataView := TDataViewList.Create;
     138  with NewDataView do begin
    211139    with Columns do begin
    212140      AddItem(SEnabled, 'Enabled', True, 30);
     
    220148      AddItem(SNote, 'Note', False, 80);
    221149    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);
     238end;
     239
     240procedure TFormMain.ReloadPages;
     241var
     242  NewPage: TTabSheet;
     243  I: Integer;
     244begin
     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;
    224254  end;
    225255end;
  • trunk/Languages/Dochazka.cs.po

    r7 r8  
    128128msgstr "Seznam"
    129129
     130#: tformlist.labelitemcount.caption
     131#, fuzzy
     132#| msgid "Item count:"
     133msgctxt "tformlist.labelitemcount.caption"
     134msgid "Item count: %s"
     135msgstr "Počet poloÅŸek:"
     136
    130137#: tformmain.aexit.caption
    131138msgctxt "tformmain.aexit.caption"
     
    156163msgstr "Systém"
    157164
    158 #: tformmain.tabsheetattendance.caption
    159 msgctxt "tformmain.tabsheetattendance.caption"
    160 msgid "Attendance"
    161 msgstr "Docházka"
    162 
    163 #: tformmain.tabsheetholidays.caption
    164 msgctxt "tformmain.tabsheetholidays.caption"
    165 msgid "Holidays"
    166 msgstr "Svátky"
    167 
    168 #: tformmain.tabsheetoperations.caption
    169 msgctxt "tformmain.tabsheetoperations.caption"
    170 msgid "Operations"
    171 msgstr "Operace"
    172 
    173 #: tformmain.tabsheetpassage.caption
    174 msgid "Passage"
    175 msgstr "Průchody"
    176 
    177 #: tformmain.tabsheetterminals.caption
    178 msgctxt "tformmain.tabsheetterminals.caption"
    179 msgid "Terminals"
    180 msgstr "Terminály"
    181 
    182 #: tformmain.tabsheetusers.caption
    183 msgctxt "tformmain.tabsheetusers.caption"
    184 msgid "Users"
    185 msgstr "UÅŸivatelé"
    186 
    187165#: tformsetting.caption
    188166msgctxt "tformsetting.caption"
     
    191169
    192170#: uformlist.sdoyouwanttodeleteitem
    193 msgid "Do you want to delte item"
    194 msgstr "Chcete vymazat poloÅŸku?"
     171#| msgid "Do you want to delte item"
     172msgid "Do you want to really delete item?"
     173msgstr "Chcete opravdu vymazat poloÅŸku?"
     174
     175#: uformlist.sitemcount
     176msgctxt "uformlist.sitemcount"
     177msgid "Item count: %s"
     178msgstr "Počet poloÅŸek: %s"
    195179
    196180#: uformlist.sitemdeletion
     
    202186msgstr "Adresa"
    203187
     188#: uformmain.sattendance
     189msgctxt "uformmain.sattendance"
     190msgid "Attendance"
     191msgstr "Docházka"
     192
    204193#: uformmain.scardcode
    205194msgid "Card code"
     
    222211msgstr "Jméno"
    223212
     213#: uformmain.sholiday
     214msgid "Holiday"
     215msgstr ""
     216
    224217#: uformmain.skeynumber
    225218msgid "Key number"
    226 msgstr ""
     219msgstr "Číslo klíče"
     220
     221#: uformmain.slog
     222msgctxt "uformmain.slog"
     223msgid "Log"
     224msgstr "Záznam"
    227225
    228226#: uformmain.slogin
     
    246244msgstr "Operace"
    247245
     246#: uformmain.spassage
     247msgctxt "uformmain.spassage"
     248msgid "Passage"
     249msgstr "Průchody"
     250
    248251#: uformmain.spassword
    249252msgid "Password"
     
    266269msgstr "Terminál"
    267270
     271#: uformmain.stext
     272msgid "Text"
     273msgstr "Text"
     274
    268275#: uformmain.stime
    269276msgid "Time"
    270277msgstr "Čas"
    271278
     279#: uformmain.stimefrom
     280msgid "Time from"
     281msgstr ""
     282
     283#: uformmain.stimeto
     284msgid "Time to"
     285msgstr ""
     286
    272287#: uformmain.stype
    273288msgid "Type"
  • trunk/Languages/Dochazka.po

    r7 r8  
    119119msgstr ""
    120120
     121#: tformlist.labelitemcount.caption
     122msgctxt "tformlist.labelitemcount.caption"
     123msgid "Item count: %s"
     124msgstr ""
     125
    121126#: tformmain.aexit.caption
    122127msgctxt "TFORMMAIN.AEXIT.CAPTION"
     
    147152msgstr ""
    148153
    149 #: tformmain.tabsheetattendance.caption
    150 msgctxt "TFORMMAIN.TABSHEETATTENDANCE.CAPTION"
    151 msgid "Attendance"
    152 msgstr ""
    153 
    154 #: tformmain.tabsheetholidays.caption
    155 msgctxt "TFORMMAIN.TABSHEETHOLIDAYS.CAPTION"
    156 msgid "Holidays"
    157 msgstr ""
    158 
    159 #: tformmain.tabsheetoperations.caption
    160 msgctxt "TFORMMAIN.TABSHEETOPERATIONS.CAPTION"
    161 msgid "Operations"
    162 msgstr ""
    163 
    164 #: tformmain.tabsheetpassage.caption
    165 msgid "Passage"
    166 msgstr ""
    167 
    168 #: tformmain.tabsheetterminals.caption
    169 msgctxt "TFORMMAIN.TABSHEETTERMINALS.CAPTION"
    170 msgid "Terminals"
    171 msgstr ""
    172 
    173 #: tformmain.tabsheetusers.caption
    174 msgctxt "TFORMMAIN.TABSHEETUSERS.CAPTION"
    175 msgid "Users"
    176 msgstr ""
    177 
    178154#: tformsetting.caption
    179155msgctxt "TFORMSETTING.CAPTION"
     
    182158
    183159#: uformlist.sdoyouwanttodeleteitem
    184 msgid "Do you want to delte item"
     160msgid "Do you want to really delete item?"
     161msgstr ""
     162
     163#: uformlist.sitemcount
     164msgctxt "uformlist.sitemcount"
     165msgid "Item count: %s"
    185166msgstr ""
    186167
     
    193174msgstr ""
    194175
     176#: uformmain.sattendance
     177msgctxt "uformmain.sattendance"
     178msgid "Attendance"
     179msgstr ""
     180
    195181#: uformmain.scardcode
    196182msgid "Card code"
     
    213199msgstr ""
    214200
     201#: uformmain.sholiday
     202msgid "Holiday"
     203msgstr ""
     204
    215205#: uformmain.skeynumber
    216206msgid "Key number"
    217207msgstr ""
    218208
     209#: uformmain.slog
     210msgctxt "uformmain.slog"
     211msgid "Log"
     212msgstr ""
     213
    219214#: uformmain.slogin
    220215msgid "Login"
     
    237232msgstr ""
    238233
     234#: uformmain.spassage
     235msgctxt "uformmain.spassage"
     236msgid "Passage"
     237msgstr ""
     238
    239239#: uformmain.spassword
    240240msgid "Password"
     
    257257msgstr ""
    258258
     259#: uformmain.stext
     260msgid "Text"
     261msgstr ""
     262
    259263#: uformmain.stime
    260264msgid "Time"
    261265msgstr ""
    262266
     267#: uformmain.stimefrom
     268msgid "Time from"
     269msgstr ""
     270
     271#: uformmain.stimeto
     272msgid "Time to"
     273msgstr ""
     274
    263275#: uformmain.stype
    264276msgid "Type"
  • trunk/Tasks.txt

    r4 r8  
    1 * tabulky zaměstnanci, terminály, průchody, docházka, svátky, operace
     1Základní funkce:
     2* zobrazování tabulek
    23* připojovací dialog k do systému. ověření jméno, heslo
    34* tiskové vÜstupy, vÜkazy, sestavy
    4 * načítání dat z terminálu BF-630
     5* načítání dat z terminálu Chyiu technology BF-630
    56* perzistence dat, SQL dotazy, inicializace
    67* nápověda
    78
    89Náročnější méně důleÅŸité:
     10* hromadné operace v tabulkách (tisk, export, mazání, aj.)
    911* exporty CSV, XML, ODT, ODS, XLS, DOC, RTF, TXT, aj.
    1012* podpora dalších terminálů
    1113* víceuşivatelská architektura klient/server
     14* třívrstvá architektura, komunikační API
    1215* grafické styly, témata, barevná schémata
    1316* podpora více typů databází
    1417* zásuvné moduly, doplňky, pluginy, addony, addiny, rozšíření
    15 * komunikační API
    1618* víceplatformní Windows, Linux, Mac OS
    1719* uşivatelsky definované sestavy
    1820* podpora více jazyků
    1921* 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
     26Zá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
     36Doplňkové tabulky:
     37* firmy
     38* zakázky
Note: See TracChangeset for help on using the changeset viewer.