Changeset 7 for trunk/Forms


Ignore:
Timestamp:
Nov 14, 2012, 12:33:52 PM (12 years ago)
Author:
chronos
Message:
  • Upraveno: Doplněno zobrazení dalších tabulek.
  • Přidáno: InnoSetup skript pro sestavení instalátoru.
Location:
trunk/Forms
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormList.lfm

    r6 r7  
    11object FormList: TFormList
    2   Left = 459
     2  Left = 384
    33  Height = 240
    4   Top = 236
    5   Width = 320
     4  Top = 180
     5  Width = 470
    66  Caption = 'List'
    77  ClientHeight = 240
    8   ClientWidth = 320
     8  ClientWidth = 470
    99  OnCreate = FormCreate
    1010  OnDestroy = FormDestroy
     
    1515    Height = 46
    1616    Top = 194
    17     Width = 320
     17    Width = 470
    1818    Align = alBottom
    1919    ButtonHeight = 44
     
    4949      Action = AReload
    5050    end
     51    object ToolButton6: TToolButton
     52      Left = 245
     53      Top = 2
     54      Action = APrint
     55    end
     56    object ToolButton7: TToolButton
     57      Left = 293
     58      Top = 2
     59      Action = AExport
     60    end
    5161  end
    5262  object ListView1: TListView
     
    5464    Height = 194
    5565    Top = 0
    56     Width = 320
     66    Width = 470
    5767    Align = alClient
    5868    Columns = <>
     
    6575    ViewStyle = vsReport
    6676    OnData = ListView1Data
     77    OnDblClick = AModifyExecute
    6778    OnSelectItem = ListView1SelectItem
    6879  end
     
    7586      Hint = 'Add new item'
    7687      ImageIndex = 1
     88      OnExecute = AAddExecute
    7789    end
    7890    object ADuplicate: TAction
     
    8092      Hint = 'Duplicate item'
    8193      ImageIndex = 2
     94      OnExecute = ADuplicateExecute
    8295    end
    8396    object ADelete: TAction
     
    8598      Hint = 'Delete item'
    8699      ImageIndex = 0
     100      OnExecute = ADeleteExecute
    87101    end
    88102    object AModify: TAction
     
    90104      Hint = 'Modify item'
    91105      ImageIndex = 4
     106      OnExecute = AModifyExecute
    92107    end
    93108    object AReload: TAction
     
    95110      Hint = 'Reload data'
    96111      ImageIndex = 5
     112    end
     113    object APrint: TAction
     114      Caption = 'Print'
     115      Hint = 'Send to printer'
     116      ImageIndex = 6
     117    end
     118    object AExport: TAction
     119      Caption = 'Export'
     120      Hint = 'Export to different format'
     121      ImageIndex = 7
    97122    end
    98123  end
     
    220245    object MenuItem4: TMenuItem
    221246      Action = AModify
     247      Default = True
    222248      Bitmap.Data = {
    223249        36040000424D3604000000000000360000002800000010000000100000000100
  • trunk/Forms/UFormList.lrt

    r6 r7  
    1010TFORMLIST.ARELOAD.CAPTION=Reload
    1111TFORMLIST.ARELOAD.HINT=Reload data
     12TFORMLIST.APRINT.CAPTION=Print
     13TFORMLIST.APRINT.HINT=Send to printer
     14TFORMLIST.AEXPORT.CAPTION=Export
     15TFORMLIST.AEXPORT.HINT=Export to different format
  • trunk/Forms/UFormList.pas

    r6 r7  
    2727  TFormList = class(TForm)
    2828    AAdd: TAction;
     29    APrint: TAction;
     30    AExport: TAction;
    2931    AReload: TAction;
    3032    AModify: TAction;
     
    4547    ToolButton4: TToolButton;
    4648    ToolButton5: TToolButton;
     49    ToolButton6: TToolButton;
     50    ToolButton7: TToolButton;
     51    procedure AAddExecute(Sender: TObject);
     52    procedure ADeleteExecute(Sender: TObject);
     53    procedure ADuplicateExecute(Sender: TObject);
     54    procedure AModifyExecute(Sender: TObject);
    4755    procedure FormCreate(Sender: TObject);
    4856    procedure FormDestroy(Sender: TObject);
     
    6876
    6977uses
    70   UCore;
     78  UCore, UFormEdit;
     79
     80resourcestring
     81  SItemDeletion = 'Item deletion';
     82  SDoYouWantToDeleteItem = 'Do you want to delte item';
    7183
    7284{ TListColumns }
     
    91103  Columns := TListDbColumn.Create;
    92104  DbRows := TDbRows.Create;
     105end;
     106
     107procedure TFormList.AModifyExecute(Sender: TObject);
     108begin
     109  if FormEdit.ShowModal = mrOk then begin
     110  end;
     111end;
     112
     113procedure TFormList.AAddExecute(Sender: TObject);
     114begin
     115  if FormEdit.ShowModal = mrOk then begin
     116  end;
     117end;
     118
     119procedure TFormList.ADeleteExecute(Sender: TObject);
     120begin
     121  if FormEdit.ShowModal = mrOk then begin
     122    if MessageDlg(SItemDeletion, SDoYouWantToDeleteItem, mtConfirmation,
     123      [mbYes, mbNo], 0) = mrYes then begin
     124      Core.Database.Query(nil, 'DELETE FROM `' + Table + '` WHERE `Id` = ' + IntToStr(0));
     125    end;
     126  end;
     127end;
     128
     129procedure TFormList.ADuplicateExecute(Sender: TObject);
     130begin
     131  if FormEdit.ShowModal = mrOk then begin
     132  end;
    93133end;
    94134
  • trunk/Forms/UFormMain.lfm

    r6 r7  
    1919    Top = 26
    2020    Width = 733
    21     ActivePage = TabSheetTerminals
     21    ActivePage = TabSheetOperations
    2222    Align = alClient
    2323    Images = ImageList1
    24     TabIndex = 2
     24    TabIndex = 4
    2525    TabOrder = 0
    2626    object TabSheetUsers: TTabSheet
    2727      Caption = 'Users'
    28       OnHide = TabSheetUsersHide
    2928      OnShow = TabSheetUsersShow
    3029    end
    3130    object TabSheetAttendance: TTabSheet
    3231      Caption = 'Attendance'
     32      OnShow = TabSheetAttendanceShow
    3333    end
    3434    object TabSheetTerminals: TTabSheet
     
    3838    object TabSheetHolidays: TTabSheet
    3939      Caption = 'Holidays'
     40      OnShow = TabSheetHolidaysShow
    4041    end
    4142    object TabSheetOperations: TTabSheet
    4243      Caption = 'Operations'
     44      OnShow = TabSheetOperationsShow
     45    end
     46    object TabSheetPassage: TTabSheet
     47      Caption = 'Passage'
     48      OnShow = TabSheetPassageShow
    4349    end
    4450  end
     
    98104    top = 168
    99105    Bitmap = {
    100       4C69060000001000000010000000000000000000000000000000000000000000
     106      4C69080000001000000010000000000000000000000000000000000000000000
    101107      0000000000000000000000000000000000000000000000000000000000000000
    102108      000000000000000000000000000000000000000000008C8CBBFF000088FF8C8C
     
    290296      0000000000000000000000000000000000000000000000000000000000000000
    291297      0000000000000000000000000000000000000000000000000000000000000000
    292       0000000000000000000000000000
     298      0000000000000000000000000000000000000000000000000000C17D4460C88B
     299      4DBBC88C4FFEC88C4FFFC88D4FF7C98C4FF7C5894CFEC4763B94000000000000
     300      0000000000000000000000000000000000000000000000000000C48649FAF7F2
     301      ECFFF8F4EEFFF8F3EDFFF8F3EDFFF8F2ECFFF2E6D7FFE2B27DFFDA9163F6B46B
     302      3E07000000000000000000000000000000000000000000000000C6894CF6F9F5
     303      F1FFFCE3CDFFFBE3CDFFF9E0C8FFF8DCC2FFFDFBF8FFFCE6CDFFE2B684FFBF79
     304      42A6000000000000000000000000000000000000000000000000C6894BF7F9F5
     305      F1FFFCE3CFFFFCE4CFFFFAE1CAFFF9DDC4FFF4E9DFFFF7F2ECFFF5EFE9FFC27E
     306      45FB000000000000000000000000000000000000000081818109C5894BF9F9F4
     307      F0FFFCE6D3FFFDE7D3FFFBE3CDFFFAE0C8FFF5D6BBFFF3D4B5FFF8F4F0FFC382
     308      46F96060600900000000000000000000000081818163818181F3C5894CFFF9F4
     309      EFFFFEE7D7FFFDE7D5FFFCE6D2FFFBE1CCFFF8DCC2FFF6DABDFFFAF4EFFFC483
     310      48FF595959F35353536300000000818181459A9A9AFFCCCCCCFFC78B4EFFF9F4
     311      EDFFFEE8D8FFFEE8D7FFFDE5D3FFFCE4D1FFFAE0C7FFF9DDC3FFFAF4EDFFC785
     312      4AFFC3C3C3FF747474FF47474745818181D2D2D2D2FFE8E8E8FF7D7D7DFF7D7D
     313      7DFF7D7D7DFF7D7D7DFF7D7D7DFF7D7D7DFF7D7D7DFF7D7D7DFF7D7D7DFF7D7D
     314      7DFFE8E8E8FFC4C4C4FF565656DC818181F9FCFCFCFFFCFCFCFFCBCBCBFFF2F2
     315      F2FFF2F2F2FFF2F2F2FFF2F2F2FFF2F2F2FFF2F2F2FFF2F2F2FFF2F2F2FFC6C6
     316      C6FFFCFCFCFFFCFCFCFF707070FE7E7E7EFFF9F9F9FFF9F9F9FFABABABFFDFDF
     317      DFFFCBCBCBFFCBCBCBFFCBCBCBFFCBCBCBFFCBCBCBFFCBCBCBFFDFDFDFFFA3A3
     318      A3FFF9F9F9FFF9F9F9FF616161FF7A7A7AFFD7D7D7FFD7D7D7FF979797FFD8D8
     319      D8FFBFBFBFFFBFBFBFFFBFBFBFFFBFBFBFFFBFBFBFFFBFBFBFFFD7D7D7FF8E8E
     320      8EFFD7D7D7FFD7D7D7FF3F3F3FFF757575FFBBBBBBFFBBBBBBFF8D8D8DFFD4D4
     321      D4FFB9B9B9FFB9B9B9FFB9B9B9FFB9B9B9FFB9B9B9FFB9B9B9FFD3D3D3FF8383
     322      83FFBBBBBBFFBBBBBBFF2A2A2AFF707070FFB5B5B5FFB5B5B5FF959595FF8181
     323      81FF818181FF797979FF6E6E6EFF616161FF525252FF434343FF424242FF6E6E
     324      6EFFB5B5B5FFB5B5B5FF252525FF6A6A6AFDA7A7A7FFB5B5B5FF818181FFAFAC
     325      AAFFC5C0BDFFC5C0BDFFC5C0BDFFC5C0BDFFC5C0BDFFC5C0BDFFADAAA8FF2C2C
     326      2CFFB5B5B5FF9B9B9BFF232323FF636363995D5D5DD2585858FFC79561FFF9F7
     327      F6FFF9F1ECFFF9F1EBFFF8F0E9FFF7EDE6FFF4EAE1FFF2E8DEFFFAF8F6FFC794
     328      61FF242424FF232323D12323237A000000000000000000000000C89561FDCA98
     329      65FFCA9765FFCA9765FFCA9765FFCA9764FFC99764FFC99764FFCA9865FFC894
     330      61FD000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     331      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     332      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     333      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     334      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00757575FF757575FF757575FF7575
     335      75FF757575FF757575FF757575FF757575FF757575FF757575FF757575FFFFFF
     336      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00757575FFAAAAAAFFAAAAAAFFAAAA
     337      AAFFAAAAAAFFAAAAAAFFAAAAAAFFAAAAAAFFAAAAAAFFAAAAAAFF757575FFFFFF
     338      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00757575FFFFFFFFFFFFFFFFFFFFFF
     339      FFFFFFFFFFFFFFFFFFFFF9F9F9FFF6F6F6FFF1F1F1FFEDEDEDFF757575FFFFFF
     340      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00757575FFFFFFFFFF999999FFFFFF
     341      FFFF999999FFFCFCFCFF999999FFF6F6F6FF999999FFEDEDEDFF757575FFFFFF
     342      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00757575FFFFFFFFFF999999FFFDFD
     343      FDFF999999FFF6F6F6FF999999FFEDEDEDFF999999FFE7E7E7FF757575FFFFFF
     344      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00757575FFFFFFFFFF999999FFF9F9
     345      F9FF999999FFF1F1F1FF999999FFE8E8E8FF999999FFE2E2E2FF757575FFFFFF
     346      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00757575FFFFFFFFFF999999FFF6F6
     347      F6FF999999FFEDEDEDFF999999FFE3E3E3FF999999FFDBDBDBFF757575FFFFFF
     348      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00757575FFFFFFFFFF999999FFF1F1
     349      F1FF999999FFE8E8E8FF999999FFDFDFDFFF999999FFD7D7D7FF757575FFFFFF
     350      FF00FFFFFFFFFFFFFF00FFFFFF00FFFFFF00757575FFFFFFFFFF999999FFEDED
     351      EDFF999999FFE3E3E3FF999999FFDADADAFFD6D6D6FFEDEDEDFFC8C8C8FFFFFF
     352      FF00191919FFFFFFFFFFFFFFFF00FFFFFF00757575FFFFFFFFFFEDEDEDFFE8E8
     353      E8FFE3E3E3FFDFDFDFFFDADADAFFC2C2C2FFA0A0A0FF7C7C7CFF303030FF3E3E
     354      3EFF1A1A1AFF000000FFFFFFFFFFFFFFFF00757575FF757575FF757575FF7575
     355      75FF757575FF757575FF757575FF6A6A6AFF595959FF454545FF303030FF3E3E
     356      3EFF191919FF000000FF000000FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     357      FF00FFFFFF00FFFFFF00FFFFFF00E6E6E6FFC1C1C1FF969696FF696969FF3E3E
     358      3EFF191919FF000000FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     359      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     360      FF00191919FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     361      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     362      FF00FFFFFF00FFFFFF00FFFFFF00
    293363    }
    294364  end
  • trunk/Forms/UFormMain.lrt

    r6 r7  
    55TFORMMAIN.TABSHEETHOLIDAYS.CAPTION=Holidays
    66TFORMMAIN.TABSHEETOPERATIONS.CAPTION=Operations
     7TFORMMAIN.TABSHEETPASSAGE.CAPTION=Passage
    78TFORMMAIN.MENUITEMSYSTEM.CAPTION=System
    89TFORMMAIN.AEXIT.CAPTION=Exit
  • trunk/Forms/UFormMain.pas

    r6 r7  
    2424    PageControl1: TPageControl;
    2525    StatusBar1: TStatusBar;
     26    TabSheetPassage: TTabSheet;
    2627    TabSheetHolidays: TTabSheet;
    2728    TabSheetOperations: TTabSheet;
     
    3738    procedure FormDestroy(Sender: TObject);
    3839    procedure FormShow(Sender: TObject);
     40    procedure TabSheetAttendanceShow(Sender: TObject);
     41    procedure TabSheetHolidaysShow(Sender: TObject);
     42    procedure TabSheetOperationsShow(Sender: TObject);
     43    procedure TabSheetPassageShow(Sender: TObject);
    3944    procedure TabSheetTerminalsShow(Sender: TObject);
    40     procedure TabSheetUsersHide(Sender: TObject);
    4145    procedure TabSheetUsersShow(Sender: TObject);
    4246  private
     
    7074  SLogin = 'Login';
    7175  SPassword = 'Password';
     76  STerminal = 'Terminal';
     77  SUser = 'User';
     78  STime = 'Time';
     79  SOperation = 'Operation';
     80  SDay = 'Day';
     81  SMonth = 'Month';
     82  SYear = 'Year';
     83  SKeyNumber = 'Key number';
    7284
    7385{ TFormMain }
     
    103115end;
    104116
     117procedure TFormMain.TabSheetAttendanceShow(Sender: TObject);
     118begin
     119end;
     120
     121procedure TFormMain.TabSheetHolidaysShow(Sender: TObject);
     122begin
     123  if Assigned(Core.FormList) then Core.FormList.Free;
     124  Core.FormList := TFormList.Create(Self);
     125  Core.CoolTranslator1.TranslateComponentRecursive(Core.FormList);
     126  with TFormList(Core.FormList) do begin
     127    ManualDock(TTabSheet(Sender));
     128    Align := alClient;
     129    Show;
     130    with Columns do begin
     131      AddItem(SEnabled, 'Enabled', True, 30);
     132      AddItem(SName, 'Name', True, 300);
     133      AddItem(SDay, 'Day', True, 50);
     134      AddItem(SMonth, 'Month', True, 50);
     135      AddItem(SYear, 'Year', True, 50);
     136    end;
     137    Table := 'Holiday';
     138    UpdateData;
     139  end;
     140end;
     141
     142procedure TFormMain.TabSheetOperationsShow(Sender: TObject);
     143begin
     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;
     158end;
     159
     160procedure TFormMain.TabSheetPassageShow(Sender: TObject);
     161begin
     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;
     178end;
     179
    105180procedure TFormMain.TabSheetTerminalsShow(Sender: TObject);
    106181begin
    107   Core.FormTerminals := TFormList.Create(Self);
    108   with TFormList(Core.FormTerminals) do begin
     182  if Assigned(Core.FormList) then Core.FormList.Free;
     183  Core.FormList := TFormList.Create(Self);
     184  Core.CoolTranslator1.TranslateComponentRecursive(Core.FormList);
     185  with TFormList(Core.FormList) do begin
    109186    ManualDock(TTabSheet(Sender));
    110187    Align := alClient;
     
    112189    with Columns do begin
    113190      AddItem(SName, 'Name', True, 80);
    114       AddItem(SEnabled, 'Enabled', True, 80);
    115       AddItem(SAddress, 'Address', True, 80);
    116       AddItem(SPort, 'Port', True, 80);
     191      AddItem(SEnabled, 'Enabled', True, 30);
     192      AddItem(SAddress, 'Address', True, 120);
     193      AddItem(SPort, 'Port', True, 50);
    117194      AddItem(SType, 'Type', True, 80);
    118195      AddItem(SNote, 'Note', True, 80);
     
    123200end;
    124201
    125 procedure TFormMain.TabSheetUsersHide(Sender: TObject);
    126 begin
    127   FreeAndNil(Core.FormUsers);
    128 end;
    129 
    130202procedure TFormMain.TabSheetUsersShow(Sender: TObject);
    131203begin
    132   Core.FormUsers := TFormList.Create(Self);
    133   with TFormList(Core.FormUsers) do begin
    134     ManualDock(TTabSheet(Sender));
    135     Align := alClient;
    136     Show;
    137     with Columns do begin
    138       AddItem(SEnabled, 'Enabled', True, 80);
     204  if Assigned(Core.FormList) then Core.FormList.Free;
     205  Core.FormList := TFormList.Create(Self);
     206  Core.CoolTranslator1.TranslateComponentRecursive(Core.FormList);
     207  with TFormList(Core.FormList) do begin
     208    ManualDock(TTabSheet(Sender));
     209    Align := alClient;
     210    Show;
     211    with Columns do begin
     212      AddItem(SEnabled, 'Enabled', True, 30);
    139213      AddItem(SPersonalId, 'PersonalId', True, 80);
    140214      AddItem(SLogin, 'Login', False, 80);
Note: See TracChangeset for help on using the changeset viewer.