Exemplo n.º 1
0
 public static void LoadTlkData(string fileName, int index)
 {
     if (File.Exists(fileName))
     {
         ME1Package pcc = MEPackageHandler.OpenME1Package(fileName);
         TalkFile   tlk = new TalkFile(pcc, index);
         tlk.LoadTlkData();
         tlkList.Add(tlk);
     }
 }
Exemplo n.º 2
0
 public static void LoadTlkData(string fileName, int index)
 {
     if (File.Exists(fileName))
     {
         IMEPackage pcc = MEPackageHandler.OpenME1Package(fileName, forceLoadFromDisk: true); //do not cache this in the packages list.
         TalkFile   tlk = new TalkFile(pcc, index);
         tlk.LoadTlkData();
         tlkList.Add(tlk);
     }
 }
        public override void LoadExport(ExportEntry exportEntry)
        {
            var tlkFile = new ME1Explorer.Unreal.Classes.TalkFile(exportEntry);         // Setup object as TalkFile

            LoadedStrings = tlkFile.StringRefs.ToList();                                //This is not binded to so reassigning is fine
            CleanedStrings.ClearEx();                                                   //clear strings Ex does this in bulk (faster)
            CleanedStrings.AddRange(LoadedStrings.Where(x => x.StringID > 0).ToList()); //nest it remove 0 strings.
            CurrentLoadedExport = exportEntry;
            editBox.Text        = NO_STRING_SELECTED;                                   //Reset ability to save, reset edit box if export changed.
            FileModified        = false;
        }
        private void Evt_ExportXML(object sender, RoutedEventArgs e)
        {
            SaveFileDialog saveFileDialog = new SaveFileDialog
            {
                Filter   = "XML Files (*.xml)|*.xml",
                FileName = CurrentLoadedExport.ObjectName + ".xml"
            };

            if (saveFileDialog.ShowDialog() == true)
            {
                ME1Explorer.Unreal.Classes.TalkFile talkfile = new ME1Explorer.Unreal.Classes.TalkFile(CurrentLoadedExport);
                talkfile.saveToFile(saveFileDialog.FileName);
            }
        }