Esempio n. 1
0
        private void AddBox_Click(object sender, EventArgs e)
        {
            var mi = new MapBox( )
            {
                Name     = $"box{MapRoot.Nodes.Count + 1}",
                Size     = new Size(30, 30),
                Location = new Point((this.designer.Width / 2) - 30, (this.designer.Height / 2) - 30)
            };

            mi.OnSelect += delegate(object s, EventArgs ea) {
                this.mapBoxProperties.SelectedObject = mi.MapItem;
            };
            MapRoot.Nodes.Add(new MapItemTreeItem(mi));
            MapRoot.Expand( );
            this.designer.Controls.Add(mi);
        }
Esempio n. 2
0
 public MapItemTreeItem(MapBox mapItem) : base(mapItem.Name)
 {
     MapItem = mapItem;
 }