Курсовая работа: Работа со списками
//---------------------------------------------------------------------------
void __fastcall TfrmMain::chkSecondaryClick(TObject *Sender)
{
frmMain->lblPicture->Refresh();
LoadLines(chkSecondary->Checked);
}
//---------------------------------------------------------------------------
void __fastcall TfrmMain::clbColorChange(TObject *Sender)
{
Tline l1;
int begin=0;
for (int i=0;i<lstObjects->ItemIndex;i++)begin+=Objects.getvalue(i);
for (int i=begin;i<=begin+Objects.getvalue(lstObjects->ItemIndex+1);i++){
l1=LineBufer.getvalue(i);
if (!l1.secondary){
l1.color=clbColor->Selected;
LineBufer.change(i,l1);
}//end if
}//next i
LoadLines(chkSecondary->Checked);
}
//---------------------------------------------------------------------------
void __fastcall TfrmMain::clbSecondChange(TObject *Sender)
{
Tline l1;
int begin=0;
for (int i=0;i<lstObjects->ItemIndex;i++)begin+=Objects.getvalue(i);
for (int i=begin;i<=begin+Objects.getvalue(lstObjects->ItemIndex+1);i++){
l1=LineBufer.getvalue(i);