Example #1
0
 private void ReadPauStream()
 {
     if (pauStream.ReadByte() != 0x50 ||
         pauStream.ReadByte() != 0x41 ||
         pauStream.ReadByte() != 0x55)
     {
         throw new InvalidDataException("Unrecognised PAU header");
     }
     version     = (byte)pauStream.ReadByte();
     rootControl = (Control)Deserialiser.Deserialise(new Binary(pauStream, true), typeof(Control));
 }
Example #2
0
 private async Task ReadAnimations()
 {
     animationGroups = new List <AnimationGroup>();
     foreach (var entry in animationsPar.Entries)
     {
         AnimationGroup animationGroup = (AnimationGroup)Deserialiser.Deserialise(
             new Binary(await entry.GetData(), true), typeof(AnimationGroup));
         animationGroup.FileName = entry.FileName;
         animationGroups.Add(animationGroup);
     }
 }
Example #3
0
 public static object FromBase64(string data, Type type)
 {
     byte[] bytes = Convert.FromBase64String(data);
     using MemoryStream memoryStream = new MemoryStream(bytes);
     return(Deserialiser.Deserialise(new Binary(memoryStream, true), type));
 }