Example #1
0
 public static void OpenPTPFile(ObjectFile objectFile, string path, PersonaEncoding.PersonaEncoding newEncoding)
 {
     if (objectFile.Object is FileStructure.Text.BMD bmd)
     {
         if (File.Exists(path))
         {
             FileStructure.Text.PTP PTP = new FileStructure.Text.PTP(File.ReadAllBytes(path));
             bmd.Open(PTP, newEncoding);
         }
     }
 }
Example #2
0
 public static void SavePTPFile(ObjectFile objectFile, string path, PersonaEncoding.PersonaEncoding oldEncoding = null)
 {
     if (objectFile.Object is FileStructure.Text.BMD bmd)
     {
         FileStructure.Text.PTP PTP = new FileStructure.Text.PTP(bmd);
         if (oldEncoding != null)
         {
             PTP.CopyOld2New(oldEncoding);
         }
         File.WriteAllBytes(path, PTP.Get());
     }
 }
Example #3
0
 public static void OpenPersonaFileDialog(ObjectFile objectFile, PersonaEncoding.PersonaEncoding encoding = null)
 {
 }