示例#1
0
        private async void onFind(object sender, RoutedEventArgs e)
        {
            var allarts = await _artifactRepo.GetAllAsync();

            ArtifactsGridView.ItemsSource = allarts;
            var fewarts   = Utility.DisplayConverter.ToDisplayArtifacts(await _artifactRepo.Search(magicmaker.Text));
            var fewcat    = Utility.DisplayConverter.ToDisplayCategories(await _categoryRepo.Search(magicmaker.Text));
            var dispitems = new List <Utility.IDisplayItem>();

            dispitems.AddRange(fewarts);
            dispitems.AddRange(fewcat);
            ArtifactsGridView.ItemsSource = dispitems;
        }
示例#2
0
        /// The methods provided in this section are simply used to allow
        /// NavigationHelper to respond to the page's navigation methods.
        ///
        /// Page specific logic should be placed in event handlers for the
        /// <see cref="Common.NavigationHelper.LoadState"/>
        /// and <see cref="Common.NavigationHelper.SaveState"/>.
        /// The navigation parameter is available in the LoadState method
        /// in addition to page state preserved during an earlier session.

        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            _categoryRepo = new DataAccess.Repository.CategoryRepository();
            _artifactRepo = new DataAccess.Repository.ArtifactRepository();


            var foo = await _categoryRepo.Search("cat");

            navigationHelper.OnNavigatedTo(e);

            await UpdateUi();

            await CheckForNewArtifacts();
        }