Пример #1
0
        private void GPS_PositionReceived(string Lat, string Lon)
        {
            if (OSGconv.ParseNMEA(Lat, Lon, 0))
            {
                GpsPosition pos       = new GpsPosition(Convert.ToString(OSGconv.deciLat), Convert.ToString(OSGconv.deciLon));
                string      strToSend = JsonConvert.SerializeObject(pos);
                Debug.WriteLine("GPS_PositionReceived => " + strToSend);
                this.Send(strToSend);
                //deleInvokeMapControlPos dele = delegate(string _lat, string _lon)
                //{
                //    this.txtLat.Text = _lat;
                //    this.txtLng.Text = _lon;
                //};
                //if (this.stop_receive == false)
                //{

                //    this.Invoke(dele, (Convert.ToString(OSGconv.deciLat)), (Convert.ToString(OSGconv.deciLon)));
                //}
            }
        }