/[projects]/dao/DelphiScanner/Components/tpsystools_4.04/examples/Delphi/EXUSRMG1.pas
ViewVC logotype

Annotation of /dao/DelphiScanner/Components/tpsystools_4.04/examples/Delphi/EXUSRMG1.pas

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2671 - (hide annotations) (download)
Tue Aug 25 18:15:15 2015 UTC (8 years, 10 months ago) by torben
File size: 2462 byte(s)
Added tpsystools component
1 torben 2671 (* ***** BEGIN LICENSE BLOCK *****
2     * Version: MPL 1.1
3     *
4     * The contents of this file are subject to the Mozilla Public License Version
5     * 1.1 (the "License"); you may not use this file except in compliance with
6     * the License. You may obtain a copy of the License at
7     * http://www.mozilla.org/MPL/
8     *
9     * Software distributed under the License is distributed on an "AS IS" basis,
10     * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11     * for the specific language governing rights and limitations under the
12     * License.
13     *
14     * The Original Code is TurboPower SysTools
15     *
16     * The Initial Developer of the Original Code is
17     * TurboPower Software
18     *
19     * Portions created by the Initial Developer are Copyright (C) 1996-2002
20     * the Initial Developer. All Rights Reserved.
21     *
22     * Contributor(s):
23     *
24     * ***** END LICENSE BLOCK ***** *)
25    
26     unit EXUSRMG1;
27    
28     interface
29    
30     uses
31     Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
32     ExtCtrls, StdCtrls, ComCtrls,
33    
34     StNet;
35    
36     type
37     TUserPropertiesForm = class(TForm)
38     Label1: TLabel;
39     Label2: TLabel;
40     Label3: TLabel;
41     UserNameEdit: TEdit;
42     FullNameEdit: TEdit;
43     CommentEdit: TEdit;
44     OKBtn: TButton;
45     CancelBtn: TButton;
46     Label4: TLabel;
47     Password1Edit: TEdit;
48     Password2Edit: TEdit;
49     Label5: TLabel;
50     Panel1: TPanel;
51     GroupBox1: TGroupBox;
52     ListView1: TListView;
53     procedure FormShow(Sender: TObject);
54     procedure OKBtnClick(Sender: TObject);
55     private
56     { Private declarations }
57     public
58     { Public declarations }
59     U : TStNetUserItem;
60     GL : TStringList;
61     end;
62    
63     var
64     UserPropertiesForm: TUserPropertiesForm;
65    
66     implementation
67    
68     {$R *.DFM}
69    
70     procedure TUserPropertiesForm.FormShow(Sender: TObject);
71     var
72     I : Integer;
73     G : TStNetGroupItem;
74     LI : TListItem;
75     begin
76     Caption := Format(Caption, [U.Name]);
77     UserNameEdit.Text := U.Name;
78     FullNameEdit.Text := U.FullName;
79     CommentEdit.Text := U.Comment;
80    
81     GL := U.Groups;
82     for I := 0 to GL.Count-1 do begin
83     G := TStNetGroupItem(GL.Objects[I]);
84     LI := ListView1.Items.Add;
85     LI.Caption := G.Name;
86     LI.SubItems.Add(G.Comment);
87     end;
88     end;
89    
90     procedure TUserPropertiesForm.OKBtnClick(Sender: TObject);
91     begin
92     if Password1Edit.Text <> Password2Edit.Text then begin
93     ShowMessage('Password and Confirm Password do not match!');
94     ModalResult := mrNone;
95     end;
96     end;
97    
98     end.

  ViewVC Help
Powered by ViewVC 1.1.20