public void GetLogAsync(string logUrl) { if (LogDownloaded != null) { var args = new LogArgs(); args.Log = new LogEntry[] { new LogEntry(){DateTime=DateTime.Now.AddMinutes(random.Next(100)), Type="DONATION", Attributes = new []{"amount=10"}} }; LogDownloaded(this, args); } }
void logService_LogDownloaded(object sender, LogArgs e) { if (_log == null) { _log = e.Log; SetUpViewsAndViewModels(7); SetViewModelDataFromLog(_log); DataDownloadedStartInterface(); DeactivateSlides(); ActivateSlide(0); } else { if (_fetchingLogIndex == 0) _log = new LogEntry[0]; _log = _log.Union(e.Log); SetViewModelDataFromLog(_log); } if (_fetchingLogIndex < LogLocations.Length-1) UpdateLogData(++_fetchingLogIndex); else { _dataUpdateTimer.Begin(); } }