home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 May
/
Chip_2002-05_cd1.bin
/
chplus
/
cpp
/
5
/
Komponety.exe
/
ibevnts.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1998-02-09
|
2KB
|
46 lines
//---------------------------------------------------------------------------
// Borland C++Builder
// Copyright (c) 1987, 1998 Borland International Inc. All Rights Reserved.
//---------------------------------------------------------------------------
// ibevnts.cpp
// This file is #included in IBREG.CPP which #includes IBREG.H which
// in turn #includes INEVNTS.H. Hence #including IBEVNTS.H here is redundant with
// no ramifications (there are sentries in the header file) but has been done
// just to clarify that the function and class implementations in this file are
// prototyped in INEVNTS.H
#include <memory> //for STL auto_ptr
#include "ibevnts.h"
#pragma resource "*.dfm"
#pragma package(smart_init)
bool __fastcall Ibevnts::EditAlerterEvents(Classes::TStrings *Events)
{
bool result = false;
std::auto_ptr<TIBEAEventsEditor> EEditor(new TIBEAEventsEditor(Application));
for(int i=0; i < Events->Count ;i++) //
{
EEditor->cEvents->Cells[1][i] = Events->Strings[i];
}
if( EEditor->ShowModal() == IDOK )
{
result = true;
Events->Clear();
for(int i=0; i < MaxEvents ;i++)
{
if ((EEditor->cEvents->Cells[1][i].Length()) != 0)
Events->Add( EEditor->cEvents->Cells[1][i]);
}
}
return result;
}
void __fastcall TIBEAEventsEditor::FormCreate(TObject *Sender)
{
for(int i=1; i < MaxEvents; i++ )
cEvents->Cells[0][i-1] = AnsiString(i);
RequestedEvents->Caption = LoadStr(57810);
bOK->Caption = LoadStr(57811);
bCancel->Caption = LoadStr(57812);
}