Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void NavigateToNode(UITabBarController tabBar, Node node)
- {
- if (node.TumorId != AppDelegate.PickedTumor.Id)
- {
- FillNode(node);
- PickedTumor = node.Tumor;
- }
- ScrollingFlowchartViewController backup;
- int tabId;
- switch (node.NodeType)
- {
- case NodeTypes.CareProgramCalculator:
- case NodeTypes.CareProgram:
- tabId = 4;
- backup = CareProgramViewController;
- break;
- default:
- tabId = 0;
- backup = CareFlowViewController;
- break;
- }
- var nvc = tabBar.ViewControllers [tabId] as UINavigationController;
- var sfvc = nvc.TopViewController as ScrollingFlowchartViewController ?? backup;
- if (node.TumorId != AppDelegate.PickedTumor.Id)
- {
- AppDelegate.FillNode(node);
- AppDelegate.PickedTumor = node.Tumor;
- }
- sfvc.source.SelectedNode = node;
- sfvc.SetupFlowChart();
- sfvc.SnapToSection(sfvc.source.GetTreeLevel(node), true);
- tabBar.SelectedIndex = tabId;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement