private void combineToolStripMenuItem_Click(object sender, EventArgs e) { PrototypeCreator Cr = new PrototypeCreator(); Cr.Prototype = picture.manipulator.selected.Clone(); picture.Add(Cr.Prototype); (picture.manipulator.selected as Group).RemoveFromPicture(picture); picture.TmpGr.Clear(); //picture.Remove(picture.manipulator.selected); //picture.TmpGr.Clear(); }
private void addToBarToolStripMenuItem_Click(object sender, EventArgs e) { ToolStripButton Btn = new ToolStripButton(); Btn.Text = "New " + Nm.ToString(); Btn.DisplayStyle = ToolStripItemDisplayStyle.Text; toolStrip1.Items.Add(Btn); Btn.Click += button_click; PrototypeCreator Cr = new PrototypeCreator(); Cr.Prototype = picture.manipulator.selected.Clone(); dict[Btn.Text] = Cr; Nm++; }