private void list(int num, Delaunay de0) { Node <PO> pnt = de0.work_pl.Head; for (int i = 0; i < num; i++) { if (pnt != null) { pnt = pnt.Next; } else { MessageBox.Show("null is appearing!!"); return; } } if (listBox2.Items.Count > 0) { listBox2.Items.Clear(); } Node <LINE> lnt = pnt.Data.ll.Head; int j = 0; while (lnt != null) { listBox2.Items.Add(j + lnt.Data.ToString()); j++; lnt = lnt.Next; } }
private void list2(int num1, int num2, Delaunay de0) { Node <PO> pnt = de0.work_pl.Head; for (int i = 0; i < num1; i++) { if (pnt != null) { pnt = pnt.Next; } else { MessageBox.Show("null is appearing!!"); return; } } Node <LINE> lnt = pnt.Data.ll.Head; for (int j = 0; j < num2; j++) { if (lnt != null) { lnt = lnt.Next; } else { MessageBox.Show("null is appearing!!"); return; } } Node <SURFACE> snt = lnt.Data.sl.Head; listBox3.Items.Clear(); int k = 0; while (snt != null) { listBox3.Items.Add(":" + k + '(' + snt.Data.p1.x + ',' + snt.Data.p1.y + ',' + snt.Data.p1.z + ')' + '(' + snt.Data.p2.x + ',' + snt.Data.p2.y + ',' + snt.Data.p2.z + ')' + '(' + snt.Data.p3.x + ',' + snt.Data.p3.y + ',' + snt.Data.p3.z + ')'); k++; snt = snt.Next; } }