private void Play_Button_Click (object sender, GestureEventArgs e)
     {
     if (null != _recordingListBox.SelectedItem)
         {
         try
             {
             var mediaPlayerLauncher = new MediaPlayerLauncher ();
             mediaPlayerLauncher.Media = new Uri ((_recordingListBox.SelectedItem as Recording).Name + ".wav", UriKind.Relative);
             _recordingListBox.SelectedIndex = -1;
             mediaPlayerLauncher.Location = MediaLocationType.Data;
             mediaPlayerLauncher.Controls = MediaPlaybackControls.All;
             mediaPlayerLauncher.Orientation = MediaPlayerOrientation.Landscape;
             mediaPlayerLauncher.Show ();
             }
         catch
             {
             }
         }
     }
        private void bTakePhoto_OnTap(object sender, GestureEventArgs e)
        {
            var cc = new CameraCaptureTask();
                    cc.Completed += (o, result) =>
                    {
                        if (result.TaskResult == TaskResult.Cancel) return;
                        var bi = new BitmapImage();
                        bi.SetSource(result.ChosenPhoto);
                        biTerrImage.Source = bi;

                        var wb = new WriteableBitmap(biTerrImage, null);
                        wb.Invalidate();

                        var bmp = new BitmapImage();
                        using (var ms = new MemoryStream()) {
                            wb.SaveJpeg(ms, 300, 300, 0, 100);
                            bmp.SetSource(ms);
                        }
                        ViewModel.TerritoryCardImage = bmp;
                        biTerrImage.SetBinding(Image.SourceProperty,
                            new Binding() {Source = ViewModel.TerritoryCardImage});
                    };
                        cc.Show();
        }
Example #3
0
 void ProfileBox_Tap(object sender, GestureEventArgs e)
 {
     if (checkboxTapped)
     {
         checkboxTapped = false;
         return;
     }
     if (Profile.HasPassword)
     {
         if (!passwordShowing)
         {
             if (VisualStateManager.GoToState(this, "PasswordShowing", true))
             {
                 if (passwordBox != null)
                     passwordBox.Focus();
                 passwordShowing = true;
             }
         }
     }
     else
     {
         DoLogin();
     }
 }
Example #4
0
 private void TextBox_DoubleTap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     (sender as TextBox).SelectAll();
 }
Example #5
0
 private void Privacy_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     NavigationService.Navigate(new Uri("/PrivacyPage.xaml", UriKind.Relative));
 }
Example #6
0
        private void cmdRename_Tap(object sender, GestureEventArgs e)
        {
            var cmdRename = (RoundButton)sender;
            var field = (FieldBinding)cmdRename.Tag;

            field.IsEditing = true;
        }
Example #7
0
        private async void loadClickedBuilding(object sender, GestureEventArgs e)
        {

            if (isDownloading)
                return;
            removeSearchButton();
            var img = (Image)sender;
            var poi = img.DataContext as BuildingPoi;
            var settings1 = IsolatedStorageFile.GetUserStoreForApplication();
            if (settings1.DirectoryExists(poi.Buid) && checkCompleted(poi.Buid))
            {
                // load staff to the map
                clear();
                ReadAllBuildingFloorsFromIsolatedStorage(poi.Buid);
                ReadPoisByBuildingFromIsolatedStorage(poi.Buid);

                addBuildingsToMap(poi.Buid);
                buildLoaded = true;
                loadBuidingToMap(poi.Buid);
                createAppBarMenuItem();
            }
            else
            {

                isDownloading = true;
                //ApplicationBar.IsVisible = false;
                //downloading.Visibility = Visibility.Visible;

                loading.Visibility = Visibility.Visible;
                loading.IsIndeterminate = true;

                clear();
                // download staff and show them to the map
                var fsdf = await DownloadPoisBuildStaff(poi.Buid);
                ReadAllBuildingFloorsFromIsolatedStorage(poi.Buid);
                ReadPoisByBuildingFromIsolatedStorage(poi.Buid);

                addBuildingsToMap(poi.Buid);
                buildLoaded = true;
                loadBuidingToMap(poi.Buid);

                loading.Visibility = Visibility.Collapsed;
                loading.IsIndeterminate = false;

                createAppBarMenuItem();
                isDownloading = false;
            }
            _searchBuilding = true;
        }
