public CGroup(CGroup gr) { shapes = new DoublyLinkedList(); gr.shapes.Set_current_first(); for (bool cond = !gr.shapes.Is_empty(); cond; cond = gr.shapes.Step_forward()) { shapes.Push_back(gr.shapes.CurShape.Clone()); } UpdateMinMax(); }
private void makeGroupToolStripMenuItem_Click(object sender, EventArgs e) { if (shapeIndex == 4) { shapeIndex = 0; shapes.Push_back(gr); s = gr; Draw_all_shapes(); gr = new CGroup(); } else { shapeIndex = 4; } }
protected void ProcessNode(TreeNode tn, AShape a) { if (a != null) { tn.Text = a.ToString().Substring(8); } CGroup gr = a as CGroup; if (gr != null) { DoublyLinkedList L = gr.Shapes; int i = 0; L.Set_current_first(); for (bool cond = !L.Is_empty(); cond; cond = L.Step_forward()) { tn.Nodes.Add(new TreeNode()); ProcessNode(tn.Nodes[i++], L.Current.Shape); } } }