VAGSuite.MapViewerEx.FillDataCompare C# (CSharp) Метод

FillDataCompare() приватный Метод

private FillDataCompare ( NMeshSurfaceSeries surface ) : void
surface NMeshSurfaceSeries
Результат void
        private void FillDataCompare(NMeshSurfaceSeries surface)
        {
            DataTable dt = (DataTable)gridControl1.DataSource;
            int rowcount = dt.Rows.Count;
            int colcount = dt.Columns.Count;
            for (int row = 0; row < rowcount; row++)
            {
                for (int col = colcount - 1; col >= 0; col--)
                {
                    if (m_issixteenbit)
                    {
                        int indexinmap = ((row * colcount) + col) * 2;
                        Int32 ivalue = Convert.ToInt32(m_map_compare_content[indexinmap]) * 256;
                        ivalue += Convert.ToInt32(m_map_compare_content[indexinmap + 1]);
                        //Int32 diffivalue = Convert.ToInt32(m_map_content[indexinmap]) * 256;
                        //diffivalue += Convert.ToInt32(m_map_content[indexinmap + 1]);
                        //if (diffivalue != 0)
                        {
                            if (ivalue > 32000)
                            {
                                ivalue = 65536 - ivalue;
                                ivalue = -ivalue;
                            }
                            double value = ivalue;
                            if (m_viewtype != ViewType.Decimal && m_viewtype != ViewType.Hexadecimal && m_viewtype != ViewType.ASCII)
                            {
                                value *= correction_factor;
                                value += correction_offset;
                            }
                            surface.Data.SetValue((rowcount - 1) - row, col, value, (rowcount - 1) - row, col);
                        }
                        //Console.WriteLine(surface.Name + ": " + row.ToString() + " " + col.ToString() + " value: " + value.ToString());

                    }
                    else
                    {

                        int indexinmap = ((row * colcount) + col);
                        Int32 ivalue = Convert.ToInt32(m_map_compare_content[indexinmap]);
                        //Int32 diffivalue = Convert.ToInt32(m_map_content[indexinmap]);
                        //if (diffivalue != 0)
                        {
                            double value = ivalue;
                            if (m_viewtype != ViewType.Decimal && m_viewtype != ViewType.Hexadecimal && m_viewtype != ViewType.ASCII)
                            {
                                value *= correction_factor;
                                value += correction_offset;
                            }
                            surface.Data.SetValue((rowcount - 1) - row, col, value, (rowcount - 1) - row, col);
                        }
                    }
                }
            }
        }
MapViewerEx