/// <summary> /// 创建标记位 /// </summary> /// <param name="isEncrypted">是否为加密文件</param> /// <param name="isCollected">是否为收集文件</param> public static int CreateFlags(bool isEncrypted, bool isCollected) { BitMask32 flags = new BitMask32(0); if (isEncrypted) { flags.Open(0); } if (isCollected) { flags.Open(1); } return(flags); }
/// <summary> /// 设置Flags /// </summary> public void SetFlagsValue(bool isEncrypted, bool isBuildin) { IsEncrypted = isEncrypted; IsBuildin = isBuildin; BitMask32 mask = new BitMask32(0); if (isEncrypted) { mask.Open(0); } if (isBuildin) { mask.Open(1); } Flags = mask; }