Ejemplo n.º 1
0
 private void srv_GetOrderContentCompleted(object sender, LotterySrv.GetOrderContentCompletedEventArgs e)
 {
     border_Processing.Visibility = Visibility.Collapsed;
     if (isTopTen)
         e.Result.UserID = "匿名";
     gridMain.DataContext = e.Result;
 }
Ejemplo n.º 2
0
 void srv_UserList_GetLowerListDataCompleted(object sender, LotterySrv.GetLowerListDataCompletedEventArgs e)
 {
     if (e.Result.Count!=0)
     {
         obLowerData = e.Result as ObservableCollection<LowerListData>;
         PageSum.GameScores = obLowerData.Take(18).Sum(p => p.GameScores);
         PageSum.EnableScores = obLowerData.Take(18).Sum(p => p.EnableScores);
         PageSum.DisableScores = obLowerData.Take(18).Sum(p => p.DisableScores);
         TotalSum.GameScores = obLowerData.Sum(p => p.GameScores);
         TotalSum.EnableScores = obLowerData.Sum(p => p.EnableScores);
         TotalSum.DisableScores = obLowerData.Sum(p => p.DisableScores);
         obLowerData.Add(PageSum);
         obLowerData.Add(TotalSum);
         currentPos = 0;
         PagedCollectionView pageView = new PagedCollectionView(obLowerData);
         pageView.PageSize = 20;
         dpList.PageSize = 20;
         dpList.Source = pageView;
         dgList.ItemsSource = pageView;
     }
     gridLoading.Visibility = Visibility.Collapsed;
 }
Ejemplo n.º 3
0
 void srv_news_GetNewsInfoCompleted(object sender, LotterySrv.GetNewsInfoCompletedEventArgs e)
 {
     NewsStrings = e.Result.ToList();
     this.newsStackTop = 0.0;
     this.posItem = 0;
     if (NewsStrings.Count >= 1)
     {
         NewsItem item;
         this.stackNews.Children.Clear();
         this.stackNews.Width = this.news_list.ActualWidth;
         foreach (string str in NewsStrings)
         {
             item = new NewsItem();
             item.Margin = new Thickness(0.0, 2.0, 0.0, 0.0);
             item.SetNewsString(str);
             this.stackNews.Children.Add(item);
         }
         this.stackNews.UpdateLayout();
         this.newsHeight = this.stackNews.ActualHeight;
         if (this.newsHeight > this.news_list.ActualHeight)
         {
             foreach (string str in NewsStrings)
             {
                 item = new NewsItem();
                 item.Margin = new Thickness(0.0, 2.0, 0.0, 0.0);
                 item.SetNewsString(str);
                 this.stackNews.Children.Add(item);
             }
             this.showNewsListTimer.Start();
         }
         else
         {
             this.showNewsListTimer.Stop();
         }
     }
 }