Exemple #1
0
 public NodeResource(NodeResource r)
 {
     InitializeComponent();
     Type  = r.Type;
     Title = r.Title;
     Path  = r.Path;
 }
Exemple #2
0
        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);
                }
            }
        }