private void UIElement_OnTap(object sender, GestureEventArgs e) { IsHidden = false; AnimationHide.Begin(); AnimationHide.Completed += (o, args) => PopupManager.Instance.Hide(); }
private async void WishButton_OnTap(object sender, GestureEventArgs e) { WishButton.IsEnabled = false; var wish = WishTextBox.Text; DarumaWishTheme theme; Enum.TryParse(WishThemePicker.SelectedItem.ToString(), out theme); if (string.IsNullOrEmpty(wish) || !Enum.IsDefined(typeof(DarumaWishTheme), theme) || theme == DarumaWishTheme.NoSet) { MessageBox.Show(AppResources.EmptyWishTextBox); WishButton.IsEnabled = true; WishTextBox.Focus(); return; } await _viewModel.CreateDaruma(wish, theme); NavigationService.Navigate(new Uri(ViewUrlRouter.MainViewUrl, UriKind.Relative)); }
private void OnDeleteTap(object sender, GestureEventArgs e) { var item = (DownloadItemDataModel) _focusedItem.DataContext; item.Cancel(); ViewModel.Remove(item); ViewModel.DownloadsContainer.Remove(item); }
private void GoToStory(object sender, GestureEventArgs gestureEventArgs) { var rssItem = (sender as StackPanel).DataContext as RssStory; var wbt = new WebBrowserTask(); wbt.Uri = rssItem.StoryLink; wbt.Show(); }
protected override void OnHold(GestureEventArgs e) { HandleTapAndHold(e, true); if (!e.Handled) base.OnHold(e); }
private void Messages_OnTap(object sender, GestureEventArgs e) { var shareStatusTask = new SmsComposeTask { Body = _infoSharing.Quote }; shareStatusTask.Show(); }
private void SocialNetwork_OnTap(object sender, GestureEventArgs e) { var shareStatusTask = new ShareStatusTask { Status = _infoSharing.Quote }; shareStatusTask.Show(); }
public void AlternativeName(object sender, GestureEventArgs gestureEventArgs) { var swtStore = (SimpleWebTokenStore)Application.Current.Resources["swtStore"]; var name = tbUsername.Text; var nameIdentifier = swtStore.SimpleWebToken.NameIdentifier; RetrieveOrCreatePlayer(name, nameIdentifier); }
private void IssueListBox_Tap(object sender, GestureEventArgs e) { var issue = IssueListBox.SelectedItem as Issue; if (issue != null) { var frame = App.Current.RootVisual as PhoneApplicationFrame; frame.Navigate(new Uri("/Contexts/Review/Mvvm/IssueReviewPivotPage.xaml?key=" + issue.Key, UriKind.Relative)); } }
private void POnDoubleTap(object sender, GestureEventArgs gestureEventArgs) { var p = sender as Pushpin; if (p == null) return; var rv = p.Content as ReturnVisitData; if (rv == null) return; NavigationService.Navigate(new Uri(string.Format("/View/EditReturnVisit.xaml?id={0}", rv.ItemId.ToString(CultureInfo.InvariantCulture)), UriKind.Relative)); }
public void Play(object sender, GestureEventArgs gestureEventArgs) { var cup = ((CupControl)sender).DataContext as CupVM; var currentGameState = Game.State; if (!Game.Play(cup)) return; SystemTray.ProgressIndicator.IsVisible = true; Context.UpdateGame(Player.Name, Game.ToGame(), game => Dispatcher.BeginInvoke(() => { SystemTray.ProgressIndicator.IsVisible = false; switch (Game.State) { case GameState.Finished: var winner = Game.Winner; var score = Game.Score(winner).Stones; if (winner == Player) { MessageBox.Show("Congratulations, you won! You have earned " + score + " points."); Context.ScorePlayer(winner.Name, score, player => Dispatcher.BeginInvoke(NavigationService.GoBack) , () => { }); } else { MessageBox.Show("Sorry, you lost."); Context.ScorePlayer(winner.Name, score, player => Dispatcher.BeginInvoke(NavigationService.GoBack) , () => { }); } break; case GameState.Client: if (currentGameState != GameState.Client) _nsc.NotifyAsync(Player.Name, Game.Client.Name, Game.Id); else CupControl.AnimationDelayIndex = 0; break; case GameState.Host: if (currentGameState != GameState.Host) _nsc.NotifyAsync(Player.Name, Game.Host.Name, Game.Id); else CupControl.AnimationDelayIndex = 0; break; } }), () => Dispatcher.BeginInvoke(() => { SystemTray.ProgressIndicator.IsVisible = false; MessageBox.Show("Failed to register play. Try again."); }) ); }
private void WishDaruma_OnTap(object sender, GestureEventArgs e) { if (WishStack.Visibility == Visibility.Visible) { WishStack.Visibility = Visibility.Collapsed; NewDarumaImg.Source = new BitmapImage(new Uri(ImageUrlRouter.NewDaurmaImageUrl, UriKind.Relative)); } else { WishStack.Visibility = Visibility.Visible; NewDarumaImg.Source = new BitmapImage(new Uri(ImageUrlRouter.WishedDaurmaImageUrl, UriKind.Relative)); } }
private void Upload_Button_Click (object sender, GestureEventArgs e) { if (null == _progressIndicatror || !_progressIndicatror.IsVisible) { if (null != _recordingListBox.SelectedItem) { var recording = _recordingListBox.SelectedItem as Recording; if (null == Utilities.SkyDriveSession) NavigationService.GoBack (); else UploadFile (recording.Name); } } }
private void ImgPhone_OnTap(object sender, GestureEventArgs e) { var selectedFilmCenter = ((FrameworkElement)(sender)).DataContext as FilmCenter; if (null != selectedFilmCenter) { var phoneCallTask = new PhoneCallTask { PhoneNumber = selectedFilmCenter.Phone, DisplayName = selectedFilmCenter.DisplayName }; phoneCallTask.Show(); } }
private void HubTile_OnTap(object sender, GestureEventArgs e) { var hub = (HubTile)sender; if (_flippedTiles.Contains(hub)) { _flippedTiles.Remove(hub); VisualStateManager.GoToState(hub, "Expanded", true); } else { _flippedTiles.Add(hub); VisualStateManager.GoToState(hub, "Flipped", true); } }
private void Mail_OnTap(object sender, GestureEventArgs e) { var s = new DarumaWishThemeToLocalizationString(); var shareStatusTask = new EmailComposeTask { Body = _infoSharing.Quote }; if (_infoSharing.WishTheme != DarumaWishTheme.NoSet) { shareStatusTask.Subject = s.GetLocalizationByTheme(_infoSharing.WishTheme); } //new ShareStatusTask { Status = Quote }; shareStatusTask.Show(); }
async void LocationSwitch_Tap(object sender, GestureEventArgs gestureEventArgs) { if (LocationSwitch.IsChecked ?? false) { var result = MessageBox.Show(AppResources.locationusetext, AppResources.gpsusetitle, MessageBoxButton.OKCancel); App.Settings.LocationServicesGranted = result == MessageBoxResult.OK; LocationSwitch.Content = (bool) LocationSwitch.IsChecked ? "On " : "Off"; } else { App.Settings.LocationServicesGranted = false; LocationSwitch.Content = "Off"; } }
private void Pivot_Tap(object sender, GestureEventArgs e) { var currSelectedItem = Pivot.SelectedItem as PivotItem; if (currSelectedItem != null && selectedItem != null) { if (currSelectedItem.Name == selectedItem.Name) { var listBox = currSelectedItem.Content as ListBox; if (listBox != null) { object first = listBox.Items.FirstOrDefault(); if (first != null) listBox.ScrollIntoView(first); } } selectedItem = currSelectedItem; } }
public void TileTap(object sender, GestureEventArgs args) { if (sender != null) { var objectToMap = sender as Chairty; var linktoNavigate = CreateSimpleDonationIntegrationLink(objectToMap.Id); var webBrowserTask = new WebBrowserTask { Uri = new Uri(linktoNavigate, UriKind.Absolute) }; webBrowserTask.Show(); } else { MessageBox.Show("Something went wrong please try again or contact with support"); } }
private void AddVehicleToMap_Tap(object sender, GestureEventArgs e) { if (!String.IsNullOrEmpty(VehicleNameTextBox.Text)) { var vehicle = VehicleNameTextBox.Text; if (_vehicleProvider.GetAvailableVehicles().ContainsKey(vehicle) && !_myVehicles.ContainsKey(vehicle)) { VehicleType vehilceType; _vehicleProvider.GetAvailableVehicles().TryGetValue(vehicle, out vehilceType); _myVehicles.Add(new KeyValuePair<string, VehicleType>(vehicle, vehilceType)); } } else { MessageBox.Show("Please type a valid value"); } }
private void StickerGifTap(object sender, GestureEventArgs e) { try { var image = sender as AnimatedImage; if (image != null) { var code = image.Tag.ToString(); IsHidden = false; AnimationHide.Begin(); AnimationHide.Completed += (o, args) => PopupManager.Instance.Hide(); SelectCompleted(code); } } catch (Exception exception) { Debug.WriteLine(exception.Message); } }
private void btnTo_Tap(object sender, System.Windows.Input.GestureEventArgs e) { fromvar = 0; this.popup.IsOpen = true; //btnTo.Content = strNameLngTo; }
private void lstDeal_Tap(object sender, System.Windows.Input.GestureEventArgs e) { }
private void tap_giai_tri(object sender, System.Windows.Input.GestureEventArgs e) { // cate.loadGiaiTri(); NavigationService.Navigate(new Uri("/Category.xaml?Title=" + "Giải Trí", UriKind.Relative)); }
private void imgcopo_Tap(object sender, System.Windows.Input.GestureEventArgs e) { App.Current.Actives.IdTipoAlimento_Select = 1; NavigationService.Navigate(new Uri("/View/MontaPratoUtil/FrmCopo.xaml", UriKind.Relative)); thisImagem = sender as Image; }
private void btnSettings_Tap(object sender, System.Windows.Input.GestureEventArgs e) { NavigationService.Navigate(new Uri("/Pages/UserDetails/EditCousinPage.xaml", UriKind.Relative)); }
private void tap_khoa_hoc(object sender, System.Windows.Input.GestureEventArgs e) { // cate.loadKhoaHoc(); NavigationService.Navigate(new Uri("/Category.xaml?Title=" + "Khoa Học", UriKind.Relative)); }
private void UIElement_OnTap(object sender, GestureEventArgs e) { ViewModel.RemoveCatalog((CatalogDataModel)_focusedItem.DataContext); }
private void find_Tap(object sender, System.Windows.Input.GestureEventArgs e) { DoSearch(); }
private void Navigate_Watchlist(object sender, System.Windows.Input.GestureEventArgs e) { NavigationService.Navigate(new Uri("/WatchlistPage.xaml", UriKind.Relative)); }
private void UVIndexMenuItem_Tap(object sender, System.Windows.Input.GestureEventArgs e) { App.Navigate(new Uri(AppSettings.UVIndexPageAddress, UriKind.Relative)); }
private void Navigate_Auth(object sender, System.Windows.Input.GestureEventArgs e) { NavigationService.Navigate(new Uri("/StockTwits_Auth.xaml", UriKind.Relative)); }
public void control_Tap(object sender, System.Windows.Input.GestureEventArgs e) { OnUserControlElementTap((sender as TimelineElementControl).Trip); }
private void OnGridTap(object sender, System.Windows.Input.GestureEventArgs e) { }
private void Grid_Tap(object sender, System.Windows.Input.GestureEventArgs e) { NavigationService.Navigate(new Uri("/PopularSection.xaml", UriKind.Relative)); }
public void pushtap_Tap(object sender, System.Windows.Input.GestureEventArgs e) { Image im = (Image)sender; MessageBox.Show(im.Name); }
private void ScrollToBottom(object sender, System.Windows.Input.GestureEventArgs e) { ThreadPageManager.Instance.ScrollToPost(ControlViewModel.CurrentThreadPage.Posts.Last()); this.IsPostJumpListVisible = false; }
private void bRateReviewCinema_Tap(object sender, System.Windows.Input.GestureEventArgs e) { this.RateAndReviewCinema(); }
private void BookCover_OnTap(object sender, GestureEventArgs e) { var elem = sender as FrameworkElement; var vm = elem.DataContext as ViewModels.BookCoverViewModel; var uri = new Uri(vm.NavigateUri, UriKind.Relative); NavigationService.Navigate(uri); }
private void ptbDate_Tap(object sender, System.Windows.Input.GestureEventArgs e) { this.Focus(); SetCalenderVisibility(true); }
//Go to Main Page private void onClickMainImage(object sender, System.Windows.Input.GestureEventArgs e) { NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative)); }
private void OnRestartTap(object sender, GestureEventArgs e) { var item = (DownloadItemDataModel)_focusedItem.DataContext; ViewModel.Restart(item); }
private void Button4_Tap(object sender, System.Windows.Input.GestureEventArgs e) { if (_delaytimer != null) { if (_delaytimer.Interval.Milliseconds > 0) { return; } } StopTimerSoundEffect(); if (_nextquestion.CorrectAnswer == "4") { var uriString = @"Resources/Images/buttoncorrect.png"; scr4.Background = new ImageBrush { ImageSource = new BitmapImage(new Uri(uriString, UriKind.Relative)) }; _correctAnswers++; PlaySoundEffect("positive"); } else { _lives--; _wrongAnswers++; PlaySoundEffect("negative"); var uriString2 = @"Resources/Images/buttonwrong.png"; scr4.Background = new ImageBrush { ImageSource = new BitmapImage(new Uri(uriString2, UriKind.Relative)) }; if (_nextquestion.CorrectAnswer == "1") { var uriString = @"Resources/Images/buttonreversecorrect.png"; scr1.Background = new ImageBrush { ImageSource = new BitmapImage(new Uri(uriString, UriKind.Relative)) }; } if (_nextquestion.CorrectAnswer == "2") { var uriString = @"Resources/Images/buttoncorrect.png"; scr2.Background = new ImageBrush { ImageSource = new BitmapImage(new Uri(uriString, UriKind.Relative)) }; } if (_nextquestion.CorrectAnswer == "3") { var uriString = @"Resources/Images/buttonreversecorrect.png"; scr3.Background = new ImageBrush { ImageSource = new BitmapImage(new Uri(uriString, UriKind.Relative)) }; } } _questionstimer.Stop(); _delaytimer = new DispatcherTimer(); _delaytimer.Tick += delaytimer_Tick; _delaytimer.Interval = new TimeSpan(0, 0, 0, 0, 450); _delaytimer.Start(); }
private void Map_OnTap(object sender, GestureEventArgs e) { e.Handled = true; Point clickLocation = e.GetPosition(Map); GeoCoordinate coordinate = Map.ConvertViewportPointToGeoCoordinate(clickLocation); // AddPushpin(coordinate); }
private void ContentPanel_Tap(object sender, System.Windows.Input.GestureEventArgs e) { FontStyleSelection.Visibility = System.Windows.Visibility.Collapsed; ApplicationBar.IsVisible = true; }
private void CameraViewbox_Tap(object sender, GestureEventArgs e) { TakePhoto(); }
private void tap_tinh_yeu(object sender, System.Windows.Input.GestureEventArgs e) { // cate.loadTinhYeu(); NavigationService.Navigate(new Uri("/Category.xaml?Title=" + "Tình Yêu", UriKind.Relative)); }
private void imgLANCHETardePaesCereais_Tap(object sender, System.Windows.Input.GestureEventArgs e) { thisImagem = sender as Image; App.Current.Actives.IdTipoAlimento_Select = 7; NavigationService.Navigate(new Uri("/View/MontaPratoUtil/FrmPaoCereal.xaml", UriKind.Relative)); }
private void AlbumCover_Tap(object sender, System.Windows.Input.GestureEventArgs e) { Music.StopMusic(); CoverStoryboard.Stop(); }
void Link_Tap(object sender, System.Windows.Input.GestureEventArgs e) { string name = (sender as TextBlock).Name; if (name == DeveloperContact.Name) { ShowWebBrowserTask("https://www.facebook.com/yookjy"); } else if (name == DesignerContact.Name) { ShowWebBrowserTask("https://www.facebook.com/yookjy"); } else if (name == RateReview.Name) { new MarketplaceReviewTask().Show(); } else if (name == Facebook.Name) { ShowWebBrowserTask(Constants.FACEBOOK_SUPPORT); } else if (name == Feedback.Name) { var nameHelper = new AssemblyName(Assembly.GetExecutingAssembly().FullName); EmailComposeTask emailComposeTask = new EmailComposeTask(); emailComposeTask.To = Constants.EMAIL_SUPPORT; emailComposeTask.Subject = "Support"; emailComposeTask.Body = new System.Text.StringBuilder().Append(nameHelper.Name).Append(" ") .AppendFormat("{0}.{1}.{2}", nameHelper.Version.Major, nameHelper.Version.Minor, nameHelper.Version.Build) .AppendLine() //.AppendLine(nameHelper.Version.ToString()) .AppendLine(System.Globalization.CultureInfo.CurrentCulture.EnglishName) .AppendLine(DeviceStatus.DeviceName) .AppendLine(DeviceStatus.DeviceFirmwareVersion) .AppendLine(Environment.OSVersion.Version.ToString()).ToString(); emailComposeTask.Show(); } else if (name == UserVoice.Name) { EmailComposeTask emailComposeTask = new EmailComposeTask(); emailComposeTask.To = Constants.EMAIL_SUPPORT; emailComposeTask.Subject = "Suggest"; emailComposeTask.Show(); } else if (name == ShareApp.Name) { ShareLinkTask slt = new ShareLinkTask(); slt.LinkUri = new Uri("http://www.windowsphone.com/s?appid=d9561d4e-b2c1-42b0-8701-a7bb2f883605"); slt.Message = "This app is very useful!"; slt.Title = "Share Chameleon app!"; slt.Show(); } else if (name == LibraryCreator1.Name) { ShowWebBrowserTask("http://phone.codeplex.com/"); } else if (name == LibraryCreator2.Name) { ShowWebBrowserTask("http://writeablebitmapex.codeplex.com/"); } else if (name == LibraryCreator3.Name) { ShowWebBrowserTask("http://james.newtonking.com/json"); } else if (name == LibraryCreator4.Name) { ShowWebBrowserTask("http://www.icsharpcode.net/"); } else if (name == SpecialPeople1.Name) { } else if (name == SpecialPeople2.Name) { ShowWebBrowserTask("https://www.facebook.com/100001136649926"); } //else if (name == SpecialPeople3.Name) //{ // ShowWebBrowserTask("http://dribbble.com/gilhyun"); //} }
private void Stadium_tap(object sender, GestureEventArgs e) { NavigationService.Navigate(new Uri("/Stadiums.xaml" , UriKind.Relative)); }
private void help_btn_Tap(object sender, System.Windows.Input.GestureEventArgs e) { AppSetting.Remove(AppSetting.Tutorial); NavigationService.Navigate(new Uri(AppResources.ViewTutorial, UriKind.RelativeOrAbsolute)); }
private void UserInfoClick(object sender, GestureEventArgs e) { if (userGeoCoordinate != null) Map.Center = userGeoCoordinate; }
private void getmore_btn_Tap(object sender, System.Windows.Input.GestureEventArgs e) { Controller.Controls.GetMore(); }
private void rating_btn_Tap(object sender, System.Windows.Input.GestureEventArgs e) { Controller.Controls.Ratting(); }
private void titleGrid_Tap_1(object sender, System.Windows.Input.GestureEventArgs e) { //HideTitleOverlay(); }
private void HistoryItem_OnTap(object sender, GestureEventArgs e) { var elem = sender as FrameworkElement; var hivm = elem.DataContext as ViewModels.HistoryItemViewModel; var uri = new Uri(hivm.NavigateUri, UriKind.Relative); NavigationService.Navigate(uri); }
private void OnMyAccountTap(object sender, GestureEventArgs e) { NavigateService.NavigateTo(typeof(MyAccountPage), NavigationParameter.Normal); }
private void OnTapped(object sender, GestureEventArgs eventArgs) { var element = (FrameworkElement)sender; OnNavigate(new NavigationListEventArgs(element.DataContext)); }
// XAML can not bind them direct from the base class // That is why these are dummy event handlers protected override void OnHamburgerTap(object sender, GestureEventArgs e) { base.OnHamburgerTap(sender, e); }