Ejemplo n.º 1
0
        public override void SelectedTileChanged(IMap_Base sender, SelectedTileChangedEventArgs e)
        {
            MapLocation pt = e.MapPosition;

            Text = "c: " + pt.Col + " r: " + pt.Row;             // I don't think this actually prints anywhere.

            var hWidth  = DrawContentService.HWidth;
            var hHeight = DrawContentService.HHeight;

            int xc = (pt.Col - pt.Row) * hWidth;
            int yc = (pt.Col + pt.Row) * hHeight;

            _selected.Reset();
            _selected.AddLine(
                xc, yc,
                xc + hWidth, yc + hHeight);
            _selected.AddLine(
                xc + hWidth, yc + hHeight,
                xc, yc + 2 * hHeight);
            _selected.AddLine(
                xc, yc + 2 * hHeight,
                xc - hWidth, yc + hHeight);
            _selected.CloseFigure();

            ViewDrag(null, null);
            Refresh();
        }
Ejemplo n.º 2
0
        private void TileChange(IMap_Base mapFile, SelectedTileChangedEventArgs e)         // MapLocation newCoords)
        {
            MapLocation newCoords = e.MapPosition;
            var         dragStart = new Point(
                newCoords.Col,
                newCoords.Row);

            SetDrag(dragStart, DragEnd);

            MainWindow.Instance.StatusBarPrintPosition(newCoords.Col, newCoords.Row);
        }
Ejemplo n.º 3
0
 public virtual void SelectedTileChanged(IMap_Base sender, SelectedTileChangedEventArgs e)
 {
     Refresh();
 }
Ejemplo n.º 4
0
 public override void SelectedTileChanged(IMap_Base sender, SelectedTileChangedEventArgs e)
 {
     Text = string.Format(
         "Position\nc:{0} r:{1}",
         e.MapPosition.Col, e.MapPosition.Row);
 }
Ejemplo n.º 5
0
 public override void SelectedTileChanged(IMap_Base sender, SelectedTileChangedEventArgs e)
 {
     _mapTile = (XCMapTile)e.SelectedTile;
     _lastLoc = e.MapPosition;
     Refresh();
 }