home *** CD-ROM | disk | FTP | other *** search
- unit GroupProps;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- ComCtrls, StdCtrls, ExtCtrls, ImgList;
-
- type
- TpropGroup = class(TFrame)
- pc: TPageControl;
- tsMembers: TTabSheet;
- Panel4: TPanel;
- lv: TListView;
- imgList: TImageList;
- tsGeneral: TTabSheet;
- Image1: TImage;
- Bevel3: TBevel;
- lComment: TLabel;
- stName: TEdit;
- Bevel1: TBevel;
- Label1: TLabel;
- Label2: TLabel;
- Label3: TLabel;
- stNSA: TStaticText;
- stSidType: TStaticText;
- Label4: TLabel;
- Label5: TLabel;
- stDomain: TStaticText;
- stLen: TStaticText;
- eSID: TEdit;
- eComment: TEdit;
- Image: TImage;
- private
- FIndex: DWORD;
- FAccounts: TObject;
- FGlobalLevel: Boolean;
- public
- property Accounts: TObject read FAccounts write FAccounts;
- property GroupIndex: DWORD read FIndex write FIndex;
- property GlobalLevel: Boolean read FGlobalLevel write FGlobalLevel;
- procedure Refresh;
- end;
-
- implementation
-
- uses MiTeC_AccountsNT;
-
- {$R *.DFM}
-
- { TpropGroup }
-
- procedure TpropGroup.Refresh;
- var
- i: integer;
- sl: TStringList;
- gr: TGroupInfo;
- begin
- sl:=TStringList.Create;
- pc.ActivePage:=tsGeneral;
- sl:=TStringList.Create;
- Image.Visible:=GlobalLevel;
- if GlobalLevel then begin
- gr:=TAccounts(Accounts).GlobalGroups[GroupIndex]^;
- TAccounts(Accounts).GetGlobalGroupUsers('',gr.Name,sl);
- end else begin
- gr:=TAccounts(Accounts).LocalGroups[GroupIndex]^;
- TAccounts(Accounts).GetLocalGroupUsers('',gr.Name,sl);
- end;
- with TAccounts(Accounts),gr do begin
- eSID.Text:=SID;
- stNSA.Caption:=IntToStr(NumberOfSubAuths);
- stSidType.Caption:=GetNameUseStr(SidType);
- stLen.Caption:=IntToStr(SidLength);
- stDomain.Caption:=Domain;
- stName.Text:=Name;
- eComment.Text:=Comment;
- for i:=0 to sl.Count-1 do
- with lv.Items.Add do begin
- Caption:=sl[i];
- ImageIndex:=0;
- end;
- end;
- sl.Free;
- end;
-
- end.
-