示例#1
0
        /// <summary>
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnNodeExpanded(object sender, Aga.Controls.Tree.TreeViewAdvEventArgs e)
        {
            // Retrieve all sub nodes.
            foreach (TreeNodeAdv SNode in e.Node.Children)
            {
                DownloadFileSystemTreeNode Metadata = SNode.Tag as DownloadFileSystemTreeNode;
                if (Metadata == null || !Metadata.IsBuild)
                {
                    BuildFileSystem.GetChildrenNames(Metadata.FullPath);
                }
            }

            // TODO: Force sub-refresh of childrens childrens after a given amount of time?
        }
 void TreeExpanding(Object sender, TreeViewAdvEventArgs e)
 {
     if (e.Node.Index >= 0)
     {
         ListChildItems(e.Node.Tag as ValueNode);
     }
 }
示例#3
0
 private void trvResources_Expanding(object sender, TreeViewAdvEventArgs e)
 {
     if (this.InvokeRequired)
     {
         this.Invoke(new MethodInvoker(() =>
         {
             this.Cursor = Cursors.WaitCursor;
         }));
     }
     else
     {
         this.Cursor = Cursors.WaitCursor;
     }
 }
        private void tvWorkitems_Expanded(object sender, TreeViewAdvEventArgs e) {
            if(!IsHandleCreated) {
                return;
            }

            Invoke(new Action(() => waitCursor.Hide()));
        }
示例#5
0
文件: MainForm.cs 项目: SorenHK/sdb
 void tree_Expanding(object sender, TreeViewAdvEventArgs e)
 {
 }
示例#6
0
		void TreeExpanding(Object sender, TreeViewAdvEventArgs e)
        {
            if (e.Node.Index >= 0)
            {
                DataNode node = e.Node.Tag as DataNode;

				if (node.Nodes.Count == 0)
                {
					FlashInterface flashInterface = PluginMain.debugManager.FlashInterface;

					SortedList<DataNode, DataNode> nodes = new SortedList<DataNode, DataNode>();
					SortedList<DataNode, DataNode> inherited = new SortedList<DataNode, DataNode>();

					foreach (Variable member in node.Variable.getValue().getMembers(flashInterface.Session))
					{
						if ((member.Scope == VariableAttribute.PRIVATE_SCOPE && member.Level > 0) ||
							member.Scope == VariableAttribute.INTERNAL_SCOPE ||
							member.isAttributeSet(VariableAttribute.IS_STATIC))
						{
							// Flex Builder doesn't display these so we won't either.
							continue;
						}

						DataNode memberNode = new DataNode(member);

						if (member.Level > 0)
						{
							inherited.Add(memberNode, memberNode);
						}
						else
						{
							nodes.Add(memberNode, memberNode);
						}
					}

					if (inherited.Count > 0)
					{
						DataNode inheritedNode = new DataNode("[inherited]");

						foreach (DataNode item in inherited.Keys)
						{
							inheritedNode.Nodes.Add(item);
						}

						node.Nodes.Add(inheritedNode);
					}

					foreach (DataNode item in nodes.Keys)
					{
						node.Nodes.Add(item);
					}
                }
            }
        }
示例#7
0
 private void Tree_SizeChanged(object sender, TreeViewAdvEventArgs e)
 {
     DoResize();
 }
        private void tvWorkitems_Expanding(object sender, TreeViewAdvEventArgs e) {
            if(!IsHandleCreated || !e.Node.CanExpand) {
                return;
            }

            Invoke(new Action(() => waitCursor.Show()));
        }
示例#9
0
 private void tree_Collapsed(object sender, TreeViewAdvEventArgs e)
 {
     if (DoubleClicked)
     {
         tree.ExpandAll();
         DoubleClicked = false;
     }
 }
