Exemplo n.º 1
0
		public IndexesModel()
		{
			ModelUrl = "/indexes";
			GroupedIndexes =
				new ObservableCollection<IndexListItem>();
			ItemSelection = new ItemSelection<IndexItem>();
		}
Exemplo n.º 2
0
		public IndexesModel()
		{
			ModelUrl = "/indexes";
			ApplicationModel.Current.Server.Value.RawUrl = "databases/" +
																	   ApplicationModel.Current.Server.Value.SelectedDatabase.Value.Name +
																	   "/indexes";
			GroupedIndexes =
				new ObservableCollection<IndexListItem>();
			ItemSelection = new ItemSelection<IndexItem>();
		}
Exemplo n.º 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";
        }
Exemplo n.º 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";
        }
Exemplo n.º 5
0
 public ConflictsModel()
 {
     ConflictDocuments = new VirtualCollection<ViewableDocument>(new ConflictDocumentsCollectionSource(), 30, 30);
     ItemSelection = new ItemSelection<VirtualItem<ViewableDocument>>();
 }