//Update the total items count private async Task UpdateTotalItemsCount(List <TableFeeds> LoadTableFeeds, List <TableItems> LoadTableItems, bool Silent, bool EnableUI) { try { //Set the total item count AppVariables.CurrentTotalItemsCount = await ProcessItemLoad.DatabaseToCount(LoadTableFeeds, LoadTableItems, Silent, EnableUI); await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { try { //Check the total item count if (AppVariables.CurrentTotalItemsCount > 0) { txt_AppInfo.Text = ApiMessageError + AppVariables.CurrentTotalItemsCount + " feeds"; txt_NewsScrollInfo.Visibility = Visibility.Collapsed; } else { txt_AppInfo.Text = ApiMessageError + "No feeds"; txt_NewsScrollInfo.Text = "It seems like you don't have any feeds added to your account, please add some feeds to start loading your feeds and click on the refresh button above."; txt_NewsScrollInfo.Visibility = Visibility.Visible; } } catch { } }); } catch { } }
//Update the total items count private async Task UpdateTotalItemsCount(List <TableFeeds> LoadTableFeeds, List <TableItems> LoadTableItems, bool Silent, bool EnableUI) { try { //Set the total item count AppVariables.CurrentTotalItemsCount = await ProcessItemLoad.DatabaseToCount(LoadTableFeeds, LoadTableItems, Silent, EnableUI); Device.BeginInvokeOnMainThread(() => { try { //Check the total item count if (AppVariables.CurrentTotalItemsCount > 0) { txt_AppInfo.Text = ApiMessageError + AppVariables.CurrentTotalItemsCount + " feeds"; txt_NewsScrollInfo.IsVisible = false; } else { txt_AppInfo.Text = ApiMessageError + "No feeds"; txt_NewsScrollInfo.Text = "It seems like you don't have any feeds added to your account, please add some feeds to start loading your feeds and click on the refresh button above."; txt_NewsScrollInfo.IsVisible = true; } } catch { } }); } catch { } }
//Update the total items count private async Task UpdateTotalItemsCount(List <TableFeeds> LoadTableFeeds, List <TableItems> LoadTableItems, bool Silent, bool EnableUI) { try { //Set the total item count AppVariables.CurrentTotalItemsCount = await ProcessItemLoad.DatabaseToCount(LoadTableFeeds, LoadTableItems, Silent, EnableUI); await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { try { //Check the total item count if (AppVariables.CurrentTotalItemsCount > 0) { txt_AppInfo.Text = ApiMessageError + AppVariables.CurrentTotalItemsCount + " items"; txt_NewsScrollInfo.Visibility = Visibility.Collapsed; button_StatusCurrentItem.Visibility = Visibility.Visible; } else { txt_AppInfo.Text = ApiMessageError + "No items"; txt_NewsScrollInfo.Text = "It seems like you don't have any starred items added to your account, please add some starred items to start loading your items and click on the refresh button above."; txt_NewsScrollInfo.Visibility = Visibility.Visible; button_StatusCurrentItem.Visibility = Visibility.Collapsed; } //Update the current item count Int32 HeaderTargetSize = Convert.ToInt32(stackpanel_Header.Tag); Int32 HeaderCurrentSize = Convert.ToInt32(stackpanel_Header.Height); if (HeaderCurrentSize == HeaderTargetSize || AppVariables.CurrentTotalItemsCount == 0) { textblock_StatusCurrentItem.Text = textblock_StatusCurrentItem.Tag.ToString(); } else { textblock_StatusCurrentItem.Text = textblock_StatusCurrentItem.Tag.ToString() + "/" + AppVariables.CurrentTotalItemsCount; } } catch { } }); } catch { } }
//Update the total items count private async Task UpdateTotalItemsCount(List <TableFeeds> LoadTableFeeds, List <TableItems> LoadTableItems, bool Silent, bool EnableUI) { try { //Set the total item count AppVariables.CurrentTotalItemsCount = await ProcessItemLoad.DatabaseToCount(LoadTableFeeds, LoadTableItems, Silent, EnableUI); Device.BeginInvokeOnMainThread(() => { try { //Check the total item count if (AppVariables.CurrentTotalItemsCount > 0) { txt_AppInfo.Text = ApiMessageError + AppVariables.CurrentTotalItemsCount + " items"; txt_NewsScrollInfo.IsVisible = false; button_StatusCurrentItem.IsVisible = true; } else { txt_AppInfo.Text = ApiMessageError + "No items"; txt_NewsScrollInfo.Text = "It seems like you don't have any starred items added to your account, please add some starred items to start loading your items and click on the refresh button above."; txt_NewsScrollInfo.IsVisible = true; button_StatusCurrentItem.IsVisible = false; } //Update the current item count if (stackpanel_Header.IsVisible || AppVariables.CurrentTotalItemsCount == 0) { label_StatusCurrentItem.Text = AppVariables.CurrentViewItemsCount.ToString(); } else { label_StatusCurrentItem.Text = AppVariables.CurrentViewItemsCount + "/" + AppVariables.CurrentTotalItemsCount; } } catch { } }); } catch { } }
//Update the total items count private async Task UpdateTotalItemsCount(List <TableFeeds> LoadTableFeeds, List <TableItems> LoadTableItems, bool Silent, bool EnableUI) { try { //Set the total item count AppVariables.CurrentTotalItemsCount = await ProcessItemLoad.DatabaseToCount(LoadTableFeeds, LoadTableItems, Silent, EnableUI); await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { try { //Check the total item count if (AppVariables.CurrentTotalItemsCount > 0) { txt_AppInfo.Text = AppVariables.CurrentTotalItemsCount + " results"; txt_NewsScrollInfo.Visibility = Visibility.Collapsed; button_StatusCurrentItem.Visibility = Visibility.Visible; } else { txt_AppInfo.Text = "No results"; txt_NewsScrollInfo.Inlines.Clear(); txt_NewsScrollInfo.Inlines.Add(new Run() { Text = "No search results could be found for " }); txt_NewsScrollInfo.Inlines.Add(new Run() { Text = vSearchTerm, Foreground = new SolidColorBrush((Color)Application.Current.Resources["SystemAccentColor"]) }); txt_NewsScrollInfo.Inlines.Add(new Run() { Text = " in " }); txt_NewsScrollInfo.Inlines.Add(new Run() { Text = vSearchFeedTitle, Foreground = new SolidColorBrush((Color)Application.Current.Resources["SystemAccentColor"]) }); txt_NewsScrollInfo.Visibility = Visibility.Visible; button_StatusCurrentItem.Visibility = Visibility.Collapsed; //Focus on the text box to open keyboard txtbox_Search.IsEnabled = false; txtbox_Search.IsEnabled = true; txtbox_Search.Focus(FocusState.Programmatic); } //Update the current item count Int32 HeaderTargetSize = Convert.ToInt32(stackpanel_Header.Tag); Int32 HeaderCurrentSize = Convert.ToInt32(stackpanel_Header.Height); if (HeaderCurrentSize == HeaderTargetSize || AppVariables.CurrentTotalItemsCount == 0) { textblock_StatusCurrentItem.Text = textblock_StatusCurrentItem.Tag.ToString(); } else { textblock_StatusCurrentItem.Text = textblock_StatusCurrentItem.Tag.ToString() + "/" + AppVariables.CurrentTotalItemsCount; } } catch { } }); } catch { } }
//Update the total item count private async Task UpdateTotalItemsCount(List <TableFeeds> LoadTableFeeds, List <TableItems> LoadTableItems, bool Silent, bool EnableUI) { try { //Set the total item count AppVariables.CurrentTotalItemsCount = await ProcessItemLoad.DatabaseToCount(LoadTableFeeds, LoadTableItems, Silent, EnableUI); if (AppVariables.CurrentTotalItemsCount > 0) { txt_AppInfo.Text = ApiMessageError + AppVariables.CurrentTotalItemsCount + " items"; txt_NewsScrollInfo.IsVisible = false; button_StatusCurrentItem.IsVisible = true; } else { txt_AppInfo.Text = "No results"; Span text1 = new Span { Text = "No search results could be found for " }; Span text2 = new Span { Text = vSearchTerm }; text2.SetDynamicResource(Span.TextColorProperty, "ApplicationAccentLightColor"); Span text3 = new Span { Text = " in " }; Span text4 = new Span { Text = vSearchFeedTitle }; text4.SetDynamicResource(Span.TextColorProperty, "ApplicationAccentLightColor"); FormattedString formattedString = new FormattedString(); formattedString.Spans.Add(text1); formattedString.Spans.Add(text2); formattedString.Spans.Add(text3); formattedString.Spans.Add(text4); txt_NewsScrollInfo.FormattedText = formattedString; txt_NewsScrollInfo.IsVisible = true; button_StatusCurrentItem.IsVisible = false; //Focus on the text box to open keyboard txtbox_Search.IsEnabled = false; txtbox_Search.IsEnabled = true; txtbox_Search.Focus(); } //Update the current item count if (stackpanel_Header.IsVisible || AppVariables.CurrentTotalItemsCount == 0) { label_StatusCurrentItem.Text = AppVariables.CurrentViewItemsCount.ToString(); } else { label_StatusCurrentItem.Text = AppVariables.CurrentViewItemsCount + "/" + AppVariables.CurrentTotalItemsCount; } } catch { } }