Beispiel #1
0
        private void toolStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            if (e.ClickedItem.Name == toolStrip1.Items[0].Name)
            {
                MySymbol symb = new MySymbol();
                this.diagram1.Model.AppendChild(symb);
            }
            else if ((e.ClickedItem.Name == toolStrip1.Items[1].Name) && (this.diagram1.View.SelectionList.Count > 0))
            {
                Group selectedSymbol = this.diagram1.View.SelectionList[0] as Group;

                if (selectedSymbol != null)
                {
                    Group symbolClone = (Group)selectedSymbol.Clone();
                    symbolClone.Translate(5, 5);
                    this.diagram1.Model.AppendChild(symbolClone);
                }
            }
            diagram1.Focus();
        }
Beispiel #2
0
 /// <summary>
 /// Copy constructor.
 /// </summary>
 /// <param name="src"></param>
 public MySymbol(MySymbol src)
     : base(src)
 {
 }