Inheritance: ISearchPaneQuerySubmittedEventArgs
 /// <summary>
 /// Initializes a new instance of the <see cref="SearchQueryArguments"/> class.
 /// </summary>
 /// <param name="args">The <see cref="SearchPaneQuerySubmittedEventArgs"/> instance containing the event data, that will be used for initializing the SearchQueryArgument instance.</param>
 public SearchQueryArguments(SearchPaneQuerySubmittedEventArgs args)
 {
     if (args != null)
     {
         Language = args.Language;
         QueryText = args.QueryText;
     }
 }
Beispiel #2
0
 private void OnQuerySubmitted(object sender, 
     SearchPaneQuerySubmittedEventArgs args)
 {
     if (MainPage.Current != null)
     {
         Frame rootFrame = Window.Current.Content as Frame;
         rootFrame.Navigate(typeof(MainPage));
         MainPage.Current.RefreshGridWithSearchResults(args.QueryText);
     }
 }
 private async void OnQuerySubmitted(SearchPane sender, SearchPaneQuerySubmittedEventArgs args)
 {
     try
     {
         await _messageHub.Send(new SearchQuerySubmittedMessage(args.QueryText));
     }
     catch (Exception ex)
     {
         // Due to an issues I've noted online: http://social.msdn.microsoft.com/Forums/en/winappswithcsharp/thread/bea154b0-08b0-4fdc-be31-058d9f5d1c4e
         // I am limiting the use of 'async void'  In a few rare occasions I use it
         // and manually route the exceptions to the UnhandledExceptionHandler
         ((App)App.Current).OnUnhandledException(ex);
     }
 }
        void _panelRecherche_QuerySubmitted(SearchPane sender, SearchPaneQuerySubmittedEventArgs args) {
            if (args.QueryText != String.Empty) {
                var resultats = from bien in _biensReference
                                where bien.Titre.Contains(args.QueryText)
                                select bien;

                _biensAffiches.Clear();
                foreach (BienEntite bien in resultats)
                    _biensAffiches.Add(bien);
            }
            else {
                _biensAffiches.Clear();
                foreach (BienEntite bien in _biensReference)
                    _biensAffiches.Add(bien);
            }
        }
 /// <summary>
 /// Called when the user submits a search query.
 /// </summary>
 private async void OnAppQuerySubmitted(SearchPane sender, SearchPaneQuerySubmittedEventArgs args)
 {
     var frame = Window.Current.Content as Frame;
     if (frame != null)
     {
         var searchResultsPage = frame.Content as MainPage;
         if (searchResultsPage != null)
         {
             var viewModel = searchResultsPage.DataContext as SearchResultsPageControlViewModel;
             if (viewModel != null)
             {
                 await viewModel.SearchAsync(args.QueryText);
             }
             else
             {
                 await NavigationController.Instance.NavigateToPageControlAsync<SearchResultsPageControl>(args.QueryText);
             }
         }
     }
 }
Beispiel #6
0
        private void OnQuerySubmitted(object sender, SearchPaneQuerySubmittedEventArgs args)
        {

            if (string.IsNullOrEmpty(args.QueryText) || AppSettings.Oauth500Px == null)
            {
                return;
            }
            Dictionary<string, string> parameters = new Dictionary<string, string>()
            {
                {"consumer_key",AppSettings.ConsumerKey},
                {"term",args.QueryText}
            };

            string searchUrl = AppSettings.PhotosUrl + "/search" + "?consumer_key=" + AppSettings.ConsumerKey  +"&image_size[]=3&image_size[]=4" + "&term=" + args.QueryText;

            var result = new PhotoStream("Search - " + args.QueryText, searchUrl);
            Frame rootframe = Window.Current.Content as Frame;
            if (rootframe != null)
            {
                rootframe.Navigate(typeof(GroupDetailPage), result);
            }
        }
Beispiel #7
0
 protected void OnQuerySubmitted(SearchPane sender, SearchPaneQuerySubmittedEventArgs args)
 {
     DisplaySearchResults(args.QueryText, args.Language);
 }
        protected void OnQuerySubmitted(SearchPane sender, SearchPaneQuerySubmittedEventArgs args)
        {
            if (args == null)
                throw new ArgumentNullException(nameof(args));

            DisplaySearchResults(args.QueryText, args.Language);
        }
Beispiel #9
0
 void searchPane_QuerySubmitted(Windows.ApplicationModel.Search.SearchPane sender, Windows.ApplicationModel.Search.SearchPaneQuerySubmittedEventArgs args)
 {
     ((ItemsShowcaseViewModel)DataContext).SearchCommand.Execute(sender.QueryText);
     backButton.Visibility = Visibility.Visible;
     Grid.SetColumn(titlePanel, 1);
 }
