private void onSelect(treeelement item) { Task.Run(() => { try { Selector s = null; treeelement parent; if (Anchor != null) { parent = item.Parent; while (parent != null && parent.Parent != null) { parent = parent.Parent; } if (parent == null) { System.Windows.MessageBox.Show("Cannot select self"); return; } s = Plugin.GetSelector(null, parent); } var selector = Plugin.GetSelector(s, item); Selector = selector; _json = selector.ToString(); OnPropertyChanged("Selector"); OnPropertyChanged("json"); } catch (Exception ex) { Log.Error(ex.ToString()); } }); // FocusElement(selector); }
public treeelement(treeelement parent) { // ItemDetails = new rpaactivities.SelectorObservableCollection<DetailGroupViewModel>(); Children = new ObservableCollection <treeelement>(); Name = "unknown"; Parent = parent; }
private void ExpandToRoot(treeelement treenode) { treenode.IsExpanded = true; treenode.IsSelected = true; if (treenode.Parent != null) { ExpandToRoot(treenode.Parent); } }
private void onSelect(treeelement item) { var selector = Plugin.GetSelector(Anchor, item); Selector = selector; OnPropertyChanged("Selector"); OnPropertyChanged("json"); // FocusElement(selector); }
private void onSelect(treeelement item) { Task.Run(() => { try { var selector = Plugin.GetSelector(Anchor, item); Selector = selector; OnPropertyChanged("Selector"); OnPropertyChanged("json"); } catch (Exception ex) { Log.Error(ex.ToString()); } }); // FocusElement(selector); }