private int GetMaxAxisValue(byte[] allBytes, SymbolHelper sh, MapViewerEx.AxisIdent axisIdent)
{
int retval = 0;
if (axisIdent == MapViewerEx.AxisIdent.X_Axis)
{
//read x axis values
int offset = sh.X_axis_address;
for (int i = 0; i < sh.X_axis_length; i++)
{
int val = Convert.ToInt32(allBytes[offset]) + Convert.ToInt32(allBytes[offset + 1]) * 256;
if (val > retval) retval = val;
offset += 2;
}
}
else if (axisIdent == MapViewerEx.AxisIdent.Y_Axis)
{
//read x axis values
int offset = sh.Y_axis_address;
for (int i = 0; i < sh.Y_axis_length; i++)
{
int val = Convert.ToInt32(allBytes[offset]) + Convert.ToInt32(allBytes[offset + 1]) * 256;
if (val > retval) retval = val;
offset += 2;
}
}
return retval;
}