private void AutoReload() { // Possibly, the last auto reload command have not completed. if (AsyncAction.IsPending || !IsAutoReloadChecked) { return; } // If the view is not visible, don't reload if (!IsVisibleUnbound || (_package != null && !_package.IsWindowActive())) { return; } // If it is in advanced filter, just do reload. if (ShowAdvancedFilter) { AsyncAction = new AsyncProperty(ReloadAsync()); } else { // TODO: auto scroll to last item in ascending order. AsyncAction = new AsyncProperty(AppendNewerLogsAsync()); } }
/// <summary> /// Reload first page of <seealso cref="ErrorGroupStats"/>. /// </summary> private void Reload() { if (!IsVisibleUnbound || (_package != null && !_package.IsWindowActive())) { return; } _groupStatsCollection.Clear(); _nextPageToken = null; ErrorHandlerUtils.HandleExceptionsAsync(LoadAsync); }
private async Task UpdateGroupAndEventAsync() { if (!IsVisibleUnbound || (_package != null && !_package.IsWindowActive())) { return; } IsControlEnabled = false; try { await UpdateEventGroupAsync(); await UpdateEventAsync(); } finally { IsControlEnabled = true; } }