Beispiel #10
0
 void searchPanel_QuerySubmitted(SearchPane sender, SearchPaneQuerySubmittedEventArgs args)
 {
     UpdateSearchQuery(args.QueryText); //update the search when the user presses enter in the search pane
 }
 private async void OnQuerySubmitted(SearchPane sender, SearchPaneQuerySubmittedEventArgs args)
 {
     prayerViewModel.SearchCity(args.QueryText);
     //Frame.Navigate(typeof(SearchResultsPage), args.QueryText);
 }
Beispiel #12
0
        private void SearchPaneQuerySubmitted(
            SearchPane sender,
            SearchPaneQuerySubmittedEventArgs args)
        {
            GeocodeLocation geoCodeLocation = _searchResponse.LocationData
                .FirstOrDefault(locationData => locationData.Address.FormattedAddress == args.QueryText) ??
                _searchResponse.LocationData.FirstOrDefault();

            _lastFocusedMapPin = _focusedMapPin;

            if (geoCodeLocation != null)
            {
                MapPin existedMapPin = _mapPins.FirstOrDefault(mapPin =>
                    mapPin.Latitude == geoCodeLocation.Location.Latitude.ToString()
                    && mapPin.Longitude == geoCodeLocation.Location.Longitude.ToString());
                if (existedMapPin == null)
                {
                    MapPin mapPinElement = new MapPin(string.Empty, string.Empty,
                        geoCodeLocation.Location.Latitude.ToString(),
                        geoCodeLocation.Location.Longitude.ToString());

                    mapPinElement.MapPinTapped += MapPinElementMapPinTapped;
                    MapView.Children.Add(mapPinElement);
                    MapLayer.SetPosition(mapPinElement, geoCodeLocation.Location);
                    MapView.SetView(geoCodeLocation.Location, 15.0f);
                    _focusedMapPin = mapPinElement;
                }
                else
                {
                    Location location = new Location(double.Parse(existedMapPin.Latitude), double.Parse(existedMapPin.Longitude));
                    MapView.SetView(location, 15.0f);
                    existedMapPin.Focus();
                    _focusedMapPin = existedMapPin;
                }
                DefaultViewModel["Focused"] = true;
            }
            DefaultViewModel["Linkable"] = (bool)DefaultViewModel["Focused"] && _focusedMapPin.Marked;
            DefaultViewModel["Markable"] = (bool)DefaultViewModel["Focused"] && !(bool)DefaultViewModel["Linkable"];
            DefaultViewModel["UnMarkable"] = (bool)DefaultViewModel["Linkable"];
        }
 /// <summary>
 /// Called when a search is performed when the application is running.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The <see cref="SearchPaneQuerySubmittedEventArgs"/> instance containing the event data.</param>
 private void OnQuerySubmitted(SearchPane sender, SearchPaneQuerySubmittedEventArgs args)
 {
     var searchQueryArguments = new SearchQueryArguments(args);
     OnSearchApplication(searchQueryArguments);
 }
 /// <summary>
 /// Called when a search query is submitted.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The <see cref="SearchPaneQuerySubmittedEventArgs"/> instance containing the event data.</param>
 private void OnQuerySubmitted(object sender, SearchPaneQuerySubmittedEventArgs args)
 {
     RootFrame.Navigate(typeof(ShowListPage), new ShowListParams(MethodCall.Search, null, args.QueryText));
 }
Beispiel #15
0
 internal void OnQuerySubmitted(object sender, SearchPaneQuerySubmittedEventArgs args)
 {
     ProcessQueryText(args.QueryText);
 }
 public void CallOnQuerySubmitted(SearchPaneQuerySubmittedEventArgs args)
 {
     base.OnQuerySubmitted(null, args);
 }
 public SearchEventArgs(SearchPaneQuerySubmittedEventArgs args)
 {
     Language = args.Language;
     QueryText = args.QueryText;
 }
 //note: App.xaml.cs -> OnSearchActivated  <== wire up search from OS into this APP
 public void onQuerySubmitted(SearchPane sender, SearchPaneQuerySubmittedEventArgs args)
 {
     //THE SEARCHPANE CAN BE POPULATED WITH OUR OWN UI
 }
        // </snippet701>

        private void OnQuerySubmitted(SearchPane sender, SearchPaneQuerySubmittedEventArgs args)
        {
            var newArgs = new SearchEventArgs(args);
            OnSearchApplication(newArgs);
        }
Beispiel #20
0
        private void SearchPane_QuerySubmitted(SearchPane sender, SearchPaneQuerySubmittedEventArgs args)
        {
            var navService = (INavigationService) _container.GetInstance(typeof (INavigationService), null);
            navService.Navigate(typeof(SearchResultsView), new SearchTextParameter(args.QueryText));

            Window.Current.Activate();
        }
 void SearchPane_QuerySubmitted(SearchPane sender, SearchPaneQuerySubmittedEventArgs args)
 {
     // search something
 }
