private void EvaluateRoute() { OkButton.IsEnabled = (TreeGui.SelectedRoute != null); if (TreeGui.SelectedRoute != null) { if (TreeGui.SelectedRoute.Steps.Count > 1 && TreeGui.SelectedRoute.Steps[1].Equals("Client")) { SidePanelVisible(true, true); OscTree.Route namedRoute = CreateNamedRoute(TreeGui.SelectedRoute); CurrentRouteName.Content = namedRoute.GetActualRoute(); TreeGui.SelectedRoute.ScreenName = CurrentRouteName.Content as string; } else { SidePanelVisible(false, true); CurrentRouteName.Content = root.GetNameOfRoute(TreeGui.SelectedRoute); TreeGui.SelectedRoute.ScreenName = CurrentRouteName.Content as string; } } else { CurrentRouteName.Content = ""; SidePanelVisible(false, false); } }
public void SetRoot(OscTree.Tree root) { TreeGui.SetRoot(root); TreeGui.OnRouteChanged += () => { OkButton.IsEnabled = (TreeGui.SelectedRoute != null); if (TreeGui.SelectedRoute != null) { TreeGui.SelectedRoute.CurrentStep = 0; TreeGui.SelectedRoute.ScreenName = root.GetNameOfRoute(TreeGui.SelectedRoute); CurrentRouteName.Content = TreeGui.SelectedRoute.ScreenName; } else { CurrentRouteName.Content = ""; } }; }