Beispiel #1
0
 public Exporter(Stream stream, DocumentsVirtualCollectionSourceBase collectionSource,
                 IList <ColumnDefinition> columns)
 {
     this.stream           = stream;
     this.collectionSource = collectionSource;
     this.columns          = columns;
 }
Beispiel #2
0
        public DocumentsModel(DocumentsVirtualCollectionSourceBase collectionSource)
        {
            Documents = new VirtualCollection <ViewableDocument>(collectionSource, 30, 30, new KeysComparer <ViewableDocument>(v => v.Id ?? v.DisplayId, v => v.LastModified, v => v.MetadataOnly));
            Documents.PropertyChanged += HandleDocumentsPropertyChanged;

            collectionSource.CollectionChanged += delegate { HandleCollectionRefreshed(); };
            updateColumnsSamplingInvoker        = new SamplingInvoker(TimeSpan.FromSeconds(1));
            Documents.ItemsRealized            += (sender, e) => HandleItemsRealized(e.StartingIndex, e.Count);

            ItemSelection   = new ItemSelection <VirtualItem <ViewableDocument> >();
            DocumentsHaveId = true;

            Context = "Default";
        }
Beispiel #3
0
        public DocumentsModel(DocumentsVirtualCollectionSourceBase collectionSource)
        {
            Documents = new VirtualCollection<ViewableDocument>(collectionSource, 30, 30, new KeysComparer<ViewableDocument>(v => v.Id ?? v.DisplayId, v => v.LastModified, v => v.MetadataOnly));
            Documents.PropertyChanged += HandleDocumentsPropertyChanged;

            collectionSource.CollectionChanged += delegate { HandleCollectionRefreshed(); };
            updateColumnsSamplingInvoker = new SamplingInvoker(TimeSpan.FromSeconds(1));
            Documents.ItemsRealized += (sender, e) => HandleItemsRealized(e.StartingIndex, e.Count);

            ItemSelection = new ItemSelection<VirtualItem<ViewableDocument>>();
            DocumentsHaveId = true;

            Context = "Default";
        }
Beispiel #4
0
        public DocumentsModel(DocumentsVirtualCollectionSourceBase collectionSource)
        {
            Documents = new VirtualCollection<ViewableDocument>(collectionSource, 30, 30, new KeysComparer<ViewableDocument>(v => v.Id ?? v.DisplayId, v => v.LastModified, v => v.MetadataOnly));
            Documents.PropertyChanged += HandleDocumentsPropertyChanged;

            Observable.FromEventPattern<ItemsRealizedEventArgs>(h => Documents.ItemsRealized += h,
                                                                h => Documents.ItemsRealized -= h)
                .SampleResponsive(TimeSpan.FromSeconds(1))
                .ObserveOnDispatcher()
                .Subscribe(e => HandleItemsRealized(e.Sender, e.EventArgs));

            ItemSelection = new ItemSelection<VirtualItem<ViewableDocument>>();

            Context = "Default";
        }
Beispiel #5
0
        public DocumentsModel(DocumentsVirtualCollectionSourceBase collectionSource)
        {
            Documents = new VirtualCollection <ViewableDocument>(collectionSource, 30, 30, new KeysComparer <ViewableDocument>(v => v.Id ?? v.DisplayId, v => v.LastModified, v => v.MetadataOnly));
            Documents.PropertyChanged += HandleDocumentsPropertyChanged;

            Observable.FromEventPattern <ItemsRealizedEventArgs>(h => Documents.ItemsRealized += h,
                                                                 h => Documents.ItemsRealized -= h)
            .SampleResponsive(TimeSpan.FromSeconds(1))
            .ObserveOnDispatcher()
            .Subscribe(e => HandleItemsRealized(e.Sender, e.EventArgs));

            ItemSelection = new ItemSelection <VirtualItem <ViewableDocument> >();

            Context = "Default";
        }
 public Exporter(Stream stream, DocumentsVirtualCollectionSourceBase collectionSource,
                 IList<ColumnDefinition> columns)
 {
     this.stream = stream;
     this.collectionSource = collectionSource;
     this.columns = columns;
 }