Changeset 11


Ignore:
Timestamp:
Nov 15, 2012, 6:44:18 AM (12 years ago)
Author:
chronos
Message:
  • Přidáno: Dialog pro nastavení parametrů připojení.
Location:
trunk
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Dochazka.lpi

    r10 r11  
    8989      </Item4>
    9090    </RequiredPackages>
    91     <Units Count="10">
     91    <Units Count="11">
    9292      <Unit0>
    9393        <Filename Value="Dochazka.lpr"/>
     
    154154        <UnitName Value="UDataView"/>
    155155      </Unit9>
     156      <Unit10>
     157        <Filename Value="Forms/UFormConnection.pas"/>
     158        <IsPartOfProject Value="True"/>
     159        <ComponentName Value="FormConnection"/>
     160        <ResourceBaseClass Value="Form"/>
     161        <UnitName Value="UFormConnection"/>
     162      </Unit10>
    156163    </Units>
    157164  </ProjectOptions>
  • trunk/Dochazka.lpr

    r9 r11  
    99  Interfaces, // this includes the LCL widgetset
    1010  Forms, UFormMain, UCore, UAttendance, UPersistentForm, CoolWeb, Common,
    11   CoolTranslator, UFormSetting, SysUtils, UFormList, UFormEdit, UDataView
     11  CoolTranslator, UFormSetting, SysUtils, UFormList, UFormEdit, UDataView,
     12UFormConnection
    1213  { you can add units after this };
    1314
     
    3132  Application.CreateForm(TFormMain, FormMain);
    3233  Application.CreateForm(TFormSetting, FormSetting);
     34  Application.CreateForm(TFormConnection, FormConnection);
    3335  Application.Run;
    3436end.
  • trunk/Forms/UFormMain.lfm

    r10 r11  
    11object FormMain: TFormMain
    2   Left = 377
     2  Left = 306
    33  Height = 455
    4   Top = 138
     4  Top = 127
    55  Width = 733
    66  Caption = 'Attendance'
    7   ClientHeight = 430
     7  ClientHeight = 436
    88  ClientWidth = 733
    99  Menu = MainMenu1
     
    1616  object StatusBar1: TStatusBar
    1717    Left = 0
    18     Height = 21
    19     Top = 409
     18    Height = 20
     19    Top = 416
    2020    Width = 733
    2121    Panels = <>
     
    3939  object PageControl1: TPageControl
    4040    Left = 0
    41     Height = 383
     41    Height = 390
    4242    Top = 26
    4343    Width = 733
     
    5252    object MenuItemSystem: TMenuItem
    5353      Caption = 'System'
     54      object MenuItem3: TMenuItem
     55        Caption = 'Database'
     56        object MenuItem4: TMenuItem
     57          Action = AConnectionSettings
     58        end
     59      end
    5460      object MenuItem1: TMenuItem
    5561        Action = ASetting
     
    7379      Hint = 'Show global setting'
    7480      OnExecute = ASettingExecute
     81      ShortCut = 120
     82    end
     83    object AConnectionSettings: TAction
     84      Caption = 'Connection settings'
     85      OnExecute = AConnectionSettingsExecute
     86      ShortCut = 121
    7587    end
    7688  end
  • trunk/Forms/UFormMain.lrt

    r10 r11  
    11TFORMMAIN.CAPTION=Attendance
    22TFORMMAIN.MENUITEMSYSTEM.CAPTION=System
     3TFORMMAIN.MENUITEM3.CAPTION=Database
    34TFORMMAIN.AEXIT.CAPTION=Exit
    45TFORMMAIN.AEXIT.HINT=Close application
    56TFORMMAIN.ASETTING.CAPTION=Setting
    67TFORMMAIN.ASETTING.HINT=Show global setting
     8TFORMMAIN.ACONNECTIONSETTINGS.CAPTION=Connection settings
  • trunk/Forms/UFormMain.pas

    r10 r11  
    1414
    1515  TFormMain = class(TForm)
     16    AConnectionSettings: TAction;
    1617    ASetting: TAction;
    1718    AExit: TAction;
     
    2021    MainMenu1: TMainMenu;
    2122    MenuItem1: TMenuItem;
     23    MenuItem3: TMenuItem;
     24    MenuItem4: TMenuItem;
    2225    MenuItemSystem: TMenuItem;
    2326    MenuItem2: TMenuItem;
     
    2629    ToolBar1: TToolBar;
    2730    ToolButton1: TToolButton;
     31    procedure AConnectionSettingsExecute(Sender: TObject);
    2832    procedure AExitExecute(Sender: TObject);
    2933    procedure ASettingExecute(Sender: TObject);
     
    4751
    4852uses
    49   UCore, UFormSetting;
     53  UCore, UFormSetting, UFormConnection;
    5054
    5155{$R *.lfm}
     
    108112procedure TFormMain.AExitExecute(Sender: TObject);
    109113begin
    110   Exit;
     114  Close;
     115end;
     116
     117procedure TFormMain.AConnectionSettingsExecute(Sender: TObject);
     118begin
     119  FormConnection.LoadFromDatabase(Core.Database);
     120  if FormConnection.ShowModal = mrOk then begin
     121    FormConnection.SaveToDatabase(Core.Database);
     122    Core.Connect;
     123  end;
    111124end;
    112125
  • trunk/Languages/Dochazka.cs.po

    r10 r11  
    55"POT-Creation-Date: \n"
    66"PO-Revision-Date: \n"
    7 "Last-Translator: Chronos <robie@centrum.cz>\n"
     7"Last-Translator: Jiří Hajda <robie@centrum.cz>\n"
    88"Language-Team: \n"
    99"MIME-Version: 1.0\n"
     
    5656msgstr "Nastavení"
    5757
     58#: tformconnection.buttoncancel.caption
     59msgctxt "tformconnection.buttoncancel.caption"
     60msgid "Cancel"
     61msgstr "ZruÅ¡it"
     62
     63#: tformconnection.buttonconnect.caption
     64msgid "Connect"
     65msgstr "Připojit"
     66
     67#: tformconnection.caption
     68msgctxt "tformconnection.caption"
     69msgid "Connection settings"
     70msgstr "Nastavení připojení"
     71
     72#: tformconnection.label1.caption
     73#| msgid "Hostname:"
     74msgid "Host:"
     75msgstr "Počítač:"
     76
     77#: tformconnection.label2.caption
     78msgid "User:"
     79msgstr "UÅŸivatel:"
     80
     81#: tformconnection.label3.caption
     82msgid "Password:"
     83msgstr "Heslo:"
     84
     85#: tformconnection.label4.caption
     86msgid "Schema:"
     87msgstr "Schéma:"
     88
    5889#: tformedit.buttoncancel.caption
     90msgctxt "tformedit.buttoncancel.caption"
    5991msgid "Cancel"
    6092msgstr "Zrušit"
     
    134166msgstr "Počet poloşek: %s"
    135167
     168#: tformmain.aconnectionsettings.caption
     169msgctxt "tformmain.aconnectionsettings.caption"
     170msgid "Connection settings"
     171msgstr "Nastavení připojení"
     172
    136173#: tformmain.aexit.caption
    137174msgctxt "tformmain.aexit.caption"
     
    157194msgstr "Docházka"
    158195
     196#: tformmain.menuitem3.caption
     197msgid "Database"
     198msgstr "Databáze"
     199
    159200#: tformmain.menuitemsystem.caption
    160201msgctxt "tformmain.menuitemsystem.caption"
     
    299340msgid "Year"
    300341msgstr "Rok"
    301 
  • trunk/Languages/Dochazka.po

    r10 r11  
    4747msgstr ""
    4848
     49#: tformconnection.buttoncancel.caption
     50msgctxt "TFORMCONNECTION.BUTTONCANCEL.CAPTION"
     51msgid "Cancel"
     52msgstr ""
     53
     54#: tformconnection.buttonconnect.caption
     55msgid "Connect"
     56msgstr ""
     57
     58#: tformconnection.caption
     59msgctxt "tformconnection.caption"
     60msgid "Connection settings"
     61msgstr ""
     62
     63#: tformconnection.label1.caption
     64msgid "Host:"
     65msgstr ""
     66
     67#: tformconnection.label2.caption
     68msgid "User:"
     69msgstr ""
     70
     71#: tformconnection.label3.caption
     72msgid "Password:"
     73msgstr ""
     74
     75#: tformconnection.label4.caption
     76msgid "Schema:"
     77msgstr ""
     78
    4979#: tformedit.buttoncancel.caption
     80msgctxt "tformedit.buttoncancel.caption"
    5081msgid "Cancel"
    5182msgstr ""
     
    124155msgstr ""
    125156
     157#: tformmain.aconnectionsettings.caption
     158msgctxt "TFORMMAIN.ACONNECTIONSETTINGS.CAPTION"
     159msgid "Connection settings"
     160msgstr ""
     161
    126162#: tformmain.aexit.caption
    127163msgctxt "TFORMMAIN.AEXIT.CAPTION"
     
    147183msgstr ""
    148184
     185#: tformmain.menuitem3.caption
     186msgid "Database"
     187msgstr ""
     188
    149189#: tformmain.menuitemsystem.caption
    150190msgctxt "TFORMMAIN.MENUITEMSYSTEM.CAPTION"
Note: See TracChangeset for help on using the changeset viewer.