示例#10
0
 private void hwPreproTree_Expanded(object sender, TreeViewAdvEventArgs e)
 {
     PreproTreeNode ppNode = e.Node.Tag as PreproTreeNode;
       if ( ppNode != null )
       {
     ppNode.DataNode.UIExpanded = e.Node.IsExpanded;
       }
 }
示例#11
0
 private void areasTree_Expanded(object sender, TreeViewAdvEventArgs e)
 {
     if (e.Node.Children.Count > 0)
     {
         string maxDesc = string.Empty;
         e.Node.Children.ToList().ForEach(n =>
         {
             AreaTreeItem tag = n.Tag as AreaTreeItem;
             if (tag != null)
             {
                 if (tag.Description.Length > maxDesc.Length)
                 {
                     maxDesc = tag.Description;
                 }
             }
         });
         SizeF size = TextRenderer.MeasureText(maxDesc, ntcArea.Font);
         if (size.ToSize().Width + 80 > tcArea.Width)
             tcArea.Width = size.ToSize().Width + 80;
     }
 }
示例#12
0
        private void areasTree_Collapsed(object sender, TreeViewAdvEventArgs e)
        {

        }
 private void InspectedParameterExpandedHandler(object sender, TreeViewAdvEventArgs e)
 {
     AutosizeColumns();
 }
示例#14
0
        void treeView1_Expanded(object sender, TreeViewAdvEventArgs e)
        {
            MyNode node = e.Node.Tag as MyNode;

            if (SaveExpand)
            {
                if (IsNodeExpanded.ContainsKey(node.Text))
                {
                    bool exp = IsNodeExpanded[node.Text];
                    IsNodeExpanded[node.Text] = exp ? false : true;
                } else
                {
                    IsNodeExpanded.Add(node.Text, true);
                }
            }
        }
示例#15
0
        void treeViewAdv1_Expanding(object sender, TreeViewAdvEventArgs e)
        {
            if (_client.State != XdebugClientState.Break)
            {
                MessageBox.Show(
                    "This property is no longer available. Close the Property window and try running the script again.",
                    "Property invalidated",
                    MessageBoxButtons.OK
                );

                return;
            }

            DebugNode node = e.Node.Tag as DebugNode;
            if (node != null && !node.Property.isComplete)
            {
                this.treeViewAdv1.BeginUpdate();
                Property p = _client.GetPropertyValue(node.Property.FullName, node.Property.Context);

                if (p == null)
                {
                    MessageBox.Show("Cannot fetch property " + node.Property.FullName);
                }
                else
                {
                    /* We don't want 'p' itself. It will be a copy of the node that
                     * was marked as inComplete. */
                    foreach (Property child in p.ChildProperties)
                    {
                        DebugNode newNode = this.BuildDebugNode(child, node);

                        node.Nodes.Add(newNode);
                    }

                    node.Property.isComplete = true;
                }
                this.treeViewAdv1.EndUpdate();
            }
        }
示例#16
0
        /// <summary>
        /// Event handler catching the collapsing event and updating the GRT tree model
        /// </summary>
        /// <param name="sender">Object that triggered the event</param>
        /// <param name="e">The event parameters</param>
        private void TreeViewCollapsing(object sender, TreeViewAdvEventArgs e)
        {
            if (e.Node != null && e.Node.Tag != null)
            {
                GrtTreeNode node = e.Node.Tag as GrtTreeNode;

                if (node != null)
                    model.collapse_node(node.NodeId);
            }
        }
