public MainViewModel() { GetCurrentTime(); SetDirectory(); imageLayer = new CustomMapDataProvider(); FillComboBox(); }
protected internal virtual void UpdateLayerImage(SCMap map, MapImageDataProviderBase provider) { if (!MiniMap) { var layer = new ImageLayer() { DataProvider = provider, EnableAntialiasing = DevExpress.Utils.DefaultBoolean.True, }; if (Transparency.HasValue) { layer.Transparency = Transparency.Value; } if (!string.IsNullOrWhiteSpace(Name)) { layer.Name = Name; } map.Map.Layers.Add(layer); map.CurrentLayer = layer; } else { var dataProvider = provider as MapDataProviderBase ?? throw new Exception("MiniMap does not support selected data provider."); var layerMini = new MiniMapImageTilesLayer() { DataProvider = dataProvider }; if (!string.IsNullOrWhiteSpace(Name)) { layerMini.Name = Name; } if (map.Map.MiniMap == null) { throw new Exception("Mini map is not created."); } map.Map.MiniMap.Layers.Add(layerMini); map.CurrentLayer = layerMini; } }