private TS_UD_CS_MONITOR_EX ParseTsUdCsMonitorEX(byte[] data, ref int currentIndex)
{
TS_UD_CS_MONITOR_EX monitorEx = new TS_UD_CS_MONITOR_EX();
monitorEx.header.type = (TS_UD_HEADER_type_Values)ParseUInt16(data, ref currentIndex, false);
monitorEx.header.length = ParseUInt16(data, ref currentIndex, false);
monitorEx.flags = ParseUInt32(data, ref currentIndex, false);
monitorEx.monitorAttributeSize = ParseUInt32(data, ref currentIndex, false);
monitorEx.monitorCount = ParseUInt32(data, ref currentIndex, false);
List<TS_MONITOR_ATTRIBUTES> attributeList = new List<TS_MONITOR_ATTRIBUTES>();
while (attributeList.Count < monitorEx.monitorCount)
{
TS_MONITOR_ATTRIBUTES attribute = new TS_MONITOR_ATTRIBUTES();
attribute.physicalWidth = ParseUInt32(data, ref currentIndex, false);
attribute.physicalHeight = ParseUInt32(data, ref currentIndex, false);
attribute.orientation = (TS_MONITOR_ATTRIBUTES_orientation_values)ParseUInt32(data, ref currentIndex, false);
attribute.desktopScaleFactor = ParseUInt32(data, ref currentIndex, false);
attribute.deviceScaleFactor = ParseUInt32(data, ref currentIndex, false);
attributeList.Add(attribute);
}
monitorEx.monitorAttributesArray = attributeList.ToArray();
return monitorEx;
}