ME3Explorer.Unreal.Classes.WwiseStream.ExtractToFile C# (CSharp) Method

ExtractToFile() public method

public ExtractToFile ( string pathtoafc = "", string name = "", bool askSaveLoc = true ) : void
pathtoafc string
name string
askSaveLoc bool
return void
        public void ExtractToFile(string pathtoafc = "",string name = "",bool askSaveLoc = true)
        {
            if (FileName == "")
                return;
            if (FileName == null)
            {
                ExtractWav(pathtoafc, name, askSaveLoc);
            }
            else if (pathtoafc != "")
            {
                if (File.Exists(pathtoafc + FileName + ".afc"))
                    ExtractWav(pathtoafc + FileName + ".afc", name, askSaveLoc);
                else
                {
                    OpenFileDialog d = new OpenFileDialog();
                    d.Filter = FileName + ".afc|" + FileName + ".afc";
                    if (d.ShowDialog() == DialogResult.OK)
                        ExtractWav(d.FileName, name, askSaveLoc);
                }
            }
            else
            {
                OpenFileDialog d = new OpenFileDialog();
                d.Filter = FileName + ".afc|" + FileName + ".afc";
                if (d.ShowDialog() == DialogResult.OK)
                    ExtractWav(d.FileName, name, askSaveLoc);
            }
        }

Usage Example

示例#1
0
 public void ExtractSound()
 {
     if (listView1.SelectedItems.Count != 1 || pcc == null)
         return;
     ListViewItem item = listView1.SelectedItems[0];
     int index = Convert.ToInt32(item.Name);
     if (pcc.Exports[index].ClassName == "WwiseStream")
     {
         WwiseStream w = new WwiseStream(pcc, pcc.Exports[index].Data);
         w.ExtractToFile(pathCooked,pcc.Exports[index].ObjectName);
     }
 }
All Usage Examples Of ME3Explorer.Unreal.Classes.WwiseStream::ExtractToFile