public void DecodeText(bool forceDecode = false) { if ((!IsTextDecoded) || (forceDecode)) { if (CustomEntryList.Count > 0) { IList <byte> textBytes = CustomEntryList[0].Bytes; IList <IList <byte> > textByteLists = textBytes.Split((byte)0xFE); NumTextEntries = (NumTextEntries == -1) ? textByteLists.Count : NumTextEntries; CustomEntryList.Clear(); for (int index = 0; index < NumTextEntries; index++) { CustomEntryList.Add(new CustomEntry(index, textByteLists[index], TextUtility.Decode(textByteLists[index]))); } } IsTextDecoded = true; } }
/* * public void DecodeText(bool forceDecode = false) * { * if ((!IsTextDecoded) || (forceDecode)) * { * foreach (CustomEntry entry in CustomEntryList) * { * entry.SetText(TextUtility.Decode(entry.Bytes), false); * } * * IsTextDecoded = true; * } * } */ public void Clear() { CustomEntryList.Clear(); IsTextDecoded = true; NumDecodeTextEntries = 0; }