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 |
|
|
#ifndef ExCollUH
|
27 |
|
|
#define ExCollUH
|
28 |
|
|
//---------------------------------------------------------------------------
|
29 |
|
|
#include <vcl\Classes.hpp>
|
30 |
|
|
#include <vcl\Controls.hpp>
|
31 |
|
|
#include <vcl\StdCtrls.hpp>
|
32 |
|
|
#include <vcl\Forms.hpp>
|
33 |
|
|
#include <vcl\Dialogs.hpp>
|
34 |
|
|
|
35 |
|
|
#include "STColl.hpp"
|
36 |
|
|
//---------------------------------------------------------------------------
|
37 |
|
|
#define MaxElem 20000
|
38 |
|
|
|
39 |
|
|
#pragma pack(push, 1)
|
40 |
|
|
struct ARecord
|
41 |
|
|
{
|
42 |
|
|
String First;
|
43 |
|
|
String Last;
|
44 |
|
|
int Age;
|
45 |
|
|
} ;
|
46 |
|
|
#pragma pack(pop)
|
47 |
|
|
|
48 |
|
|
class PACKAGE TForm1 : public TForm
|
49 |
|
|
{
|
50 |
|
|
__published: // IDE-managed Components
|
51 |
|
|
TLabel *Label8;
|
52 |
|
|
TLabel *Label1;
|
53 |
|
|
TLabel *Label2;
|
54 |
|
|
TLabel *Label3;
|
55 |
|
|
TButton *CreateBtn;
|
56 |
|
|
TListBox *LB1;
|
57 |
|
|
TButton *ClearBtn;
|
58 |
|
|
TButton *PackBtn;
|
59 |
|
|
TButton *EffBtn;
|
60 |
|
|
TEdit *Edit1;
|
61 |
|
|
TEdit *Edit3;
|
62 |
|
|
TEdit *Edit2;
|
63 |
|
|
TButton *AtBtn;
|
64 |
|
|
TButton *AtInsBtn;
|
65 |
|
|
TButton *AtPutBtn;
|
66 |
|
|
TButton *DelBtn;
|
67 |
|
|
TButton *AtDelBtn;
|
68 |
|
|
TButton *InsBtn;
|
69 |
|
|
TEdit *Edit4;
|
70 |
|
|
TEdit *Edit5;
|
71 |
|
|
TButton *LoadBtn;
|
72 |
|
|
TButton *SaveBtn;
|
73 |
|
|
TOpenDialog *OD1;
|
74 |
|
|
TSaveDialog *SD1;
|
75 |
|
|
void __fastcall FormCreate(TObject *Sender);
|
76 |
|
|
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
|
77 |
|
|
void __fastcall CreateBtnClick(TObject *Sender);
|
78 |
|
|
void __fastcall ClearBtnClick(TObject *Sender);
|
79 |
|
|
void __fastcall PackBtnClick(TObject *Sender);
|
80 |
|
|
void __fastcall AtBtnClick(TObject *Sender);
|
81 |
|
|
void __fastcall AtInsBtnClick(TObject *Sender);
|
82 |
|
|
void __fastcall AtPutBtnClick(TObject *Sender);
|
83 |
|
|
void __fastcall DelBtnClick(TObject *Sender);
|
84 |
|
|
void __fastcall AtDelBtnClick(TObject *Sender);
|
85 |
|
|
void __fastcall InsBtnClick(TObject *Sender);
|
86 |
|
|
void __fastcall EffBtnClick(TObject *Sender);
|
87 |
|
|
void __fastcall LoadBtnClick(TObject *Sender);
|
88 |
|
|
void __fastcall SaveBtnClick(TObject *Sender);
|
89 |
|
|
void __fastcall LB1Click(TObject *Sender);
|
90 |
|
|
void __fastcall LB1DblClick(TObject *Sender);
|
91 |
|
|
private: // User declarations
|
92 |
|
|
public: // User declarations
|
93 |
|
|
String FirstA[8];
|
94 |
|
|
String LastA[8];
|
95 |
|
|
TStCollection* MyCollection;
|
96 |
|
|
|
97 |
|
|
__fastcall TForm1(TComponent* Owner);
|
98 |
|
|
void SetBusy(bool B);
|
99 |
|
|
void FillControls(ARecord AR);
|
100 |
|
|
Boolean CheckControls(ARecord &AR);
|
101 |
|
|
void FillListBox(void);
|
102 |
|
|
void UpdateButtons(bool COK);
|
103 |
|
|
};
|
104 |
|
|
//---------------------------------------------------------------------------
|
105 |
|
|
extern PACKAGE TForm1 *Form1;
|
106 |
|
|
//---------------------------------------------------------------------------
|
107 |
|
|
#endif
|