Example #8
0
        void grd_loc_Tap(object sender, GestureEventArgs e)
        {
            if (Mymap.Layers.Contains(mypositionPoi))
            {
                Mymap.Layers.Remove(mypositionPoi);
                mypositionPoi.Clear();
            }

            if (Mymap.Layers.Contains(detailPois))
            {
                Mymap.Layers.Remove(detailPois);
                detailPois.Clear();
            }
        }
Example #9
0
        private void ResetGameTap(object sender, GestureEventArgs e)
        {
            try
            {
                FlipCardStoryboard.Stop();
                CloseCardStoryboard.Stop();

                ResetGame();

                CloseMenuStoryboard.Begin();
            }
            catch (Exception exception)
            {
                Debug.WriteLine(exception.Message);
            }
        }
Example #10
0
        private void FrontCard_OnTap(object sender, GestureEventArgs e)
        {
            try
            {
                //CloseCardStoryboard.Begin();
                //CloseCardStoryboard.Completed += delegate(object o, EventArgs args)
                //{

                //};
            }
            catch (Exception exception)
            {
                Debug.WriteLine(exception.Message);
            }
        }
Example #11
0
 private void StatisticalReportsTile_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     this.NavigationService.Navigate(new Uri("/Views/StatisticalReports.xaml", UriKind.Relative));
 }
Example #12
0
 private void CalorieCounterTile_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     this.NavigationService.Navigate(new Uri("/Views/CalorieCounter.xaml", UriKind.Relative));
 }
Example #13
0
 private void StopwatchTile_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     this.NavigationService.Navigate(new Uri("/Views/StopWatchPage.xaml", UriKind.Relative));
 }
Example #14
0
 private void HealthTipsTile_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     this.NavigationService.Navigate(new Uri("/Views/HealthTips.xaml", UriKind.Relative));
 }
Example #15
0
 private void BMITile_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     this.NavigationService.Navigate(new Uri("/Views/BMICalculator.xaml", UriKind.Relative));
 }
Example #16
0
 private void WhetherTile_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     this.NavigationService.Navigate(new Uri("/Views/WeatherPage.xaml", UriKind.Relative));
 }
Example #17
0
 private void Button_SortOption_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     SortBy = tempCheckedSortOption;
     SortCollection();
     Pivot_ListPage.SelectedItem = PivotItem1;
 }
Example #18
0
 /// <summary>
 /// Handles the Tap event of the imgShowAllReturnVisit control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="GestureEventArgs" /> instance containing the event data.</param>
 private void imgShowAllReturnVisit_Tap(object sender, GestureEventArgs e)
 {
     NavigationService.Navigate(new Uri("/View/ReturnVisitFullList.xaml", UriKind.Relative));
 }
Example #19
0
        private void TakePresentationPicButton_Tap(object sender, GestureEventArgs e)
        {
            var cc = new CameraCaptureTask();
            cc.Completed += (o, result) => {
                var bmp = new BitmapImage();
                if (result.ChosenPhoto == null) return;
                bmp.SetSource(result.ChosenPhoto);
                imgPresentationPic.Source = bmp;

                using (var isoStore = IsolatedStorageFile.GetUserStoreForApplication()) {
                    var wb = new WriteableBitmap(bmp);
                    using (var isoFileStream = isoStore.CreateFile("Presentation.jpg"))
                        Extensions.SaveJpeg(wb, isoFileStream, bmp.PixelWidth, wb.PixelHeight, 0, 100);
                }
            };
            cc.Show();
        }
 private void txtLogOut_DoubleTap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.RelativeOrAbsolute));
 }
