GMap.NET.WindowsMobile/GMap.NET.GPS/GPS.cs

(开头部分) 13KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES.
//
using System;
using System.Runtime.InteropServices;
using System.Text;

#if PocketPC
using OpenNETCF.ComponentModel;
using OpenNETCF.Threading;
using Thread=OpenNETCF.Threading.Thread2;
using System.Diagnostics;
#endif

namespace GMap.NET.GPS
{
   public delegate void LocationChangedEventHandler(object sender, GpsPosition args);
   public delegate void DeviceStateChangedEventHandler(object sender, GpsDeviceState args);

   /// <summary>
   /// Summary description for GPS.
   /// </summary>
   public class Gps
   {
      // handle to the gps device
      IntPtr gpsHandle = IntPtr.Zero;

      // handle to the native event that is signalled when the GPS
      // devices gets a new location
      IntPtr newLocationHandle = IntPtr.Zero;

      // handle to the native event that is signalled when the GPS
      // device state changes
      IntPtr deviceStateChangedHandle = IntPtr.Zero;

      // handle to the native event that we use to stop our event
      // thread
      IntPtr stopHandle = IntPtr.Zero;

      // holds our event thread instance
      Thread gpsEventThread = null;


      event LocationChangedEventHandler locationChanged;

      /// <summary>
      /// Event that is raised when the GPS locaction data changes
      /// </summary>
      public event LocationChangedEventHandler LocationChanged
      {
         add
后面还有 330 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。