示例#1
0
        public async Task LoadSearchHistoryAsync()
        {
            var ctx     = new RisDbContext();
            var history = await ctx.GetSearchHistoryEntries();

            SelectedSearchHistory = null;
            SearchHistory         = history;

            if (null != _selectedSearchHistoryItemFromState && history != null)
            {
                SelectedSearchHistory = history.FirstOrDefault(h => h.Id == _selectedSearchHistoryItemFromState.Value);
            }

            if (history.Any())
            {
                MessengerHelper.Notify(MessengerHelper.DbLoadCompleted);
            }
        }
示例#2
0
        public async Task LoadDownloadsAsync()
        {
            var ctx         = new RisDbContext();
            var localCopies = await ctx.GetDownloads();

            SelectedDownload    = null;
            DownloadedDocuments = localCopies;

            if (null != _selectedDownloadFromState && localCopies != null)
            {
                SelectedDownload = localCopies.FirstOrDefault(h => h.Id == _selectedDownloadFromState.Value);
            }

            if (localCopies.Any())
            {
                MessengerHelper.Notify(MessengerHelper.DbLoadCompleted);
            }
        }
示例#3
0
 //No parameters
 static public void Notify(string eventType)
 {
     messengerHelper.Notify(eventType);
 }