示例#1
0
 public Jobs(CalendarViewModel calendar, NewsViewModel newsVm, MainViewModel mvm)
 {
     _mvm = mvm;
     _calendarViewModel = calendar;
     _newsViewModel = newsVm;
     _refreshCalendarInfo = new Task(RefreshCalendar);
     _refreshNewsInfo = new Task(RefreshNews);
     _incrementNews = new Task(IncrementNews);
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the MainViewModel class.
 /// </summary>
 public MainViewModel()
 {
     //  _driver.ConnectedStatusChanged += stat => ReaderStatus = stat;
     //_readerStatus = _driver.Connected;
     _newsViewModel = new NewsViewModel(this);
     _calendarViewModel = new CalendarViewModel(this);
     _jobs = new Jobs(_calendarViewModel, _newsViewModel, this);
     _jobs.DoJobs = true;
     AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
 }