Example #21
0
 private void NewTestTap(object sender, GestureEventArgs e)
 {
     NavigationService.Navigate(new Uri("/View/StartPage.xaml", UriKind.RelativeOrAbsolute));
 }
 void LoopingSelectorItem_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     e.Handled = true;
 }
Example #23
0
 //TrickMode
 private void TrickModeTap(object sender, GestureEventArgs e)
 {
     try
     {
         if (_isTrickMode)
             _isTrickMode = false;
         else _isTrickMode = true;
     }
     catch (Exception exception)
     {
         Debug.WriteLine(exception.Message);
     }
 }
Example #24
0
 private void b_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     count++;
 }
Example #25
0
 private void Mymap_Tap(object sender, GestureEventArgs e)
 {
     if (Mymap.Layers.Contains(mapHoldLayer))
         Mymap.Layers.Remove((mapHoldLayer));
 }
Example #26
0
 private void Item_OnClicked(object sender, System.Windows.Input.GestureEventArgs e)
 {
     ((SelectionPageViewModel)base.DataContext).UpdateSelectedItem((SelectionPageItem)((FrameworkElement)sender).DataContext);
 }
Example #27
0
 private void ContentPanel_OnHold(object sender, GestureEventArgs e)
 {
     Dispatcher.BeginInvoke(() => this.Focus());
     SystemTray.IsVisible = false;
     ApplicationBar.IsVisible = true;
     ContentPanel.Visibility = Visibility.Collapsed;
     MoveViewWindow(30);
 }
        void img_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            int i = Convert.ToInt32(((Image)(sender)).Name.Substring("tile___".Length));

            addTile(arr[i].guid, arr[i].image, arr[i].name, (Image)sender);
        }
Example #29
0
 private void abibPause_Tap(object sender, GestureEventArgs e)
 {
     TimerPauseClickTapEvent();
 }
Example #30
0
 private void acbSearchRv_Tap(object sender, GestureEventArgs e)
 {
     tbRvHeadline.Visibility = System.Windows.Visibility.Collapsed;
 }
Example #31
0
 private void CropEffectTap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     ((DependencyObject)Deployment.Current).Dispatcher.BeginInvoke((Action)(() => this.ToggleCropMode()));
 }
Example #32
0
 private void Hardware_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     NavigationService.Navigate(new Uri("/HardwareSettingsPage.xaml", UriKind.Relative));
 }
Example #33
0
 private void abibStop_Tap(object sender, GestureEventArgs e)
 {
     TimerStopClickTapEvent();
 }
Example #34
0
 private void FixEffectTap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     ((DependencyObject)Deployment.Current).Dispatcher.BeginInvoke((Action)(() => this.ImageEditor.SetResetContrast(!this.ImageEditor.ContrastApplied, new Action <BitmapSource>(this.HandleEffectApplied))));
 }
Example #35
0
 private void DeletePresentationPic_Tap(object sender, GestureEventArgs e)
 {
     using (var isoStore = IsolatedStorageFile.GetUserStoreForApplication())
     {
         if (isoStore.FileExists("Presentation.jpg"))
         {
             isoStore.DeleteFile("Presentation.jpg");
             imgPresentationPic.Source = null;
         }
     }
 }
Example #36
0
 private void FilterEffectTap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     this.ShowHideGridFilters(!this._filtersPanelShown);
 }
Example #37
0
 private void RadImageButton_Tap(object sender, GestureEventArgs e)
 {
     NavigationService.Navigate(new Uri(string.Format("/View/MapCalls.xaml"), UriKind.Relative));
 }
Example #38
0
 private void SelectUnselectTap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     this.ToggleSelection((FrameworkElement)(sender as Image), this.CurrentPhoto);
     this.Update();
 }
