예제 #1
0
        private void RefreshMap()
        {
            _map = null;

            Uri filePath = new Uri(@"Maps\" + _mapIndex + ".gif", UriKind.Relative);

            _map     = System.IO.File.Exists(@"Maps\" + _mapIndex + ".gif") ? new BitmapImage(filePath) : new BitmapImage(new Uri(@"Maps\0.gif", UriKind.Relative));
            _mapinfo = Map.Instance.GetMapInfo();

            if (_navigationEnabled)
            {
                _mapArr = _mapinfo.HasNavCoordinates ? _mapArr = new MapNavArr(_mapinfo.WaypointGroups, _mapinfo.Resolution) : null;
                System.Diagnostics.Debug.Print("Map ID: " + _mapIndex.ToString(CultureInfo.InvariantCulture));
            }
            else
            {
                _mapinfo.WaypointGroups.Clear();
                _mapinfo.HasNavCoordinates = false;
            }

            if (_selectedPathCoords != null)
            {
                _selectedPathCoords.Clear();
            }

            GetMarkers(@"Maps\" + _mapIndex + ".ini");
        }
예제 #2
0
        public void StopRecording()
        {
            _navigation.StopRecording();
            _mapinfo.WaypointGroups.Add(_navigation.Waypoints.ToList());
            _navigation.Waypoints = new ObservableCollection <Coordinate>();

            _mapinfo.HasNavCoordinates = true;

            _mapArr = _mapinfo.HasNavCoordinates ? _mapArr = new MapNavArr(_mapinfo.WaypointGroups, _mapinfo.Resolution) : null;
        }
예제 #3
0
        private void RefreshMap()
        {
            _map = null;

            Uri filePath = new Uri(@"Maps\" + _mapIndex + ".gif", UriKind.Relative);
            _map = System.IO.File.Exists(@"Maps\" + _mapIndex + ".gif") ? new BitmapImage(filePath) : new BitmapImage(new Uri(@"Maps\0.gif", UriKind.Relative));
            _mapinfo = Map.Instance.GetMapInfo();

            if (_navigationEnabled)
            {
                _mapArr = _mapinfo.HasNavCoordinates ? _mapArr = new MapNavArr(_mapinfo.WaypointGroups, _mapinfo.Resolution) : null;
                System.Diagnostics.Debug.Print("Map ID: " + _mapIndex.ToString(CultureInfo.InvariantCulture));

            } else
            {
                _mapinfo.WaypointGroups.Clear();
                _mapinfo.HasNavCoordinates = false;
            }

            if (_selectedPathCoords != null)
                _selectedPathCoords.Clear();

            GetMarkers(@"Maps\" + _mapIndex + ".ini");
        }
예제 #4
0
        public void StopRecording()
        {
            _navigation.StopRecording();
            _mapinfo.WaypointGroups.Add(_navigation.Waypoints.ToList());
            _navigation.Waypoints = new ObservableCollection<Coordinate>();

            _mapinfo.HasNavCoordinates = true;

            _mapArr = _mapinfo.HasNavCoordinates ? _mapArr = new MapNavArr(_mapinfo.WaypointGroups, _mapinfo.Resolution) : null;
        }