Exemple #1
0
 public SearchNode(TreeNode TreeNode, string Title, InformationType Type, object Data, ClearbytesModule ParentModule, SearchNode Parent)
 {
     this.TreeNode = TreeNode;
     this.Title = Title;
     this.Type = Type;
     this.Data = Data;
     this.ParentModule = ParentModule;
     this.Parent = Parent;
 }
        public SearchNode AddInformation(string Title, InformationType Type, object Data)
        {
            if (Type == InformationType.Image) Bridge.ImageCache.Add((Image)Data);

            TreeNode tnode = null;
            _ParentTreeView.Invoke((Action)delegate { tnode = _Parent.Nodes.Add(Title); });

            SearchNode node = new SearchNode(tnode, Title, Type, Data, this);
            Nodes.Add(node);
            //Pointlessly complicated, but I'm already balls deep so what the hell am I supposed to do?
            if (!ParentAdded)
            {
                _ParentTreeView.Invoke((Action)delegate { _ParentTreeView.Nodes.Add(_Parent); });
                ParentAdded = true;
            }

            return node;
        }
Exemple #3
0
        public SearchNode AddInformation(string Title, InformationType Type, object Data, bool forcewait = false)
        {
            if (Type == InformationType.Image) Bridge.ImageCache.Add((Image)Data);

            TreeNode tnode = null;
            if (forcewait)
                this.ParentModule.Parent.TreeView.Invoke((Action)delegate
                {
                    tnode = TreeNode.Nodes.Add(Title);
                });
            else
                this.ParentModule.Parent.TreeView.BeginInvoke((Action)delegate { tnode = TreeNode.Nodes.Add(Title); });

            SearchNode node = new SearchNode(tnode, Title, Type, Data, this.ParentModule, this);
            Nodes.Add(node);

            return node;
        }