예제 #1
0
        public NextEventsSummaryViewModel(IViewModelDependencies appCtx, IZetboxContext dataCtx, ViewModel parent)
            : base(appCtx, dataCtx, parent)
        {
            _fetchCache = new FetchCache(ViewModelFactory, DataContext, this);
            _syncContext = SynchronizationContext.Current;

            _timer = new System.Timers.Timer();
            _timer.Interval = 60 * 1000;
            _timer.Elapsed += new System.Timers.ElapsedEventHandler(_timer_Elapsed);
            _timer.Start();
        }
예제 #2
0
        public CalendarWorkspaceViewModel(IViewModelDependencies appCtx, IZetboxContext dataCtx, ViewModel parent, Func<ReportingHost> rptFactory)
            : base(appCtx, dataCtx, parent)
        {
            if (dataCtx.IsolationLevel != ContextIsolationLevel.MergeQueryData) throw new ArgumentOutOfRangeException("dataCtx", string.Format("CalendarWorkspaceViewModel requires a MergeQueryData context. The specified dataCtx ({0}) has {1}", dataCtx, dataCtx.IsolationLevel));

            _rptFactory = rptFactory;

            _fetchCache = new FetchCache(ViewModelFactory, DataContext, this);
        }