public EncounterUpload(NotifyCollectionChangedWrapper<RiftEncounterDescriptor> encounters)
        {
            Encounters = encounters;
            InitializeComponent();

            _encounterListView.ItemsSource = Encounters;
        }
Beispiel #2
0
        public NotifyCollectionChangedWrapper <T> SetGenericList <T>(IEnumerable <T> list)
        {
            var collectionWrapper = new NotifyCollectionChangedWrapper <T>(new ObservableCollection <T>(list));

            GenericList = new ListCollectionView(collectionWrapper);
            return(collectionWrapper);
        }
 public RiftBuddyViewModel(RiftDataStore dataStore, IRiftParser parser, RiftSpellRegistry spellRegistry)
 {
     _encounters = new NotifyCollectionChangedWrapper<RiftEncounterDescriptor>(_encountersInner);
     _summary = new NotifyCollectionChangedWrapper<EntitySummaryViewModel>(_summaryInner);
     _playerSummary = new NotifyCollectionChangedWrapper<SpellSummaryViewModel>(_playerSummaryInner);
     _dataStore = dataStore;
     _parser = parser;
     _spellRegistry = spellRegistry;
     _dataStore.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(_encounterList_CollectionChanged);
 }
Beispiel #4
0
        private void uxMainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            //repository = new FakeRatesRepository();
            repository   = new StooqService();
            items        = new ObservableCollection <StockRate>();
            ItemsWrapper = new NotifyCollectionChangedWrapper <StockRate>(items);

            // Create a timer that adds an element to the list every two seconds *on seperate threads*
            timer          = new System.Timers.Timer(1000);
            timer.Elapsed +=
                new System.Timers.ElapsedEventHandler
                (
                    (timerSender, timerArgs) =>
                    ThreadPool.QueueUserWorkItem
                    (
                        new WaitCallback
                        (
                            AddRate
                            //(obj) => ItemsWrapper.Add(repository.GetRate())
                        )
                    )
                );
            timer.Start();
        }
Beispiel #5
0
        private void uxMainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            //repository = new FakeRatesRepository();
            repository = new StooqService();
            items = new ObservableCollection<StockRate>();
            ItemsWrapper = new NotifyCollectionChangedWrapper<StockRate>(items);

            // Create a timer that adds an element to the list every two seconds *on seperate threads*
            timer = new System.Timers.Timer(1000);
            timer.Elapsed +=
                new System.Timers.ElapsedEventHandler
                    (
                    (timerSender, timerArgs) =>
                        ThreadPool.QueueUserWorkItem
                            (
                            new WaitCallback
                                (
                                AddRate
                        //(obj) => ItemsWrapper.Add(repository.GetRate())
                                )
                            )
                    );
            timer.Start();
        }