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

            CurrentTreeLevelDepth = nodeSource.Depth;
        }
コード例 #2
0
 public BusyIndicator()
 {
     InitializeComponent();
     DummyItems = new RemoveTrackingObservableCollection <DummyItem>(TimeSpan.FromSeconds(1), new[]
     {
         new DummyItem()
     });
     _tokenSource = new CancellationTokenSource();
 }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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();
 }
コード例 #6
0
 public GroupAndSortDefinitionsViewModel()
 {
     Definitions = new RemoveTrackingObservableCollection <GroupDefinitionsViewModel>(TimeSpan.FromSeconds(0.4));
     Definitions.CollectionChanged += DefinitionsOnCollectionChanged;
     Definitions.Add(new GroupDefinitionsViewModel());
 }