Esempio n. 1
0
 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;
 }
Esempio n. 2
0
        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;
        }
Esempio n. 3
0
 public void Start(TileLayer.PixelPair pair)
 {
     this.Active = true;
     this.begins = pair;
 }
Esempio n. 4
0
 public void Move(TileLayer.PixelPair pair)
 {
     this.ends = pair;
 }
Esempio n. 5
0
            public void End(TileLayer.PixelPair pair)
            {
                this.Move(pair);

                this.Active = false;
            }