private void buttonEditSource_Click(object sender, EventArgs e) { MapDataSource source = (MapDataSource)comboBoxMapSource.SelectedItem; SettingsEditDialog dialog = new SettingsEditDialog(source); dialog.ShowDialog(this); }
/// <summary> /// Sets the map data source. /// </summary> /// <param name="source">The source.</param> public void SetMapDataSource(MapDataSource source) { _mapDataSource = source; _minZoom = source.MinZoom; _maxZoom = source.MaxZoom; _partMap.SetMapSource(source); ResetView(); }
private void UpdateMapDataSource() { int index = Settings.Default.MapDataSourceIndex; List <MapDataSource> list = Settings.Default.MapDataSourceList; MapDataSource source = null; if (index >= 0 && index < list.Count) { source = Settings.Default.MapDataSourceList[index]; } mapView.SetMapDataSource(source); }
/// <summary> /// Initializes a new instance of the <see cref="SettingsEditDialog"/> class. /// </summary> /// <param name="source">The source.</param> public SettingsEditDialog(MapDataSource source) { _source = source; InitializeComponent(); string _format = _source.Format; _format = _format.Replace("{0}", "{zoom}"); _format = _format.Replace("{1}", "{x}"); _format = _format.Replace("{2}", "{y}"); textBoxName.Text = _source.Name; textBoxFormat.Text = _format; textBoxLocalPath.Text = _source.LocalPath; numEditMaxZoom.Value = _source.MaxZoom; numEditMinZoom.Value = _source.MinZoom; textBoxName.Name = _source.Name; }
public void SetMapSource(MapDataSource source) { _imageProvider.SetMapSource(source); }
/// <summary> /// Initializes a new instance of the <see cref="ImageCacheWeb"/> class. /// </summary> /// <param name="mapDataSource">The map data source.</param> /// <param name="callback">The callback for ready images.</param> public ImageCacheWeb(MapDataSource mapDataSource, WebStreamReadyCallback callback) { _mapDataSource = mapDataSource; _callback = callback; }
/// <summary> /// Sets the map source. /// </summary> /// <param name="mapDataSource">The map data source.</param> public void SetMapSource(MapDataSource mapDataSource) { imageCacheDisk = new ImageCacheDisk(mapDataSource.LocalPath, DiskStreamReady); imageCacheWeb = new ImageCacheWeb(mapDataSource, WebStreamReady); imageCacheMemory = new ImageCacheMemory(); }