public TileSelection(string name, BingMap.PixelSelection selection, TileLayer tilelayer, bool aerial, bool road) { this.Name = name; this.Level = tilelayer.ZoomLevel; this.NW = tilelayer.GetEnclosingTile(selection.TopLeft); this.SE = tilelayer.GetEnclosingTile(selection.BottomRight); this.HasAerial = aerial; this.HasRoad = road; this.MaxLevel = tilelayer.ZoomLevel; }
private void DrawSelectionTiles(Border border, TileLayer.PixelPair nw, TileLayer.PixelPair se) { var nwpos = this.tilelayer.GetClippedScreenPosition(nw); var sepos = this.tilelayer.GetClippedScreenPosition(se); if (!(nwpos.HasValue && sepos.HasValue)) return; border.Margin = new Thickness(nwpos.Value.X, nwpos.Value.Y, 0, 0); border.Width = sepos.Value.X - nwpos.Value.X; border.Height = sepos.Value.Y - nwpos.Value.Y; if (border.Visibility == System.Windows.Visibility.Collapsed) border.Visibility = System.Windows.Visibility.Visible; }
public void Start(TileLayer.PixelPair pair) { this.Active = true; this.begins = pair; }
public void Move(TileLayer.PixelPair pair) { this.ends = pair; }
public void End(TileLayer.PixelPair pair) { this.Move(pair); this.Active = false; }