示例#17
0
        void TreeExpanding(Object sender, TreeViewAdvEventArgs e)
        {
            if (e.Node.Index >= 0)
            {
                DataNode node = e.Node.Tag as DataNode;
                if (node.Nodes.Count == 0 && node.Variable != null)
                {
                    FlashInterface flashInterface = PluginMain.debugManager.FlashInterface;
                    List<DataNode> nodes = new List<DataNode>();
                    List<DataNode> inherited = new List<DataNode>();
                    List<DataNode> statics = new List<DataNode>();
                    int tmpLimit = node.ChildrenShowLimit;
                    foreach (Variable member in node.Variable.getValue().getMembers(flashInterface.Session))
                    {
                        DataNode memberNode = new DataNode(member);

                        if (member.isAttributeSet(VariableAttribute_.IS_STATIC))
                        {
                            statics.Add(memberNode);
                        }
                        else if (member.getLevel() > 0)
                        {
                            inherited.Add(memberNode);
                        }
                        else
                        {
                            nodes.Add(memberNode);
                        }
                    }
                    if (inherited.Count > 0)
                    {
                        DataNode inheritedNode = new DataNode("[inherited]");
                        inherited.Sort();
                        foreach (DataNode item in inherited)
                        {
                            inheritedNode.Nodes.Add(item);
                        }
                        node.Nodes.Add(inheritedNode);
                    }
                    if (statics.Count > 0)
                    {
                        DataNode staticNode = new DataNode("[static]");
                        statics.Sort();
                        foreach (DataNode item in statics)
                        {
                            staticNode.Nodes.Add(item);
                        }
                        node.Nodes.Add(staticNode);
                    }
                    //test children
                    foreach (String ch in node.Variable.getValue().getClassHierarchy(false))
                    {
                        if (ch.Equals("flash.display::DisplayObjectContainer"))
                        {
                            double numChildren = ((java.lang.Double)node.Variable.getValue().getMemberNamed(flashInterface.Session, "numChildren").getValue().getValueAsObject()).doubleValue();
                            DataNode childrenNode = new DataNode("[children]");
                            for (int i = 0; i < numChildren; i++)
                            {
                                try
                                {
                                    IASTBuilder b = new ASTBuilder(false);
                                    string cmd = GetVariablePath(node) + ".getChildAt(" + i + ")";
                                    ValueExp exp = b.parse(new java.io.StringReader(cmd));
                                    var ctx = new ExpressionContext(flashInterface.Session, flashInterface.GetFrames()[PluginMain.debugManager.CurrentFrame]);
                                    var obj = exp.evaluate(ctx);
                                    if (obj is flash.tools.debugger.concrete.DValue) obj = new flash.tools.debugger.concrete.DVariable("getChildAt(" + i + ")", (flash.tools.debugger.concrete.DValue)obj, ((flash.tools.debugger.concrete.DValue)obj).getIsolateId());
                                    DataNode childNode = new DataNode((Variable)obj);
                                    childNode.Text = "child_" + i;
                                    childrenNode.Nodes.Add(childNode);
                                }
                                catch (Exception) { }
                            }
                            node.Nodes.Add(childrenNode);
                        }
                        else if (ch.Equals("flash.events::EventDispatcher"))
                        {
                            Variable list = node.Variable.getValue().getMemberNamed(flashInterface.Session, "listeners");
                            var omg = list.getName();
                            /*
                            double numChildren = ((java.lang.Double)node.Variable.getValue().getMemberNamed(flashInterface.Session, "numChildren").getValue().getValueAsObject()).doubleValue();
                            DataNode childrenNode = new DataNode("[children]");
                            for (int i = 0; i < numChildren; i++)
                            {
                                try
                                {

                                    IASTBuilder b = new ASTBuilder(false);
                                    string cmd = GetVariablePath(node) + ".getChildAt(" + i + ")";
                                    ValueExp exp = b.parse(new java.io.StringReader(cmd));
                                    var ctx = new ExpressionContext(flashInterface.Session, flashInterface.Session.getFrames()[PluginMain.debugManager.CurrentFrame]);
                                    var obj = exp.evaluate(ctx);
                                    if (obj is flash.tools.debugger.concrete.DValue) obj = new flash.tools.debugger.concrete.DVariable("child_" + i, (flash.tools.debugger.concrete.DValue)obj);
                                    DataNode childNode = new DataNode((Variable)obj);
                                    childrenNode.Nodes.Add(childNode);
                                }
                                catch (Exception) { }
                            }
                            node.Nodes.Add(childrenNode);
                             * */
                        }
                    }
                    //test children
                    nodes.Sort();
                    _tree.BeginUpdate();
                    foreach (DataNode item in nodes)
                    {
                        if (0 == tmpLimit--) break;
                        node.Nodes.Add(item);
                    }
                    if (tmpLimit == -1)
                    {
                        DataNode moreNode = new DataNode("...");
                        node.Nodes.Add(moreNode);
                    }
                    _tree.EndUpdate();
                }
            }
        }
