Changeset 23 for trunk/Forms


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/Forms
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.