public StacktraceAnalyerForm(MainForm mainForm, string data, string source)
    {
      this.mainForm = mainForm;
      this.data = data;
      InitializeComponent();
      pineappleTreeView.ImageList = mainForm.IconsList;
      Text = "Stacktrace Analyzer: " + source;

      tbtnShowOriginal.Checked = Configs.Instance.ShowOriginal;

      try
      {
        results = mainForm.Mapping.ProcessCrashlog(data);
      }
      catch (Exception e)
      {
        throw new ObfuscarParserException("Failed to process crashlog", e, data);
      }

      BuildTree();

      pineappleTreeView.Backlights.Add(new PineappleTreeHighlight(Color.FromArgb(255, 224, 224))); // unknown
      pineappleTreeView.Backlights.Add(new PineappleTreeHighlight(Color.FromArgb(224, 255, 224))); // substitution
      pineappleTreeView.Backlights.Add(new PineappleTreeHighlight(Color.LightYellow)); // ambiguous
    }
    public PDBManagerForm(IList<PDBFile> files, MainForm mainForm)
    {
      this.files = files;
      this.mainForm = mainForm;
      InitializeComponent();
      chFilename.Width = lvList.ClientSize.Width;
      lvList.SmallImageList = mainForm.IconsList;

      LoadList();
    }
    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);
        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;
    }
    public SearchDialog(MainForm mainForm, bool searchOriginal)
    {
      this.mainForm = mainForm;
      this.searchOriginal = searchOriginal;
      InitializeComponent();
      lvResults_Resize(null, EventArgs.Empty);
      lvResults.SmallImageList = mainForm.IconsList;

      tbSearch.SetCueText("Type name of the obfuscated element");

      if (searchOriginal)
      {
        Text = "Search for Original Name";
        HeaderText = "Search for Original Name";
      }

      tbSearch.AutoCompleteCustomSource = searchOriginal ?
        mainForm.Mapping.GetOldNamesCollection() :
        mainForm.Mapping.GetNewNamesCollection();

      controlHighlight.OwnerForm = this;
    }
 public CrashHandler(MainForm mainForm)
 {
   this.mainForm = mainForm;
 }
 public static void InitInstance(MainForm mainForm)
 {
   instance = new CrashHandler(mainForm);
 }