private void OnNodeClicked(object sender, NodeClickedEventArgs e)
 {
     if (NodeClicked != null)
     {
         NodeClicked(sender, e);
     }
 }
Esempio n. 2
0
        private void NodeClicked(object sender, NodeClickedEventArgs e)
        {
            var nodeControl = sender as NodeControl;

            if (_superGraphController != null && nodeControl != null)
            {
                var node = nodeControl.DataContext as Node;
                if (node != null)
                {
                    if (node.MapObjectType == _mapManager.NodeTypes["CompendiumMapNode"].Id)
                    {
                        var facadeNode = node.Proxy as FacadeNode;
                        if (facadeNode != null)
                        {
                            if (!facadeNode.IsConcrete)
                            {
                                return; //if the node isn't concrete we won't be able to navigate down into the submap (ie it was just added and the transactions are outstanding)
                            }
                        }
                        IoC.GetInstance<ISuperGraphRelationshipFactory>().IsSameDomain = true;
                        SuperGraph.ClearMapObjects();
                        ShowLoading();

                        var breadcrumb = new BreadcrumbItem(node);
                        Breadcrumbs.BreadcrumbTrail.Add(breadcrumb);

                        _superGraphController.ChangeContextAsync(node);

                        //The line below forces the related content panels to reset and hide with each map navigation
                        //it's commented out to experiment what it's like to leave the content in place
                        //RelatedContentPanelUtil.Instance.ResetAndHidePanels();
                    }
                }
            }
        }