ME3Explorer.Texplorer2.AddToTree C# (CSharp) Method

AddToTree() private method

private AddToTree ( string path, int exportID ) : void
path string
exportID int
return void
        internal void AddToTree(string path, int exportID)
        {
            MessageBox.Show("THIS DOESN'T WORK YET! LET ME KNOW PLEASE.");
            return;
            BeginLoadingTree(true);
            using (PCCObjects.IPCCObject pcc = PCCObjects.Creation.CreatePCCObject(path, WhichGame))
            {
                //TreeTexInfo tex = KFreonFormsLib.Miscextra.GenerateTexStruct(pcc, exportID, WhichGame, pathBIOGame, ExecFolder, Tree.GetPCCsAsList());
                bool Success;
                TreeTexInfo tex = new TreeTexInfo(pcc, exportID, WhichGame, pathBIOGame, ExecFolder, out Success);
                Tree.AddTex(tex, "", "");  // not right - should be blind add?
                if (File.Exists(Tree.TreePath))
                    File.Delete(Tree.TreePath);
                Tree.WriteToFile(Tree.TreePath, Path.GetDirectoryName(pathBIOGame));
            }
        }

Usage Example

コード例 #1
0
		private void saveCloneToolStripMenuItem_Click(object sender, EventArgs e) {
            if (pcc == null || Index == -1)
                return;
            if (pcc.pccFileName != null)
            {
                string path = pcc.pccFileName;
                savePccFile(path);

                // Reload File
                Print("Reloading File...");
                pcc = new PCCObject(path);

                Print("Checking for texture...");
                if (path.StartsWith(Path.Combine(Properties.Settings.Default.TexplorerME3Path, "CookedPCConsole")) && pcc.Exports[pcc.Exports.Count - 1].ClassName == "Texture2D" || pcc.Exports[pcc.Exports.Count - 1].ClassName == "LightMapTexture2D" || pcc.Exports[pcc.Exports.Count - 1].ClassName == "TextureFlipBook")
                {
                    Print("PCC in Game Directory. Texture Found. Adding to DB...");
                    int exportID = (pcc.Exports.Count - 1);
                    Texplorer2 tp = new Texplorer2(true);
                    tp.AddToTree(path, exportID);
                    MessageBox.Show("Texture added to DB.");
                }
                else
                {
                    Print("No Texture Found or File not in Game Directory.");
                }

                Print("Refreshing Screen...");
                ListRefresh();

                MessageBox.Show("Done.");

            }
		}
Texplorer2