Exemplo n.º 1
0
        public void OnMapClose()
        {
            CancelAsyncTasks();
            IsStarted = false;

            Matrix.ClearAllLevels();

            lock (FailedLoads)
            {
                FailedLoads.Clear();
                RaiseEmptyTileError = false;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// reloads map
        /// </summary>
        public void ReloadMap()
        {
            if (IsStarted)
            {
                Debug.WriteLine("------------------");

                lock (tileLoadQueue)
                {
                    tileLoadQueue.Clear();
                }

                Matrix.ClearAllLevels();

                lock (FailedLoads)
                {
                    FailedLoads.Clear();
                    RaiseEmptyTileError = true;
                }

                if (OnNeedInvalidation != null)
                {
                    OnNeedInvalidation();
                }

                UpdateBounds();
            }
            else
            {
                throw new Exception("Please, do not call ReloadMap before form is loaded, it's useless");
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// reloads map
        /// </summary>
        public void ReloadMap()
        {
            if (IsStarted)
            {
                Debug.WriteLine("------------------");

                okZoom       = 0;
                skipOverZoom = 0;

                CancelAsyncTasks();

                Matrix.ClearAllLevels();

                lock (FailedLoads)
                {
                    FailedLoads.Clear();
                    RaiseEmptyTileError = true;
                }

                Refresh.Set();

                UpdateBounds();
            }
            else
            {
                throw new Exception("Please, do not call ReloadMap before form is loaded, it's useless");
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// reloads map
        /// </summary>
        public void ReloadMap()
        {
            if (IsStarted)
            {
                okZoom       = 0;
                skipOverZoom = 0;

                Monitor.Enter(tileLoadQueue);
                try
                {
                    tileLoadQueue.Clear();
                }
                finally
                {
                    Monitor.Exit(tileLoadQueue);
                }

                Matrix.ClearAllLevels();

                lock (FailedLoads)
                {
                    FailedLoads.Clear();
                    RaiseEmptyTileError = true;
                }

                Refresh.Set();

                UpdateBounds();
            }
            else
            {
                throw new Exception("Please, do not call ReloadMap before form is loaded, it's useless");
            }
        }