public static void Dumper_UIGlobals(object param) { DumpUIGlobalsArgs args = (DumpUIGlobalsArgs)param; if (args.FilterText == null) { PPather.WriteLine("Error: Something is wrong with args, unable to dump object list"); return; } if (GContext.Main.Me == null || !GContext.Main.Me.IsValid) { PPather.WriteLine("Error: IsPreWorldVisible is true, unable to dump object list"); return; } // disable the Dump button on the form PPather.form.DumpButtonEnabled(false); //PPather.WriteLine("Dumping GObjects.."); List <TreeNode> tnc = new List <TreeNode>(); bool shouldCheck = (args.FilterText.Trim().Length != 0); bool dumpUiVisible = args.OnlyVisible; string[] onames = GInterfaceHelper.GetAllInterfaceObjectNames(); for (int i = 0, max = onames.Length; i != max; i++) { if (onames[i] == null || onames[i].Length == 0) { continue; } if (shouldCheck && !onames[i].ToLower().Contains(args.FilterText)) { continue; } //PPather.WriteLine(String.Format("#{1}/{2}: {0}", onames[i], i, max)); UIDumperTreeNode node = new UIDumperTreeNode(onames[i], true); node.OnlyVisible = args.OnlyVisible; tnc.Add(node); } // push those new nodes in there nicely PPather.form.SetDevTreeNodes(tnc.ToArray()); tnc.Clear(); tnc = null; // re-enable the Dump button on the form PPather.form.DumpButtonEnabled(true); //PPather.WriteLine("Dump complete."); }
public static void dumpUi() { form.devTree.Nodes.Clear(); string check = form.dumpUiFilter.Text.ToLower(); foreach (string s in GInterfaceHelper.GetAllInterfaceObjectNames()) { if (s == null || !s.ToLower().Contains(check)) { continue; } GInterfaceObject root = GContext.Main.Interface.GetByName(s); if (form.dumpUiVisibleCB.Checked && !root.IsVisible) { continue; } TreeNode node = dumpUi_doChildren(ref root); form.devTree.Nodes.Add(node); } }