Example #39
0
 private void cardBack_Tap(object sender, GestureEventArgs e)
 {
     if (_isShowMenu)
     {
         _isShowMenu = false;
         CloseMenuStoryboard.Begin();
     }
 }
 private void UserControl_Hold(object sender, System.Windows.Input.GestureEventArgs e)
 {
     this.Focus();
 }
Example #41
0
        private void ImgCardOnTap(object sender, GestureEventArgs e)
        {
            try
            {
                if (_isShowMenu)
                {
                    _isShowMenu = false;
                    CloseMenuStoryboard.Begin();
                }

                //If total select card < 10, continue
                if (_totalCount < Limit)
                {
                    var image = sender as Image;

                    if (image != null && !_isProcessing)
                    {
                        //Mark processing
                        _isProcessing = true;
                        _cardId = image.Tag.ToString();

                        //Init Random
                        var rand = new Random();
                        _selectedId = !_isTrickMode ? rand.Next(0, 5) : Convert.ToInt32(_cardId);

                        if (_listItems != null && _listItems.Count > 0)
                        {
                            //Set image to Front Card
                            var lagerImg = _listItems[_selectedId].CardThumbLager;

                            FrontCard.Source = new BitmapImage(new Uri(lagerImg, UriKind.RelativeOrAbsolute));

                            FlipCardStoryboard.Begin();
                            FlipCardStoryboard.Completed += FlipCardStoryboard_Completed;
                        }
                    }
                }
                else
                {
                    Debug.WriteLine("End game");

                    var defaultRatio = string.Empty;
                    var ratio = Formula(_hitCount, _totalCount);

                    if (ratio <= 1.96)
                        defaultRatio = "not very significant";
                    else if (1.96 < ratio && ratio <= 2.58)
                        defaultRatio = "not significant";
                    else if (2.58 < ratio && ratio <= 3)
                        defaultRatio = "significant";
                    else if (3 < ratio)
                        defaultRatio = "very significant";

                    GameGrid.Visibility = Visibility.Collapsed;
                    ImgQuickMenu.Visibility = Visibility.Collapsed;
                    ScoreGrid.Visibility = Visibility.Visible;

                    TxtResult.Text = _hitCount + " Out of " + _totalCount;
                    TxtRatio.Text = "Ratio: " + ratio + " " + defaultRatio;
                    TbPlayername.Focus();
                }
            }
            catch (Exception exception)
            {
                Debug.WriteLine(exception.Message);
            }
        }
Example #42
0
 private void star2_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     star2.Source     = new ImageSourceConverter().ConvertFromString("/Images/starFull.png") as ImageSource;
     star4.Visibility = Visibility.Visible;
 }
Example #43
0
 private void OpenQuickMenu(object sender, GestureEventArgs e)
 {
     try
     {
         if (!_isShowMenu)
         {
             _isShowMenu = true;
             QuickMenuStoryboard.Begin();
         }
         else
         {
             _isShowMenu = false;
             CloseMenuStoryboard.Begin();
         }
     }
     catch (Exception exception)
     {
         Debug.WriteLine(exception.Message);
     }
 }
Example #44
0
 private void NewPost_OnTap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     Navigator.Current.NavigateToNewWallPost(0, false, 0, false, false, false);
 }
Example #45
0
 private void TopPsychicTap(object sender, GestureEventArgs e)
 {
     NavigationService.Navigate(new Uri("/View/Score.xaml", UriKind.RelativeOrAbsolute));
 }
Example #46
0
 private void Photo_OnTap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     ParametersRepository.SetParameterForId("GoPickImage", true);
     Navigator.Current.NavigateToNewWallPost(0, false, 0, false, false, false);
 }
