public void ParseBytes(byte[] bytes) { using (MemoryStream ms = new MemoryStream(bytes)) using (BinaryReader br = new BinaryReader(ms, Encoding.UTF8)) { this.ItemId = br.ReadInt32(); this.IsConsumable = br.ReadBoolean(); this.ItemType = (Utils.ItemType)br.ReadUInt16(); } }
private void UpdateList() { if (facadeLayout == null) { return; } if (videoImporter == null) { return; } if (facadeLayout.Count != 0) { if (facadeLayout[0].TVTag == null) { return; } Utils.ItemType _itemType = (Utils.ItemType)facadeLayout[0].TVTag; if (_itemType == Utils.ItemType.Rescan) { LoadList(null); return; } if (_itemType == Utils.ItemType.Research) { LoadList(parentItem); return; } } if (viewLevel == Utils.ViewLevel.Files) { UpdateFiles(); } if (viewLevel == Utils.ViewLevel.Movies) { UpdateMovies(); } }