Changeset 23


Ignore:
Timestamp:
Nov 16, 2012, 1:26:29 PM (12 years ago)
Author:
chronos
Message:
  • Přidáno: Rozpracovaná třídy pro komunikaci s přístupovým terminálem BF-630. Přiložen popis protokolu.
Location:
trunk
Files:
84 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChronIS.lpi

    r22 r23  
    7373      </local>
    7474    </RunParams>
    75     <RequiredPackages Count="8">
     75    <RequiredPackages Count="11">
    7676      <Item1>
     77        <PackageName Value="PrintPreview"/>
     78        <DefaultFilename Value="Packages/PrintPreview/PrintPreview.lpk" Prefer="True"/>
     79      </Item1>
     80      <Item2>
     81        <PackageName Value="PinConnection"/>
     82        <DefaultFilename Value="Packages/PinConnection/PinConnection.lpk" Prefer="True"/>
     83      </Item2>
     84      <Item3>
     85        <PackageName Value="CoolStreaming"/>
     86        <DefaultFilename Value="Packages/CoolStreaming/CoolStreaming.lpk" Prefer="True"/>
     87      </Item3>
     88      <Item4>
    7789        <PackageName Value="TEditExtensions"/>
    7890        <DefaultFilename Value="Packages/TEditExtensions/TEditExtensions.lpk" Prefer="True"/>
    79       </Item1>
    80       <Item2>
     91      </Item4>
     92      <Item5>
    8193        <PackageName Value="synapse"/>
    8294        <DefaultFilename Value="Packages/synapse/synapse.lpk" Prefer="True"/>
    83       </Item2>
    84       <Item3>
     95      </Item5>
     96      <Item6>
    8597        <PackageName Value="ModularSystem"/>
    8698        <DefaultFilename Value="Packages/ModularSystem/ModularSystem.lpk" Prefer="True"/>
    87       </Item3>
    88       <Item4>
     99      </Item6>
     100      <Item7>
    89101        <PackageName Value="TemplateGenerics"/>
    90102        <DefaultFilename Value="Packages/TemplateGenerics/TemplateGenerics.lpk" Prefer="True"/>
    91       </Item4>
    92       <Item5>
     103      </Item7>
     104      <Item8>
    93105        <PackageName Value="CoolTranslator"/>
    94106        <DefaultFilename Value="Packages/CoolTranslator/CoolTranslator.lpk" Prefer="True"/>
    95       </Item5>
    96       <Item6>
     107      </Item8>
     108      <Item9>
    97109        <PackageName Value="Common"/>
    98110        <DefaultFilename Value="Packages/Common/Common.lpk" Prefer="True"/>
    99       </Item6>
    100       <Item7>
     111      </Item9>
     112      <Item10>
    101113        <PackageName Value="CoolWeb"/>
    102114        <DefaultFilename Value="Packages/CoolWeb/CoolWeb.lpk" Prefer="True"/>
    103       </Item7>
    104       <Item8>
     115      </Item10>
     116      <Item11>
    105117        <PackageName Value="LCL"/>
    106       </Item8>
     118      </Item11>
    107119    </RequiredPackages>
    108     <Units Count="16">
     120    <Units Count="17">
    109121      <Unit0>
    110122        <Filename Value="ChronIS.lpr"/>
     
    213225        <UnitName Value="UModuleChiyuAccessControlers"/>
    214226      </Unit15>
     227      <Unit16>
     228        <Filename Value="Modules/ChiyuAccessControlers/UTerminalBF630.pas"/>
     229        <IsPartOfProject Value="True"/>
     230        <UnitName Value="UTerminalBF630"/>
     231      </Unit16>
    215232    </Units>
    216233  </ProjectOptions>
  • trunk/ChronIS.lpr

    r22 r23  
    88  {$ENDIF}{$ENDIF}
    99  Interfaces, // this includes the LCL widgetset
    10   Forms, UFormMain, UCore, UAttendance, CoolWeb, Common,
     10  Forms, UFormMain, UCore, CoolStreaming, UAttendance, CoolWeb, Common,
    1111  CoolTranslator, UFormSetting, SysUtils, UFormList, UFormEdit, UDataView,
    12   URegistredModules, TemplateGenerics, synapse, TEditExtensions,
    13   UFormConnection, UModuleAttendance, UDataModel, UFormVirtualTerminal,
    14 UAccessControler, UModuleChiyuAccessControlers;
     12  URegistredModules, TemplateGenerics, synapse, TEditExtensions, PinConnection,
     13  PrintPreview, UFormConnection, UModuleAttendance, UDataModel,
     14  UFormVirtualTerminal, UAccessControler, UModuleChiyuAccessControlers,
     15  UTerminalBF630;
    1516
    1617{$R *.res}
  • trunk/Forms/UFormConnection.pas

    r12 r23  
    4444  EditHostName.Text := Database.HostName;
    4545  EditUserName.Text := Database.UserName;
    46   EditPassword.Text := '';
     46  EditPassword.Text := Database.Password;
    4747  EditSchema.Text := Database.Database;
    4848end;
  • trunk/Forms/UFormList.lfm

    r16 r23  
    134134      Hint = 'Send to printer'
    135135      ImageIndex = 6
     136      OnExecute = APrintExecute
    136137    end
    137138    object AExport: TAction
     
    342343    end
    343344  end
     345  object PrintPreview1: TPrintPreview
     346    Zoom = 1
     347    left = 240
     348    top = 112
     349  end
    344350end
  • trunk/Forms/UFormList.pas

    r20 r23  
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
    99  ActnList, Menus, StdCtrls, ExtCtrls, SpecializedList, USqlDatabase,
    10   UListViewSort, UDataView, URegistry;
     10  UListViewSort, UDataView, URegistry, UPrintPreview;
    1111
    1212type
     
    6161    Panel1: TPanel;
    6262    PopupMenu1: TPopupMenu;
     63    PrintPreview1: TPrintPreview;
    6364    ToolBar1: TToolBar;
    6465    ToolButton1: TToolButton;
     
    7374    procedure ADuplicateExecute(Sender: TObject);
    7475    procedure AModifyExecute(Sender: TObject);
     76    procedure APrintExecute(Sender: TObject);
    7577    procedure AReloadExecute(Sender: TObject);
    7678    procedure FormCreate(Sender: TObject);
     
    171173end;
    172174
     175procedure TFormList.APrintExecute(Sender: TObject);
     176begin
     177  PrintPreview1.Preview;
     178end;
     179
    173180procedure TFormList.AReloadExecute(Sender: TObject);
    174181begin
     
    277284    Filter := Filter + ', `' + Name + '`';
    278285  end;
    279   Core.Database.Query(DbRows, 'SELECT ' + Filter + ' FROM ' + View.Name);
     286  if Core.Database.Connected then
     287    Core.Database.Query(DbRows, 'SELECT ' + Filter + ' FROM ' + View.Name);
    280288
    281289  ListView1.Items.Count := DbRows.Count;
  • trunk/Forms/UFormMain.pas

    r18 r23  
    156156begin
    157157  UpdateInterface;
     158  AConnect.Execute;
    158159end;
    159160
  • trunk/Languages/ChronIS.cs.po

    r20 r23  
    542542msgstr ""
    543543
     544#: uterminalbf630.scommunicatiomtimeout
     545msgid "Communication timeout"
     546msgstr ""
     547
  • trunk/Languages/ChronIS.po

    r20 r23  
    520520msgstr ""
    521521
     522#: uterminalbf630.scommunicatiomtimeout
     523msgid "Communication timeout"
     524msgstr ""
     525
  • trunk/Modules/ChiyuAccessControlers/UModuleChiyuAccessControlers.pas

    r20 r23  
    66
    77uses
    8   Classes, SysUtils, FileUtil, UModularSystem, UAccessControler;
     8  Classes, SysUtils, FileUtil, UModularSystem, UAccessControler, UTerminalBF630;
    99
    1010type
     
    1414  public
    1515    { public declarations }
    16   end;
    17 
    18   TAccessControlerBF630 = class(TAccessControler)
    19 
    2016  end;
    2117
     
    2824    procedure DoStop; override;
    2925  public
     26    TerminalBF630: TTerminalBF630;
    3027    constructor Create(Owner: TComponent); override;
    3128    destructor Destroy; override;
     
    4744begin
    4845  inherited DoStart;
     46  TerminalBF630 := TTerminalBF630.Create;
    4947end;
    5048
    5149procedure TModuleChiyuAccessControlers.DoStop;
    5250begin
     51  FreeAndNil(TerminalBF630);
    5352  inherited DoStop;
    5453end;
  • trunk/UCore.pas

    r19 r23  
    9595    ModuleManager.Modules.EndUpdate;
    9696  end;
    97   Connect;
    9897end;
    9998
Note: See TracChangeset for help on using the changeset viewer.