private void BuildFailedNode(PineappleTreeNode node, INamedEntity entity, string originalLine) { node.ImageIndex = TreeBuilder.GetIconForEntity(entity.EntityType, mainForm); node.BacklightColorIndex = (int)Highlights.Unknown; node.Text += "\nUnable to deobfuscate."; if (originalLine != null && Configs.Instance.ShowOriginal) { node.Text += "\nOriginal line: " + originalLine; } node.ToolTipText = "Unable to deobfuscate method. It is of an unknown or system assembly."; }
private void BuildSubstitutionNode(PineappleTreeNode node, INamedEntity entity, string originalLine) { node.BacklightColorIndex = (int)Highlights.Substitution; node.Text += "\nClass substitution"; if (originalLine != null && Configs.Instance.ShowOriginal) { node.Text += "\nOriginal line: " + originalLine; } node.ToolTipText = "Target method not found in mapping."; node.ImageIndex = TreeBuilder.GetIconForEntity(entity.EntityType, mainForm); }
private void BuildResult(RenamedBase item) { ListViewItem l = new ListViewItem(item.NameOldSimple); l.ImageIndex = TreeBuilder.GetIconForEntity(item.EntityType, mainForm); lvResults.Items.Add(l); ItemDescriptor d = new ItemDescriptor(item); l.Tag = d; string tip; if (item is RenamedClass) { tip = TreeBuilder.BuildHintForClass((RenamedClass)item); } else { tip = TreeBuilder.BuildHintForItem((RenamedItem)item); } if (!mainForm.HavePdb) { tip += "Unable to map to source code, no PDB files attached."; } else { if (item.EntityType != EntityType.Method) { tip += "Mapping to source code works only for methods."; } else { string filename; int line; if (mainForm.SearchInPdb(out filename, out line, item)) { tip += "Source position:\n" + filename + ":" + line + " (Ctrl+Click to open)"; d.Filename = filename; d.Line = line; } else { tip += "Unable to map to source code."; } } } tip += "\nDouble-click to select in classes tree."; l.ToolTipText = tip; }
public SearchResultsForm(MainForm mainForm, SearchResults items, string name) { InitializeComponent(); lvItems.SmallImageList = mainForm.IconsList; Text = name; foreach (INamedEntity item in items.Results) { string itemName = item.NameFull; ListViewItem lv = new ListViewItem(itemName); lv.ImageIndex = TreeBuilder.GetIconForEntity(item.EntityType, mainForm); lv.Tag = item; lvItems.Items.Add(lv); lv.ToolTipText = ((RenamedBase)item).TreeNode.ToolTipText + "Double-click to select in classes tree.";; } chItem.Width = lvItems.ClientSize.Width; }
private void BuildNormalNode(PineappleTreeNode node, INamedEntity entity, string originalLine) { node.ImageIndex = TreeBuilder.GetIconForEntity(entity.EntityType, mainForm); ItemDescriptor descriptor = new ItemDescriptor(entity); string tooltip = descriptor.GetToolTip(); node.Tag = descriptor; RenamedItem item = entity as RenamedItem; if (item != null) { node.Text += "\nOwner class: " + item.Owner.NameOldFull; } RenamedBase renamedBase = (RenamedBase)entity; if (tbtnShort.Checked) { node.Text += "\nNew name: " + renamedBase.NameNew; } if (tbtnSimple.Checked) { node.Text += "\nNew name: " + renamedBase.NameNewSimple; } if (tbtnFull.Checked) { node.Text += "\nNew name: " + renamedBase.NameNewFull; } if (originalLine != null && Configs.Instance.ShowOriginal) { node.Text += "\nOriginal line: " + originalLine; } if (!mainForm.HavePdb) { tooltip += "Unable to map to source code, no PDB files attached."; } else { if (entity.EntityType != EntityType.Method) { tooltip += "Mapping to source code works only for methods."; } else { ProcessPdb(descriptor); if (descriptor.Filename != null) { node.Text += "\n" + PathUtils.ShortenPath(descriptor.Filename, 100) + ":" + descriptor.Line; tooltip += descriptor.Filename + ":" + descriptor.Line; } else { tooltip += "Unable to map to source code."; } } } node.ToolTipText = tooltip; }