public void OnMapClose() { CancelAsyncTasks(); IsStarted = false; Matrix.ClearAllLevels(); lock (FailedLoads) { FailedLoads.Clear(); RaiseEmptyTileError = false; } }
/// <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"); } }
/// <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"); } }
/// <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"); } }