Example #1
0
        public int CompareTo(object obj)
        {
            GisPoint p = obj as GisPoint;

            if (p != null)
            {
                double pb = this.TEMP - p.TEMP;
                return((int)(pb));
            }
            return(0);
        }
Example #2
0
        /// <summary>
        /// 从数据库中读取温度点数据至m_PointList中
        /// </summary>
        public static void readData()
        {
            int              i       = 0;
            string           sql     = "select * from point";
            SQLiteCommand    command = new SQLiteCommand(sql, m_dbConnection);
            SQLiteDataReader reader  = command.ExecuteReader();

            while (reader.Read())
            {
                GisPoint point = new GisPoint();
                point.ID   = (long)reader[0];
                point.X    = (double)reader[1];
                point.Y    = (double)reader[2];
                point.TEMP = (double)reader[3];
                Constants.m_PointList.Add(point);
                i++;
            }
            reader.Close();
        }