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(); } } } }
private void OnBreadcrumbChanged(object sender, BreadcrumbChangedEventArgs e) { var breadcrumb = sender as BreadcrumbControl; if (breadcrumb != null) { SuperGraph.ClearMapObjects(); ShowLoading(); _superGraphController.ChangeContextAsync(e.NewItem.Node); PreLoader.LoadParentBreadcrumb(e.NewItem.Node.Proxy, e.ParentIndex); } }
public void Refresh(BreadcrumbControl control = null) { if (control == null) { control = Breadcrumbs.CurrentBreadcrumbControl; } if (control != null) { SuperGraph.ClearMapObjects(false); ShowLoading(); _superGraphController.ChangeContextAsync(control.BreadcrumbData.Node); } }
private void OnBreadcrumbClicked(object sender, BreadcrumbClickedEventArgs e) { var breadcrumbControl = sender as BreadcrumbControl; if (breadcrumbControl != null) { SuperGraph.ClearMapObjects(); ShowLoading(); _superGraphController.ChangeContextAsync(breadcrumbControl.BreadcrumbData.Node); IsLoadMapByGuid = false; if (e.IsParentRemoved) { PreLoader.LoadParentBreadcrumb(breadcrumbControl.BreadcrumbData.Node.Proxy, e.ParentIndex); } } }
private void LoadMap(Proxy.INode node, bool dialoagResult, bool isAuthorMode) { if (dialoagResult) { DebugLogger.Instance.LogMsg(string.Format("Loading Map[{0}] of Domain[{1}]", node.Id, node.DomainId)); IsLoadMapByGuid = false; SuperGraph.ClearMapObjects(); Breadcrumbs.BreadcrumbTrail.Clear(); ShowLoading(); _mapManager.QueryMapByIdCompleted.RegisterEvent(node.Id, QueryMapByDomain); _mapManager.QueryMapByIdAsync(node.DomainId, node.Id, 1); IoC.GetInstance <ISuperGraphRelationshipFactory>().IsSameDomain = false; if (isAuthorMode) { SuperGraph.AuthorMode(); } } }