public void EnableGPS(bool doInit) { m_GPSD = new GPS(); m_GPSDTimer = new Timer(m_Config.GPSDPoll * 1000); m_GPSDTimer.AutoReset = true; m_GPSDTimer.Enabled = true; m_GPSDTimer.Elapsed += HandleM_gpsTimerElapsed; if (doInit) { m_Window.SetLocation("GPSD", m_GPSD.Lat, m_GPSD.Lon); Timer init = new Timer(1000); init.AutoReset = false; init.Elapsed += HandleM_gpsTimerElapsed; init.Start(); } }
void HandleActionActivated(object sender, EventArgs e) { Location loc = m_locations[((sender) as Gtk.Action).Name]; gpsdAction.Active = false; m_Win.SetLocation(loc); }
void HandleSetCenterItemActivated(object sender, EventArgs e) { Geocache cache = m_Win.CacheList.SelectedCache; m_Win.SetLocation(cache.Name, cache.Lat, cache.Lon); }