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

Annotation of /dao/DelphiScanner/Components/tpsystools_4.04/examples/Delphi/ExNVU.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: 2690 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 ExNVU;
27    
28     interface
29    
30     uses
31     Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
32     StdCtrls,
33    
34     StBase, StNVCont, StNVBits, StNVDict, StNVList, StNVDQ, StNVLAry,
35     StNVLMat, StNVColl, StNVSCol, StNVTree;
36    
37     type
38     TNVForm = class(TForm)
39     StNVBits1: TStNVBits;
40     StNVDictionary1: TStNVDictionary;
41     Button1: TButton;
42     Button2: TButton;
43     Memo1: TMemo;
44     Button3: TButton;
45     procedure Button1Click(Sender: TObject);
46     procedure Button2Click(Sender: TObject);
47     procedure Button3Click(Sender: TObject);
48     private
49     { Private declarations }
50     public
51     { Public declarations }
52     end;
53    
54     var
55     NVForm: TNVForm;
56    
57     implementation
58    
59     {$R *.DFM}
60    
61     procedure TNVForm.Button1Click(Sender: TObject);
62     begin
63     Memo1.Clear;
64     Memo1.Lines.Add('Initializing bit set to hold 500 bits');
65     StNVBits1.MaxBits := 500;
66     Memo1.Lines.Add('Set bit 5');
67     StNVBits1.Container.SetBit(5);
68     if StNVBits1.Container.BitIsSet(5) then
69     Memo1.Lines.Add('bit 5 is set')
70     else
71     Memo1.Lines.Add('bit 5 is not set');
72     Memo1.Lines.Add('Toggle bit 5');
73     StNVBits1.Container.ToggleBit(5);
74     if StNVBits1.Container.BitIsSet(5) then
75     Memo1.Lines.Add('bit 5 is set')
76     else
77     Memo1.Lines.Add('bit 5 is not set');
78     end;
79    
80     procedure TNVForm.Button3Click(Sender: TObject);
81     begin
82     Close;
83     end;
84    
85     procedure TNVForm.Button2Click(Sender: TObject);
86     begin
87     Memo1.Clear;
88     Memo1.Lines.Add('Clearing dictionary');
89     StNVDictionary1.Container.Clear;
90     Memo1.Lines.Add('Adding items to dictionary');
91     StNVDictionary1.Container.Add('First', nil);
92     StNVDictionary1.Container.Add('Second', nil);
93     StNVDictionary1.Container.Add('Third', nil);
94     StNVDictionary1.Container.Add('Fourth', nil);
95     StNVDictionary1.Container.Add('Fifth', nil);
96     end;
97    
98     end.

  ViewVC Help
Powered by ViewVC 1.1.20