Ejemplo n.º 1
0
        private void OnPasteNodeCloneCompletedNodeArgs(object sender, AddedNodeEventArgs e)
        {
            NodesEventArgs nodesEventArgs = new NodesEventArgs(null, e.Node, (INodeProxy[])null);

            ConnectNodeToMap(e.Node.Id, e.Location);

            if (PasteNodeCloneCompleted != null)
            {
                PasteNodeCloneCompleted.Invoke(this, nodesEventArgs);
            }
        }
Ejemplo n.º 2
0
        private void OnAddNodeCompletedNodeArgs(object sender, AddedNodeEventArgs e)
        {
            NodesEventArgs nodesEventArgs = new NodesEventArgs(null, e.Node, (INodeProxy[])null);

            ConnectNodeToMap(e.Node.Id, e.Location); //the event of the connect will add it to the map

            if (AddNodeCompleted != null)
            {
                AddNodeCompleted.Invoke(this, e);
            }
        }
Ejemplo n.º 3
0
        private void OnPasteNodeCloneCompletedNodeArgs(object sender, AddedNodeEventArgs e)
        {
            NodesEventArgs nodesEventArgs = new NodesEventArgs(null, e.Node, (INodeProxy[])null);

            ConnectNodeToMap(e.Node.Id, e.Location);

            if (PasteNodeCloneCompleted != null)
            {
                PasteNodeCloneCompleted.Invoke(this, nodesEventArgs);
            }
        }
Ejemplo n.º 4
0
        private void OnAddNodeCompletedNodeArgs(object sender, AddedNodeEventArgs e)
        {
            NodesEventArgs nodesEventArgs = new NodesEventArgs(null, e.Node, (INodeProxy[])null);

            ConnectNodeToMap(e.Node.Id, e.Location); //the event of the connect will add it to the map

            if (AddNodeCompleted != null)
            {
                AddNodeCompleted.Invoke(this, e);
            }
        }
Ejemplo n.º 5
0
        private void OnAddNodeAsyncCompleted(object sender, AddNodeCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                SoapNode   soapNode  = e.Result;
                INodeProxy nodeProxy = new NodeProxy(soapNode);

                if (AddNodeCompleted != null)
                {
                    Point location = new Point(0, 0);
                    if (e.UserState != null)
                    {
                        location = ((MapLocationState)e.UserState).Location;
                    }
                    AddedNodeEventArgs anea = new AddedNodeEventArgs(nodeProxy, location);
                    AddNodeCompleted.Invoke(sender, anea);
                }
            }
        }
Ejemplo n.º 6
0
 private void OnAddNodeAsyncCompleted(object sender, AddNodeCompletedEventArgs e)
 {
     if (e.Error == null)
     {
         SoapNode soapNode = e.Result;
         INodeProxy nodeProxy = new NodeProxy(soapNode);
         
         if (AddNodeCompleted != null)
         {
             Point location = new Point(0, 0);
             if (e.UserState != null)
             {
                 location = ((MapLocationState)e.UserState).Location;
             }
             AddedNodeEventArgs anea = new AddedNodeEventArgs(nodeProxy, location);
             AddNodeCompleted.Invoke(sender, anea);
         }
     }
 }