예제 #1
0
        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);
        }
예제 #2
0
 public treeelement(treeelement parent)
 {
     // ItemDetails = new rpaactivities.SelectorObservableCollection<DetailGroupViewModel>();
     Children = new ObservableCollection <treeelement>();
     Name     = "unknown";
     Parent   = parent;
 }
예제 #3
0
 private void ExpandToRoot(treeelement treenode)
 {
     treenode.IsExpanded = true;
     treenode.IsSelected = true;
     if (treenode.Parent != null)
     {
         ExpandToRoot(treenode.Parent);
     }
 }
예제 #4
0
        private void onSelect(treeelement item)
        {
            var selector = Plugin.GetSelector(Anchor, item);

            Selector = selector;

            OnPropertyChanged("Selector");
            OnPropertyChanged("json");
            // FocusElement(selector);
        }
예제 #5
0
        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);
        }