public NodeResource(NodeResource r) { InitializeComponent(); Type = r.Type; Title = r.Title; Path = r.Path; }
protected override void OnDrop(DragEventArgs e) { base.OnDrop(e); if (e.Data.GetDataPresent(typeof(NodeResource))) { NodeResource res = (NodeResource)e.Data.GetData(typeof(NodeResource)); if (res != null) { Point p = e.GetPosition(ViewPort); ToWorld(ref p); AddNode(res.Type, p); } } }