Example #47
0
        void image_mylocation_Tap(object sender, GestureEventArgs e)
        {
            if (Mymap.Layers.Contains(mypositionPoi))
            {
                Mymap.Layers.Remove(mypositionPoi);
                mypositionPoi.Clear();
            }

            if (Mymap.Layers.Contains(detailPois))
            {
                Mymap.Layers.Remove(detailPois);
                detailPois.Clear();
            }

            var img = (Ellipse)sender;
            var poi = img.DataContext as MyLocationPoi;
            var over = new MapOverlay { GeoCoordinate = poi.cordinate };
            var control = new MyLocationPoiControl();
            control.grd_loc.Tap += grd_loc_Tap;
            if (!_sourcePoi && !_externalSource)
                control.btn_source.Visibility = Visibility.Collapsed;
            control.btn_source.Click += my_locabtnclick;
            over.Content = control;
            over.PositionOrigin = new Point(0.5, 1.0);
            mypositionPoi.Add(over);
            Mymap.Layers.Add(mypositionPoi);

        }
Example #48
0
 private void FullscreenComic_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     NavigationService.GoBack();
 }
Example #49
0
 private void Mymap_Hold(object sender, GestureEventArgs e)
 {
     if (Mymap.Layers.Contains(floorPoisDetail))
         Mymap.Layers.Remove(floorPoisDetail);
     if (!_tileLoaded)
         RemoveIndoorStaff();
     var p = e.GetPosition(this.Mymap);
     _tapLocation = new GeoCoordinate();
     _tapLocation = Mymap.ConvertViewportPointToGeoCoordinate(p);
     _isSearch = false;
     AddPoi(_tapLocation);
 }
Example #50
0
 private void Delfino_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     NavigationService.Navigate(new Uri("/sbagliato.xaml", UriKind.Relative));
 }
Example #51
0
 private void image_floor_pois_Tap(object sender, GestureEventArgs e)
 {
     var img = (Image)sender;
     var poi = img.DataContext as FloorPoisDetails;
     buildingImg_tap(poi);
 }
Example #52
0
 private void ok_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     NavigationService.Navigate(new Uri("/lvlSet5/s5lvl2.xaml", UriKind.Relative));
 }
Example #53
0
 private void building_pois_tap(object sender, GestureEventArgs e)
 {
     if (Mymap.Layers.Contains(floorPoisDetail))
     {
         floorPoisDetail.Clear();
         Mymap.Layers.Remove(floorPoisDetail);
     }
 }
Example #54
0
 private void p1_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     VarGlobal.flag1 = true;
     p1.Visibility   = Visibility.Collapsed;
 }
Example #55
0
 void grid_details_Tap(object sender, GestureEventArgs e)
 {
     if (Mymap.Layers.Contains(mapHoldLayer))
     {
         Mymap.Layers.Remove(mapHoldLayer);
     }
     // MessageBox.Show("here");
 }
Example #56
0
 private void f_Hold(object sender, System.Windows.Input.GestureEventArgs e)
 {
     f.Visibility = Visibility.Collapsed;
     NavigationService.Navigate(new Uri("/lvlSet6/s6lvl10.xaml", UriKind.Relative));
 }
 private void LayoutRoot_OnTap(object sender, GestureEventArgs e)
 {
     App.Current.RootFrame.Navigate(new Uri("/View/Page/CalendarDayPage.xaml?uid=" + AccountID.ToString() + "&startDate="+TargetDate.ToShortDateString(),
                                            UriKind.Relative));
 }
 private void doc_name_search_Tap_1(object sender, System.Windows.Input.GestureEventArgs e)
 {
     NavigationService.Navigate(new Uri("/doc_searchall.xaml", UriKind.RelativeOrAbsolute));
 }
Example #59
0
 /// <summary>
 /// 选择查看的微博
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void FanListBox_Tap(object sender, GestureEventArgs gestureEventArgs)
 {
     if (Selected != null)
     {
         Selected((Status)FanListBox.SelectedItem);
     }
 }
Example #60
0
 //opens page to save a connection(not implemented)
 private void NewConnection(object sender, System.Windows.Input.GestureEventArgs e)
 {
     NavigationService.Navigate(new Uri("/NewSaved.xaml", UriKind.Relative));
 }