예제 #1
0
//---------------------------------------------------------------------------
void __fastcall TAddressBook::AssignTo(TPersistent* Dest)
{
	TStrings *DestStrings = dynamic_cast<TStrings *>(Dest);

	if (DestStrings) {
		DestStrings->BeginUpdate();
		try {
			DestStrings->Clear();
			DestStrings->AddStrings(FNames);
		}
		__finally {
			DestStrings->EndUpdate();
		}
	}
}
예제 #2
0
//---------------------------------------------------------------------------
void __fastcall TPropertiesDialog::LoadRemoteTokens(TComboBox * ComboBox,
  const TRemoteTokenList * List)
{
  TStrings * Items = ComboBox->Items;
  Items->BeginUpdate();
  try
  {
    Items->Clear();
    if (List != NULL)
    {
      int Count = List->Count();
      for (int Index = 0; Index < Count; Index++)
      {
        Items->Add(LoadRemoteToken(*List->Token(Index)));
      }
    }
  }
  __finally
  {
    Items->EndUpdate();
  }
}