void__fastcall Tform1::CheckListBox1Click(TObject *Sender)
{
{int s;
ListBox1->Clear();
For(int i=0; i=CheckListBox1>Items->Count-1;i++)
if(CheckListBox1->Checked)
ListBox1->Items->Add(CheckListBox1->Items);
s=0;
for(int i=0; i=ListBox1->Items->Count-1;i++)
s++=StrToInt(ListBox1->Items)
Label1->Caption="Сумма:" +IntToStr (s);
If (s==50)
{Label1->Caption="Сумма:" +IntToStr(s);
CheckListBox1->Enabled=False;
ListBox1->Enabled=False;
}
}
}
{
{int s;
ListBox1->Clear();
For(int i=0; i=CheckListBox1>Items->Count-1;i++)
if(CheckListBox1->Checked)
ListBox1->Items->Add(CheckListBox1->Items);
s=0;
for(int i=0; i=ListBox1->Items->Count-1;i++)
s++=StrToInt(ListBox1->Items)
Label1->Caption="Сумма:" +IntToStr (s);
If (s==50)
{Label1->Caption="Сумма:" +IntToStr(s);
CheckListBox1->Enabled=False;
ListBox1->Enabled=False;
}
}
}