- Fixed string type in TfrmAccountControl

This commit is contained in:
Andreas Schneider 2009-12-20 15:49:19 +01:00
parent 158403e41a
commit ee9a44219f
2 changed files with 414 additions and 415 deletions

View File

@ -15,7 +15,7 @@ object frmAccountControl: TfrmAccountControl
OnDestroy = FormDestroy OnDestroy = FormDestroy
OnShow = FormShow OnShow = FormShow
Position = poOwnerFormCenter Position = poOwnerFormCenter
LCLVersion = '0.9.27' LCLVersion = '0.9.29'
object tbMain: TToolBar object tbMain: TToolBar
Left = 0 Left = 0
Height = 26 Height = 26
@ -95,9 +95,10 @@ object frmAccountControl: TfrmAccountControl
Text = 'Accesslevel' Text = 'Accesslevel'
Width = 100 Width = 100
end> end>
Header.DefaultHeight = 17
Header.Options = [hoColumnResize, hoDrag, hoVisible] Header.Options = [hoColumnResize, hoDrag, hoVisible]
Header.ParentFont = True Header.ParentFont = True
Header.Style = hsPlates Header.Style = hsFlatButtons
Images = ilAccesslevel Images = ilAccesslevel
TabOrder = 1 TabOrder = 1
TreeOptions.AutoOptions = [toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes] TreeOptions.AutoOptions = [toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes]
@ -110,7 +111,6 @@ object frmAccountControl: TfrmAccountControl
OnGetImageIndex = vstAccountsGetImageIndex OnGetImageIndex = vstAccountsGetImageIndex
end end
object ilToolbar: TImageList object ilToolbar: TImageList
Masked = False
left = 144 left = 144
Bitmap = { Bitmap = {
4C69040000001000000010000000000000000000000000000000000000000000 4C69040000001000000010000000000000000000000000000000000000000000
@ -245,7 +245,6 @@ object frmAccountControl: TfrmAccountControl
} }
end end
object ilAccesslevel: TImageList object ilAccesslevel: TImageList
Masked = False
left = 176 left = 176
Bitmap = { Bitmap = {
4C69040000001000000010000000000000000000000000000000000000000000 4C69040000001000000010000000000000000000000000000000000000000000

View File

@ -61,7 +61,7 @@ type
Node: PVirtualNode; Kind: TVTImageKind; Column: TColumnIndex; Node: PVirtualNode; Kind: TVTImageKind; Column: TColumnIndex;
var Ghosted: Boolean; var ImageIndex: Integer); var Ghosted: Boolean; var ImageIndex: Integer);
procedure vstAccountsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; procedure vstAccountsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
Column: TColumnIndex; TextType: TVSTTextType; var CellText: UTF8String); Column: TColumnIndex; TextType: TVSTTextType; var CellText: String);
protected protected
procedure OnModifyUserResponse(ABuffer: TEnhancedMemoryStream); procedure OnModifyUserResponse(ABuffer: TEnhancedMemoryStream);
procedure OnDeleteUserResponse(ABuffer: TEnhancedMemoryStream); procedure OnDeleteUserResponse(ABuffer: TEnhancedMemoryStream);
@ -279,14 +279,14 @@ end;
procedure TfrmAccountControl.vstAccountsGetText(Sender: TBaseVirtualTree; procedure TfrmAccountControl.vstAccountsGetText(Sender: TBaseVirtualTree;
Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
var CellText: UTF8String); var CellText: String);
var var
accountInfo: PAccountInfo; accountInfo: PAccountInfo;
begin begin
accountInfo := Sender.GetNodeData(Node); accountInfo := Sender.GetNodeData(Node);
case Column of case Column of
1: CellText := UTF8Encode(accountInfo^.Username); 1: CellText := accountInfo^.Username;
2: CellText := UTF8Encode(GetAccessLevelString(accountInfo^.AccessLevel)); 2: CellText := GetAccessLevelString(accountInfo^.AccessLevel);
else else
CellText := ''; CellText := '';
end; end;