Курсовая работа: Работа со списками
}//end if
frmMain->ListBox1->Items->Add(IntToStr(l1.p1.x)+";"+IntToStr(l1.p1.y)+" - "+IntToStr(l1.p2.x)+";"+IntToStr(l1.p2.y));
}//next i
frmMain->ListBox1->ItemIndex=checkedItem;
for (int i=1;i<=Objects.count();i++){
if (Objects.getvalue(i)==1)frmMain->lstObjects->Items->Add("Line (1 lines)"); else
if (Objects.getvalue(i)==4)frmMain->lstObjects->Items->Add("Rectangle (4 lines)"); else
frmMain->lstObjects->Items->Add("Bezie Curve ("+IntToStr(Objects.getvalue(i))+" lines)");
}//next i
}//end function
//---------------------------------------------------------------------------
void __fastcall TfrmMain::lblPictureMouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
if (cboObject->Text=="Кривая Безье"){
n++;
if (n==1) {l1.p1.x=X;l1.p1.y=Y;}
if (n==2) {l1.p2.x=X;l1.p2.y=Y;l2.p1.x=X;l2.p1.y=Y;}
if (n==3) {
BCurve CurveBufer;
queue <Tline> Lines;
int firstNumber=0;
l2.p2.x=X;l2.p2.y=Y;
Lines=CurveBufer.Create(0.25,l1,l2,clbColor->Selected,clbSecond->Selected,1,"Bezie");
n=0;
firstNumber=LineBufer.count();
for (int i=0;i<=Lines.count();i++) LineBufer.add(Lines.getvalue(i),"Bezie");
LoadLines(chkSecondary->Checked);
firstNumber=LineBufer.count()-firstNumber;