Beispiel #22
0
 private void OnQuerySubmitted(object sender, SearchPaneQuerySubmittedEventArgs args)
 {
     if (MainPage.Current != null)
     {
         MainPage.Current.ProcessQueryText(args.QueryText);
     }
 }
        void App_QuerySubmitted(SearchPane sender, SearchPaneQuerySubmittedEventArgs args)
        {
            var previousContent = Window.Current.Content;
            var frame = previousContent as Frame;
            if (frame != null)
            {
                frame.Navigate(typeof(SearchResultView), args.QueryText);
                Window.Current.Content = frame;

                // Ensure the current window is active
                Window.Current.Activate();
            }
        }
        void search_QuerySubmitted(SearchPane sender, SearchPaneQuerySubmittedEventArgs args)
        {
            var frame = Window.Current.Content as Frame;
            if (frame == null)
            {
                frame = new Frame();
                Window.Current.Content = frame;
            }

            // show and activate...
            frame.ShowView(typeof(ISearchResultsPageViewModel), args.QueryText);
            Window.Current.Activate();
        }
 private async void OnQuerySubmitted(object sender, SearchPaneQuerySubmittedEventArgs args)
 {
     try
     {
         if (ItemsPage.Current != null)
         {
             ItemsPage.Current.SetSearchWordBox(args.QueryText);
             await ItemsPage.Current.PerformSearch(args.QueryText);
         }
     }
     catch (Exception ex) { Debug.WriteLine(ex.ToString()); }
 }
Beispiel #26
0
        private void OnSearchQuerySubmitted(SearchPane sender, SearchPaneQuerySubmittedEventArgs args)
        {
            var previousContent = Window.Current.Content;
            var frame = previousContent as Frame;
            if (frame == null)
            {
                return;
            }

            ActiveSearchResultsPage(frame, args.QueryText);
        }
        async void SearchPane_QuerySubmitted(SearchPane sender, SearchPaneQuerySubmittedEventArgs args)
        {




            //   new MessageDialog(SearchPane.QueryText.ToString()).ShowAsync();
            foreach (StorageFile files in file)
            {
                if (files.DisplayName == args.QueryText.ToString())
                {
                    mediaElement.SetSource(await files.OpenAsync(FileAccessMode.Read), "");
                    //
                    medianame = files.DisplayName;

                    extensions = files.FileType.ToLower();

                    //
                    futurelocation =
                        Windows.Storage.AccessCache.StorageApplicationPermissions.FutureAccessList.Add(files);
                    savestate(futurelocation);
                    if (args.QueryText.ToString() != "")
                    {
                        timer4.Interval = new TimeSpan(0, 0, 0, 1);
                        timer4.Start();
                        timer4.Tick += timer4_Tick;

                        updatetile();
                    }
                    //using (StorageItemThumbnail storageItemThumbnail = await files.GetThumbnailAsync(ThumbnailMode.SingleItem, 200, ThumbnailOptions.ResizeThumbnail))
                    //using (IInputStream inputStreamAt = storageItemThumbnail.GetInputStreamAt(0))
                    //using (var dataReader = new DataReader(inputStreamAt))
                    //{
                    //    uint u = await dataReader.LoadAsync((uint)storageItemThumbnail.Size);
                    //    IBuffer readBuffer = dataReader.ReadBuffer(u);

                    //    var tempFolder = ApplicationData.Current.LocalFolder;
                    //    var imageFile = await tempFolder.CreateFileAsync(filename+".png", CreationCollisionOption.ReplaceExisting);

                    //    using (IRandomAccessStream randomAccessStream = await imageFile.OpenAsync(FileAccessMode.ReadWrite))
                    //    using (IOutputStream outputStreamAt = randomAccessStream.GetOutputStreamAt(0))
                    //    {
                    //        await outputStreamAt.WriteAsync(readBuffer);
                    //        await outputStreamAt.FlushAsync();
                    //    }
                    //}

                }
            }


        }
Beispiel #28
0
 void App_QuerySubmitted(SearchPane sender, SearchPaneQuerySubmittedEventArgs args)
 {
     InitializeSearch(args.QueryText);
 }
Beispiel #29
0
 private void OnQuerySubmitted(object sender, SearchPaneQuerySubmittedEventArgs args)
 {
     if (args.QueryText != string.Empty)
     {
         Frame rootFrame = Window.Current.Content as Frame;
         rootFrame.Navigate(typeof(AllItems), new SearchObject("Question", args.QueryText));
     }
 }
 private void App_QuerySubmitted(SearchPane sender, SearchPaneQuerySubmittedEventArgs args)
 {
     //
     // check
     //
     if (RootFrame != null)
     {
         //
         // If the app is already running and uses top-level frame navigation we can just
         // navigate to the search results
         //
         RootFrame.Navigate(typeof(SearchResultsPage1), args.QueryText);
     }
 }
Beispiel #31
0
 private async void OnAppQuerySubmitted(SearchPane sender, SearchPaneQuerySubmittedEventArgs args)
 {
     await HandleSearchQuery(args.QueryText);
 }