private async void Refresh() { // 刷新版块列表 replyProgressBar.Visibility = Visibility.Visible; cvsForumGroups.Source = await DataSource.GetForumGroupsAsync(); cvsFullForumGroups.Source = await DataSource.GetFullForumGroupsAsync(); replyProgressBar.Visibility = Visibility.Collapsed; // 刷新顶部状态栏 Account account = AccountSettings.GetDefault(); string accountName = account != null ? account.Username : "******"; if (accountName.Length > 3) { accountName = string.Format("{0}*{1}", accountName.Substring(0, 2), accountName.Last()); } if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar")) { StatusBar statusBar = StatusBar.GetForCurrentView(); statusBar.ProgressIndicator.Text = string.Format("Hi!PDA > {0}", accountName); await statusBar.ProgressIndicator.ShowAsync(); } }
private async void Refresh() { // 刷新版块列表 replyProgressBar.Visibility = Visibility.Visible; cvsForumGroups.Source = await DataSource.GetForumGroupsAsync(); replyProgressBar.Visibility = Visibility.Collapsed; // 刷新顶部状态栏 StatusBar statusBar = StatusBar.GetForCurrentView(); Account account = AccountSettings.GetDefault(); string accountName = account != null ? account.Username : "******"; if (accountName.Length > 3) { accountName = string.Format("{0}*{1}", accountName.Substring(0, 2), accountName.Last()); } statusBar.ProgressIndicator.Text = string.Format("Hi!PDA > {0}", accountName); await statusBar.ProgressIndicator.ShowAsync(); }