public p_Player(IItemsProvider<IAudio> vkProvider, IItemsProvider<IAudio> cachedProvider, Action whenLoginClicked, string userFirstName, bool cacheOnly) { __WhenLoginClicked = whenLoginClicked; __CacheOnly = cacheOnly; if (!__CacheOnly) __VkProvider = new AsyncVirtualizingCollection<AudioModel>( new AudioModelProviderWrapper(vkProvider, () => __CurrentActive), PAGE_SIZE, PAGE_TIMEOUT); __CachedProvider = new ItemsProviderCollectionWrapper<AudioModel>( new AudioModelProviderWrapper(cachedProvider, () => __CurrentActive)); if (__CacheOnly) IsCacheMode = true; InitializeComponent(); DataContext = this; AudioList = GetModelsList(__CacheOnly); PlayerTitle = String.Format("{0}'s music", userFirstName); }
public VirtualDataCollection(IItemsProvider<IFreeDocument> data, int pageTimeout = 30000) : base() { VirtualData = new VirtualizingCollection<IFreeDocument>(data,pageTimeout); data.AlreadyGetSize += (s, e) => OnPropertyChanged("Count"); }
/// <summary> /// Initializes a new instance of the <see cref="VirtualizingCollection<T>"/> class. /// </summary> /// <param name="itemsProvider">The items provider.</param> /// <param name="pageSize">Size of the page.</param> /// <param name="pageTimeout">The page timeout.</param> public VirtualizingCollection(IItemsProvider <T> itemsProvider, int pageSize, int pageTimeout) { _itemsProvider = itemsProvider; _pageSize = pageSize; _pageTimeout = pageTimeout; }
/// <summary> /// Initializes a new instance of the <see cref="VirtualizingCollection<T>"/> class. /// </summary> /// <param name="itemsProvider">The items provider.</param> /// <param name="pageSize">Size of the page.</param> public VirtualizingCollection(IItemsProvider <T> itemsProvider, int pageSize) { _itemsProvider = itemsProvider; _pageSize = pageSize; }
/// <summary> /// Initializes a new instance of the <see cref="VirtualizingCollection<T>"/> class. /// </summary> /// <param name="itemsProvider">The items provider.</param> public VirtualizingCollection(IItemsProvider <T> itemsProvider) { this._itemsProvider = itemsProvider; // _itemsProvider.AlreadyGetSize += this.ItemsProviderAlreadyGetSize; }
/// <summary> /// Initializes a new instance of the <see cref="VirtualizingCollection<T>"/> class. /// </summary> /// <param name="itemsProvider">The items provider.</param> public VirtualizingCollection(IItemsProvider <T> itemsProvider) { _itemsProvider = itemsProvider; }
public AsyncVirtualizingCollection(IItemsProvider <T> itemsProvider) : base(itemsProvider) { _synchronizationContext = SynchronizationContext.Current; }
public AsyncVirtualizingCollection(IItemsProvider <T> itemsProvider, int pageSize, int pageTimeout) : base(itemsProvider, pageSize, pageTimeout) { _synchronizationContext = SynchronizationContext.Current; }
/// <summary> /// Initializes a new instance of the <see cref="VirtualizingCollection<T>"/> class. /// </summary> /// <param name="itemsProvider">The items provider.</param> protected VirtualizingCollection(IItemsProvider <T> itemsProvider) { this.itemsProvider = itemsProvider; }
/// <summary> /// Initializes a new instance of the <see cref="VirtualizingCollection<T>"/> class. /// </summary> /// <param name="itemsProvider">The items provider.</param> /// <param name="pageSize">Size of the page.</param> protected VirtualizingCollection(IItemsProvider <T> itemsProvider, int pageSize) { this.itemsProvider = itemsProvider; this.pageSize = pageSize; }
/// <summary> /// Initializes a new instance of the <see cref="VirtualizingCollection<T>" /> class. /// </summary> /// <param name="itemsProvider">The items provider.</param> public VirtualizingCollection(IItemsProvider <T> itemsProvider) { ItemsProvider = itemsProvider; ItemsProvider.PropertyChanged += _itemsProvider_PropertyChanged; }
/// <summary> /// Initializes a new instance of the <see cref="VirtualizingCollection<T>" /> class. /// </summary> /// <param name="itemsProvider">The items provider.</param> /// <param name="pageSize">Size of the page.</param> public VirtualizingCollection(IItemsProvider <T> itemsProvider, int pageSize) { ItemsProvider = itemsProvider; ItemsProvider.PropertyChanged += _itemsProvider_PropertyChanged; PageSize = pageSize; }
public AsyncVirtualCollection(IItemsProvider <T> itemsProvider, int pageSize) : base(itemsProvider, pageSize) { _synchronizationContext = SynchronizationContext.Current; }