int pageIndex = 1 ){ this .FullTextList = models; this .Dat

时间:2022-03-03 02:16:32

public void SetSource(ObservableCollection<TestCaseListViewModel> models, int itemCount, bool isMemoryPager, int pageIndex = 1) { this.FullTextList = models; this.Data = new PageDataManager<TestCaseListViewModel>(FullTextList, itemCount, isMemoryPager, this.PagerFullTask, PageSize, pageIndex); this.Data.OpenWaitingWindow = OpenWaitingWindow; this.Data.CloseWaitingWindow = CloseWaitingWindow; this.Data.Owner = this; this.DataContext = Data; this.TestCaseDataGrid.DataContext = Data.PagerSource; fulltextPager.Visibility = itemCount == 0 ? Visibility.Collapsed : Visibility.Visible; prePage.Content = "<<"; btnGoLastPage.Visibility = Data.Total == 1 ? System.Windows.Visibility.Collapsed : System.Windows.Visibility.Visible; }