示例#1
0
        public void OnMapClose()
        {
            CancelAsyncTasks();
            IsStarted = false;

            Matrix.ClearAllLevels();

            lock (FailedLoads)
            {
                FailedLoads.Clear();
                RaiseEmptyTileError = false;
            }
        }
示例#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");
            }
        }
示例#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");
            }
        }
示例#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");
            }
        }