home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 March
/
Chip_2002-03_cd1.bin
/
zkuste
/
delphi
/
kompon
/
d56
/
MSYSINFO.ZIP
/
Demos
/
GUI
/
UserProps.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
2002-01-04
|
2KB
|
90 lines
unit UserProps;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ComCtrls, StdCtrls, ExtCtrls, ImgList;
type
TpropUser = class(TFrame)
pc: TPageControl;
tsGeneral: TTabSheet;
tsGroups: TTabSheet;
Image1: TImage;
Bevel2: TBevel;
Bevel3: TBevel;
lFullName: TLabel;
lLastLogoff: TLabel;
lLastLogon: TLabel;
lCount: TLabel;
lComment: TLabel;
stLastLogoff: TStaticText;
stName: TEdit;
stFullName: TStaticText;
stLastLogon: TStaticText;
stCount: TStaticText;
Panel4: TPanel;
imgList: TImageList;
lv: TListView;
Bevel1: TBevel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
stNSA: TStaticText;
stSidType: TStaticText;
Label4: TLabel;
Label5: TLabel;
stDomain: TStaticText;
stLen: TStaticText;
eSID: TEdit;
eComment: TEdit;
private
FIndex: DWORD;
FAccounts: TObject;
public
property Accounts: TObject read FAccounts write FAccounts;
property UserIndex: DWORD read FIndex write FIndex;
procedure Refresh;
end;
implementation
uses MiTeC_AccountsNT;
{$R *.DFM}
{ TpropUser }
procedure TpropUser.Refresh;
var
i: integer;
sl: TStringList;
begin
pc.ActivePage:=tsGeneral;
sl:=TStringList.Create;
with TAccounts(Accounts),Users[UserIndex]^ do begin
eSID.Text:=SID;
stNSA.Caption:=IntToStr(NumberOfSubAuths);
stSidType.Caption:=GetNameUseStr(SidType);
stLen.Caption:=IntToStr(SidLength);
stDomain.Caption:=Domain;
stName.Text:=Name;
stFullName.Caption:=Fullname;
eComment.Text:=Comment;
stLastLogon.Caption:=DateTimeToStr(LastLogon);
stLastLogoff.Caption:=DateTimeToStr(LastLogoff);
stCount.Caption:=Format('%d',[LogonCount]);
sl:=TStringList.Create;
GetUserLocalGroups('',Name,sl);
for i:=0 to sl.Count-1 do
with lv.Items.Add do begin
Caption:=sl[i];
ImageIndex:=1;
end;
sl.Free;
end;
end;
end.