Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uint vnd = 0;
- uint date = 0;
- vnd |= (Convert.ToUInt32(TB_VN.Text) & 0xFF);
- date |= (uint)((CAL_MetDate.Value.Year-2000) & 0xFF);
- date |= (uint)((CAL_MetDate.Value.Month & 0xF) << 8);
- date |= (uint)((CAL_MetDate.Value.Day & 0x1F) << 12);
- vnd |= ((date & 0x1FFFF) << 14);
- //Fix for top bit
- uint rawvnd = BitConverter.ToUInt32(data, offset + 0x1B0);
- vnd |= (rawvnd & 0x80000000);
- Array.Copy(BitConverter.GetBytes(vnd), 0, data, offset + 0x1B0, 4);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement