Пример #1
0
        private void xRefsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (currentFile == null)
            {
                return;
            }
            if (assetList.SelectedCells.Count > 0)
            {
                var    selRow   = assetList.SelectedRows[0];
                long   pathId   = (long)selRow.Cells[3].Value;
                string assetDir = Path.GetDirectoryName(currentFile.path);

                if (pptrMap == null)
                {
                    string avpmFilePath = Path.Combine(assetDir, "avpm.dat");
                    if (File.Exists(avpmFilePath))
                    {
                        pptrMap = new PPtrMap(new BinaryReader(File.OpenRead(avpmFilePath)));
                    }
                    else
                    {
                        MessageBox.Show("avpm.dat file does not exist.\nTry running Global Search -> PPtr.", "Assets View");
                        return;
                    }
                }
                XRefsDialog xrefs = new XRefsDialog(this, helper, assetDir, pptrMap, new AssetID(currentFile.name, pathId));
                xrefs.Show();
            }
        }
Пример #2
0
 public XRefsDialog(StartScreen ss, AssetsManager am, string dirName, PPtrMap map, AssetID id)
 {
     this.ss      = ss;
     this.am      = am;
     this.dirName = dirName;
     this.map     = map;
     this.id      = id;
     InitializeComponent();
 }