Example #1
0
        protected BuildTreeNodeViewModel(IBuildTreeNode nodeSource)
        {
            NodeSource = nodeSource;
            Children   = new RemoveTrackingObservableCollection <BuildTreeNodeViewModel>(TimeSpan.FromSeconds(0.8));
            Children.CollectionChanged += ChildrenOnCollectionChanged;
            SetChildrenSorting(_currentSortingDefinition);

            CurrentTreeLevelDepth = nodeSource.Depth;
        }
 public BusyIndicator()
 {
     InitializeComponent();
     DummyItems = new RemoveTrackingObservableCollection <DummyItem>(TimeSpan.FromSeconds(1), new[]
     {
         new DummyItem()
     });
     _tokenSource = new CancellationTokenSource();
 }
Example #3
0
        public NotificationCenterViewModel()
        {
            _notificationViewModelFactory = new NotificationViewModelFactory();
            Notifications = new RemoveTrackingObservableCollection <NotificationViewModel>();
            Notifications.SortDescending(x => x.Timestamp);
            Notifications.CollectionChanged += Notifications_CollectionChanged;

            NewNotificationsCounter = new NewNotificationsCounterViewModel();
            ClearAllCommand         = new DelegateCommand(ClearAll);
        }
Example #4
0
        protected BuildTreeNodeViewModel(IBuildTreeNode nodeSource)
        {
            NodeSource = nodeSource;
            Children   = new RemoveTrackingObservableCollection <BuildTreeNodeViewModel>(TimeSpan.FromSeconds(0.8));
            Children.CollectionChanged += ChildrenOnCollectionChanged;
            SetChildrenSorting(_currentSortingDefinition);

            RemoveOneChildCommand = new DelegateCommand(RemoveOneChild);
            AddAndRemoveCommand   = new DelegateCommand(o => { RemoveOneChild(o); });
            HighlightCommand      = new DelegateCommand(Highlight);
        }
Example #5
0
 public SortingDefinitionsViewModel(GroupDefinition forGroupDefinition)
 {
     ForGroupDefinition = forGroupDefinition;
     Sortings           = new RemoveTrackingObservableCollection <SortingDefinitionViewModel>
     {
         new SortingDefinitionViewModel(forGroupDefinition, SortingDefinition.AlphabeticalDescending),
         new SortingDefinitionViewModel(forGroupDefinition, SortingDefinition.AlphabeticalAscending),
         new SortingDefinitionViewModel(forGroupDefinition, SortingDefinition.StatusAscending),
         new SortingDefinitionViewModel(forGroupDefinition, SortingDefinition.StatusDescending)
     };
     SelectedViewModel = Sortings.First();
 }
 public GroupAndSortDefinitionsViewModel()
 {
     Definitions = new RemoveTrackingObservableCollection <GroupDefinitionsViewModel>(TimeSpan.FromSeconds(0.4));
     Definitions.CollectionChanged += DefinitionsOnCollectionChanged;
     Definitions.Add(new GroupDefinitionsViewModel());
 }