PageRenderTime 21ms CodeModel.GetById 12ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/Gedemin/Transaction/gdv_frAcctAnalyticsGroup_unit.pas

http://gedemin.googlecode.com/
Pascal | 123 lines | 101 code | 19 blank | 3 comment | 0 complexity | 6aff8918e89f61bca434120eb76f95f0 MD5 | raw file
  1unit gdv_frAcctAnalyticsGroup_unit;
  2
  3interface
  4
  5uses
  6  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7  ExtCtrls, gdvParamPanel, StdCtrls, ActnList, CheckLst, contnrs, IBSQL,
  8  gdcBaseInterface, AcctUtils, at_classes, gdv_AvailAnalytics_unit, AcctStrings,
  9  gd_common_functions, gdv_frAcctBaseAnalyticGroup;
 10
 11type
 12  TfrAcctAnalyticsGroup = class(TfrAcctBaseAnalyticsGroup)
 13    ppMain: TgdvParamPanel;
 14    pClient: TPanel;
 15    bAvail: TBevel;
 16    lbAvail: TListBox;
 17    bIncludeAll: TButton;
 18    bExclude: TButton;
 19    bExcludeAll: TButton;
 20    bSelected: TBevel;
 21    bInclude: TButton;
 22    lAvail: TLabel;
 23    lSelected: TLabel;
 24    bUp: TButton;
 25    bDown: TButton;
 26    lbSelected: TCheckListBox;
 27    procedure pClientResize(Sender: TObject);
 28    procedure ppMainResize(Sender: TObject);
 29    procedure lbSelectedClickCheck(Sender: TObject);
 30  private
 31    { Private declarations }
 32
 33    procedure ppMainAlignControls;
 34  protected
 35    procedure Loaded; override;
 36    function ListBoxSelected: TCheckListBox; override;
 37    function ListBoxAvail: TListBox; override;
 38  public
 39    { Public declarations }
 40    procedure SaveToStream(Stream: TStream);override;
 41    procedure LoadFromStream(Stream: TStream);override;
 42  end;
 43
 44implementation
 45
 46{$R *.DFM}
 47
 48procedure TfrAcctAnalyticsGroup.pClientResize(Sender: TObject);
 49begin
 50  SetBounds(Left, Top, ppMain.Width, ppMain.Height);
 51end;
 52
 53procedure TfrAcctAnalyticsGroup.ppMainResize(Sender: TObject);
 54begin
 55  ppMainAlignControls;
 56end;
 57
 58procedure TfrAcctAnalyticsGroup.ppMainAlignControls;
 59var
 60  R: TRect;
 61  W, L: Integer;
 62begin
 63  SetBounds(Left, Top, ppMain.Width, ppMain.Height);
 64  R := pClient.ClientRect;
 65  W := R.Right - R.Left;
 66  bAvail.Left := 6;
 67  ListBoxAvail.Width := (W - bInclude.Width - (6 + 4) * 2) div 2;
 68  L := bAvail.Left + ListBoxAvail.Width + 4;
 69  bInclude.Left := L;
 70  bIncludeAll.Left := L;
 71  bExclude.Left := L;
 72  bExcludeAll.Left := L;
 73  L := 6 + bInclude.Width + bInclude.Left;
 74  ListBoxSelected.Left := L;
 75  ListBoxSelected.Width := ListBoxAvail.Width;
 76  bAvail.Left := ListBoxAvail.Left - 2;
 77  bAvail.Width := ListBoxAvail.Width + 4;
 78  bSelected.Left := ListBoxSelected.Left - 2;
 79  bSelected.Width := ListBoxSelected.Width + 4;
 80
 81  bUp.Left := bSelected.Left;
 82  bUp.Width := (bSelected.Width - 2) div 2;
 83  L := bUp.Left + bUp.Width + 2;
 84  bDown.Left := L;
 85  bDown.Width := bUp.Width;
 86
 87  lAvail.Left := bAvail.Left;
 88  lSelected.Left := bSelected.Left;
 89end;
 90
 91procedure TfrAcctAnalyticsGroup.Loaded;
 92begin
 93  inherited;
 94  ppMainAlignControls;
 95end;
 96
 97procedure TfrAcctAnalyticsGroup.LoadFromStream(Stream: TStream);
 98begin
 99  inherited;
100end;
101
102procedure TfrAcctAnalyticsGroup.SaveToStream(Stream: TStream);
103begin
104  inherited;
105end;
106
107function TfrAcctAnalyticsGroup.ListBoxAvail: TListBox;
108begin
109  Result := lbAvail;
110end;
111
112function TfrAcctAnalyticsGroup.ListBoxSelected: TCheckListBox;
113begin
114  Result := lbSelected;
115end;
116
117
118procedure TfrAcctAnalyticsGroup.lbSelectedClickCheck(Sender: TObject);
119begin
120  SelectedFieldListClear
121end;
122
123end.