private async void OnSelectedPaymentMethod(object sender, Telerik.Windows.Controls.ListBoxItemTapEventArgs e) { if (!NetworkService.IsNetworkAvailable(true)) { return; } switch (((PaymentMethod)LstPaymentMethods.SelectedItem).PaymentMethodType) { case MPaymentMethod.PAYMENT_METHOD_WINDOWS_STORE: await LicenseService.PurchaseProduct(_paymentViewModel.SelectedProduct); break; case MPaymentMethod.PAYMENT_METHOD_CENTILI: case MPaymentMethod.PAYMENT_METHOD_FORTUMO: SdkService.MegaSdk.getPaymentId(_paymentViewModel.SelectedProduct.Handle, new GetPaymentUrlRequestListener(((PaymentMethod)LstPaymentMethods.SelectedItem).PaymentMethodType)); break; case MPaymentMethod.PAYMENT_METHOD_CREDIT_CARD: PageSubtitle.Text = UiResources.EnterPaymentDetails; _paymentViewModel.ProductSelectionIsEnabled = false; _paymentViewModel.PaymentMethodSelectionIsEnabled = false; _paymentViewModel.CreditCardPaymentIsEnabled = true; ((ApplicationBarIconButton)ApplicationBar.Buttons[0]).IsEnabled = true; break; } }
private async void lbThumbs_ItemTap(object sender, Telerik.Windows.Controls.ListBoxItemTapEventArgs e) { if (((ImageModel)lbThumbs.SelectedItem).Link.OriginalString == "http://temprui.com") { thumbsList.Remove(loadMore); string parameters = "tags="; parameters += tbSearch.Text.Trim() == string.Empty ? "" : tbSearch.Text.Replace(" ", "+"); parameters += "&board="; parameters += "&width_aspect=&searchstyle=exact&sfw=" + (Int32.Parse(IsolatedStorageSettings.ApplicationSettings["sfw"].ToString()) - 1).ToString(); parameters += "&search=search&offset=" + thumbsList.Count.ToString(); await scraper.DownloadSiteHTML(parameters); var offsetImages = new ObservableCollection <ImageModel>(scraper.GenerateImageThumbnailClasses()); foreach (var image in offsetImages) { thumbsList.Add(image); } if (offsetImages.Any()) { thumbsList.Add(loadMore); } return; } CommonStuff.selectedImage = (ImageModel)lbThumbs.SelectedItem; NavigationService.Navigate(new Uri("/ImageViewer.xaml", UriKind.Relative)); }
private void RadDataBoundListBox_ItemTap(object sender, Telerik.Windows.Controls.ListBoxItemTapEventArgs e) { MatchViewModel vm = (e.Item.AssociatedDataItem as Telerik.Windows.Data.IDataSourceItem).Value as MatchViewModel; VisualStateManager.GoToState(Application.Current.RootVisual as PhoneApplicationFrame, "Default", false); (Application.Current.RootVisual as PhoneApplicationFrame).Navigate(new Uri("/ConversationPage.xaml?id=" + vm.Data.Id, UriKind.Relative)); }
private void FindPolicemansList_ItemTap(object sender, Telerik.Windows.Controls.ListBoxItemTapEventArgs e) { try { ViewModelLocator.MainStatic.CurrentPoliceman = (PolicemanItem)this.FindPolicemansList.SelectedItem; NavigationService.Navigate(new Uri("/PoliceItem.xaml", UriKind.Relative)); } catch { }; }
private void FindItemsList_ItemTap(object sender, Telerik.Windows.Controls.ListBoxItemTapEventArgs e) { try { ViewModelLocator.MainStatic.CurrentItem = (e.Item.Content as MapItem); NavigationService.Navigate(new Uri("/ItemPage.xaml", UriKind.Relative)); } catch { }; }
private void SearchItemsList_ItemTap(object sender, Telerik.Windows.Controls.ListBoxItemTapEventArgs e) { try { ViewModelLocator.MainStatic.CurrentRegionItem = (RegionWaterItem)SearchItemsList.SelectedItem; NavigationService.Navigate(new Uri("/RegionPage.xaml", UriKind.Relative)); } catch { }; }
private void NearestPlacesList_ItemTap(object sender, Telerik.Windows.Controls.ListBoxItemTapEventArgs e) { try { ViewModelLocator.MainStatic.CurrentItem = (this.NearestPlacesList.SelectedItem as AssistsPhoto); this.NavigationService.Navigate(new Uri("/Pages/ViewPHotoPage.xaml", UriKind.Relative)); } catch { }; }
private void ProjectTasks_ItemTap(object sender, Telerik.Windows.Controls.ListBoxItemTapEventArgs e) { Task task = (ProjectTasks.SelectedItem as TableIndex <Task, Tuple <int, bool>, int>).LazyValue.Value; if (task != null) { ShowTaskDetails(task); } }
private void AppendTagToReplyText(object sender, Telerik.Windows.Controls.ListBoxItemTapEventArgs e) { // TODO: Add event handler implementation here. var item = e.Item.AssociatedDataItem.Value as Data.CodeTagDataModel; // set clipboard text to title text Clipboard.SetText(item.Code); // move back to reply box this.LayoutRoot.SelectedIndex = 0; }
private void groupList_ItemTap(object sender, Telerik.Windows.Controls.ListBoxItemTapEventArgs e) { var item = e.Item.AssociatedDataItem.Value as Data.PrivateMessageDataSource; if (item is Data.PrivateMessageDataGroup) { return; } Details.CurrentFolder = Viewmodel.SelectedFolder; Details.Items = Viewmodel.SelectedFolder.GetMessages(); Details.SelectedItem = item; NavigationService.Navigate(new Uri("/PrivateMessageDetailsPage.xaml", UriKind.Relative)); }
private void lstVoters_ItemTap(object sender, Telerik.Windows.Controls.ListBoxItemTapEventArgs e) { if (this.lstVoters.SelectedItem is PushpinModel) { PushpinModel _pin = this.lstVoters.SelectedItem as PushpinModel; App.thisApp.SelectedHouse = _pin; if (this.lstVoters.FilterDescriptors.Count > 0 && lstVoters.Groups != null && lstVoters.Groups[0] != null) { string filterStreet = lstVoters.Groups[0].Key as string; // TODO: Determine whether including OrderBy here loses our odd/even sorting List <PushpinModel> filteredPins = App.VotersViewModel.VoterList.Where <PushpinModel>(voter => voter.Street == filterStreet).OrderBy <PushpinModel, int>(voter => voter.HouseNum).ToList(); if (sortByHouseNumber.SortMode == ListSortMode.Descending) { filteredPins.Reverse(); } App.VotersViewModel.VoterList.Clear(); foreach (PushpinModel _p in filteredPins) { App.VotersViewModel.VoterList.Add(_p); } } this.NavigationService.Navigate(new Uri("/VoterDetailsPage.xaml", UriKind.Relative)); } }
private void MovieListBox_ItemTap(object sender, Telerik.Windows.Controls.ListBoxItemTapEventArgs e) { ItemViewModel movieCategory = this.MovieListBox.SelectedItem as ItemViewModel; NavigationService.Navigate(new Uri("/VideoPage.xaml?name=" + HttpUtility.UrlEncode(movieCategory.Title) + "&url=" + HttpUtility.UrlEncode(movieCategory.URL) + "&avatar=" + HttpUtility.UrlEncode(movieCategory.ImageSource.ToString()), UriKind.Relative)); }
private void lbThumbs_ItemTap(object sender, Telerik.Windows.Controls.ListBoxItemTapEventArgs e) { CommonStuff.selectedImage = (ImageModel)lbThumbs.SelectedItem; NavigationService.Navigate(new Uri("/ImageViewer.xaml", UriKind.Relative)); }