Esempio n. 1
0
        private void buttonEditSource_Click(object sender, EventArgs e)
        {
            MapDataSource source = (MapDataSource)comboBoxMapSource.SelectedItem;

            SettingsEditDialog dialog = new SettingsEditDialog(source);

            dialog.ShowDialog(this);
        }
Esempio n. 2
0
        /// <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();
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        /// <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;
        }
Esempio n. 5
0
 public void SetMapSource(MapDataSource source)
 {
     _imageProvider.SetMapSource(source);
 }
Esempio n. 6
0
 /// <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;
 }
Esempio n. 7
0
		/// <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();
		}