public GpsSetup(GPSIcon gpsIcon, GPSTrackLine gpsTrackLine, GPSGeoFence geoFence) { m_gpsIcon = gpsIcon; m_gpsTrackLine = gpsTrackLine; m_gpsFence = geoFence; InitializeComponent(); if (m_gpsIcon != null) { if (m_gpsIcon.m_RenderInfo.bPOI) { checkBoxDistanceFromPOI.Enabled = true; checkBoxDistanceFromPOI.Text = "Distance && bearing to " + m_gpsIcon.m_RenderInfo.sDescription + " from all Gps"; checkBoxDistanceFromPOI.Checked = m_gpsIcon.m_bSignalDistance; checkBoxDistanceToPOI.Enabled = false; checkBoxDistanceToPOI.Text = "Distance from " + m_gpsIcon.m_RenderInfo.sDescription + " to all POIs"; checkBoxTrackHeading.Enabled = false; checkBoxTrackLine.Enabled = false; } else { checkBoxDistanceFromPOI.Enabled = false; checkBoxDistanceFromPOI.Text = "Distance && bearing to " + m_gpsIcon.m_RenderInfo.sDescription + " from all Gps"; checkBoxDistanceToPOI.Enabled = true; checkBoxDistanceToPOI.Text = "Distance from " + m_gpsIcon.m_RenderInfo.sDescription + " to all POIs"; checkBoxDistanceToPOI.Checked = m_gpsIcon.m_bSignalDistance; } checkBoxInformationText.Checked = m_gpsIcon.m_bShowInfo; checkBoxTrackHeading.Checked = m_gpsIcon.m_bTrackHeading; checkBoxTrackLine.Checked = m_gpsIcon.m_bTrackLine; labelTitle.Text = "Set options for " + m_gpsIcon.m_RenderInfo.sDescription; } else if (m_gpsTrackLine != null) { checkBoxInformationText.Checked = m_gpsTrackLine.m_bShowInfo; checkBoxTrackHeading.Enabled = false; checkBoxTrackLine.Enabled = false; checkBoxDistanceFromPOI.Text = "Distance && bearing to " + m_gpsTrackLine.m_sDescription + " from all Gps"; checkBoxDistanceFromPOI.Enabled = false; checkBoxDistanceToPOI.Text = "Distance from " + m_gpsTrackLine.m_sDescription + " to all POIs"; checkBoxDistanceToPOI.Enabled = false; labelTitle.Text = "Set options for " + m_gpsIcon.m_RenderInfo.sDescription; } else if (m_gpsFence != null) { checkBoxInformationText.Checked = m_gpsFence.m_bShowInfo; checkBoxTrackHeading.Enabled = false; checkBoxTrackLine.Enabled = false; checkBoxDistanceFromPOI.Text = "Distance && bearing to " + m_gpsFence.m_sDescription + " from all Gps"; checkBoxDistanceFromPOI.Enabled = false; checkBoxDistanceToPOI.Text = "Distance from " + m_gpsFence.m_sDescription + " to all POIs"; checkBoxDistanceToPOI.Enabled = false; labelTitle.Text = "Set options for " + m_gpsFence.m_sDescription; } }
public GeoFenceSetup(GPSGeoFence gpsGeoFence, GpsTrackerPlugin Plugin) { m_GpsGeoFence = gpsGeoFence; m_Plugin = Plugin; InitializeComponent(); textBoxSoundFile.Text = GpsTrackerPlugin.m_sPluginDirectory + "\\GeoFence.wav"; textBoxSoundFileOut.Text = GpsTrackerPlugin.m_sPluginDirectory + "\\GeoFenceOut.wav"; comboBoxGeoFenceSource.Items.Add("All Gps Sources"); for (int i = 0; i < m_Plugin.gpsTracker.m_gpsSourceList.Count; i++) { GPSSource gpsSource = (GPSSource)m_Plugin.gpsTracker.m_gpsSourceList[i]; if (gpsSource.sType != "POI" && gpsSource.sType != "GeoFence" && gpsSource.bWaypoints == false && gpsSource.bSetup) { comboBoxGeoFenceSource.Items.Add(gpsSource.sDescription); } } comboBoxGeoFenceSource.Text = "All Gps Sources"; }