/// <summary> /// 解析Flags /// </summary> public void ParseFlagsValue() { BitMask32 value = Flags; IsEncrypted = value.Test(0); IsBuildin = value.Test(1); IsRawFile = value.Test(2); }
/// <summary> /// 设置Flags /// </summary> public void SetFlagsValue(bool isEncrypted, bool isBuildin, bool isRawFile) { IsEncrypted = isEncrypted; IsBuildin = isBuildin; IsRawFile = isRawFile; BitMask32 mask = new BitMask32(0); if (isEncrypted) { mask.Open(0); } if (isBuildin) { mask.Open(1); } if (isRawFile) { mask.Open(2); } Flags = mask; }