示例#18
0
        /// <summary>
        /// Event handler catching the expanding event and updating the GRT tree model
        /// </summary>
        /// <param name="sender">Object that triggered the event</param>
        /// <param name="e">The event parameters</param>
        private void TreeViewExpanding(object sender, TreeViewAdvEventArgs e)
        {
            if (e.Node != null)
            {
                GrtTreeNode node = e.Node.Tag as GrtTreeNode;

            if (node != null)
              model.expand_node(node.NodeId);

            // This expands the nodes in the UI which where expanded before.
            reexpandChildren(e.Node);
            }
        }
示例#19
0
 private void folderView_Expanding(object sender, TreeViewAdvEventArgs e)
 {
     NodeBase node = e.Node.Tag as NodeBase;
     if (node != null) foreach (NodeBase childNode in node.Nodes) childNode.NotifyVisible();
 }
示例#20
0
 /// <summary>
 /// Changing the Folder Image to "open folder"
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void tvaFiles_Expanding(object sender, TreeViewAdvEventArgs e)
 {
     if (e.Node.Tag != null)
     {
         if (e.Node.Level == 1) //DIR!
         {
             log.DebugFormat("Expanding {0}", ((Node)(e.Node.Tag)).Text);
             ((Node)(e.Node.Tag)).Image = Properties.Resources.folder_open;
         }
     }
 }
示例#21
0
		void TreeExpanding(Object sender, TreeViewAdvEventArgs e)
        {
            if (e.Node.Index >= 0)
            {
                DataNode node = e.Node.Tag as DataNode;
				if (node.Nodes.Count == 0)
                {
					FlashInterface flashInterface = PluginMain.debugManager.FlashInterface;
                    SortedList<DataNode, DataNode> nodes = new SortedList<DataNode, DataNode>();
					SortedList<DataNode, DataNode> inherited = new SortedList<DataNode, DataNode>();
					SortedList<DataNode, DataNode> statics = new SortedList<DataNode, DataNode>();
					foreach (Variable member in node.Variable.getValue().getMembers(flashInterface.Session))
					{
						DataNode memberNode = new DataNode(member);
						if (member.isAttributeSet(VariableAttribute.IS_STATIC))
						{
							statics.Add(memberNode, memberNode);
						}
						else if (member.Level > 0)
						{
							inherited.Add(memberNode, memberNode);
						}
						else
						{
							nodes.Add(memberNode, memberNode);
						}
					}
					if (inherited.Count > 0)
					{
						DataNode inheritedNode = new DataNode("[inherited]");
						foreach (DataNode item in inherited.Keys)
						{
							inheritedNode.Nodes.Add(item);
						}
						node.Nodes.Add(inheritedNode);
					}
					if (statics.Count > 0)
					{
						DataNode staticNode = new DataNode("[static]");
						foreach (DataNode item in statics.Keys)
						{
							staticNode.Nodes.Add(item);
						}
						node.Nodes.Add(staticNode);
					}
					foreach (DataNode item in nodes.Keys)
					{
						node.Nodes.Add(item);
					}
                }
            }
        }
示例#22
0
文件: SideOld.cs 项目: helgihaf/Alpha
 private void treeView_Expanded(object sender, TreeViewAdvEventArgs e)
 {
 }