コード例 #1
0
        private void GridGoToHome_Tap(object sender, TapEventArgs args)
        {
            args.Handled = true;

            this.touchGallery.GoToHome();
            this.RaiseGestureChanged("Tap");
        }
        private void Bindable_Tapped(object sender, TapEventArgs e)
        {
            var treeViewNode = ((sender as MR.Gestures.Grid).BindingContext) as TreeViewNode;
            var treeView     = (sender as MR.Gestures.Grid).Parent as SfTreeView;

            treeView.ExpandNode(treeViewNode);
        }
コード例 #3
0
 private static void TriggerTapEvent(TapEventArgs eArgs)
 {
     if (TapEvent != null)
     {
         TapEvent(null, eArgs);
     }
 }
コード例 #4
0
ファイル: GestureManager.cs プロジェクト: Clickery/PolyGunz
    private void FireTapEvent()
    {
        Debug.Log("Tap!, " + gesture_time);
        if (OnTap != null)
        {
            Ray        r      = Camera.main.ScreenPointToRay(start_pos);
            RaycastHit hit    = new RaycastHit();
            GameObject hitObj = null;

            if (Physics.Raycast(r, out hit, Mathf.Infinity))
            {
                hitObj = hit.collider.gameObject;
            }

            TapEventArgs args = new TapEventArgs(start_pos, hitObj);
            OnTap(this, args);

            if (hitObj != null)
            {
                ITapped tapped = hitObj.GetComponent <ITapped>();
                if (tapped != null)
                {
                    tapped.OnTap();
                }
            }
        }
    }
コード例 #5
0
 private void TransactionDate_OnTapped(object sender, TapEventArgs e)
 {
     transactionDatePicker.Focus();
     transactionDatePicker.DateSelected += TransactionDatePicker_DateSelected;
     transactionDatePicker.Unfocused    -= TransactionDatePicker_Unfocused;
     transactionDatePicker.Unfocused    += TransactionDatePicker_Unfocused;
 }
コード例 #6
0
 private void Vendor_OnTapped(object sender, TapEventArgs e)
 {
     vendorPicker.Focus();
     vendorPicker.SelectedIndexChanged += VendorPicker_SelectedIndexChanged;
     vendorPicker.Unfocused            -= VendorPicker_Unfocused;
     vendorPicker.Unfocused            += VendorPicker_Unfocused;
 }
コード例 #7
0
 private void TransactionType_OnTapped(object sender, TapEventArgs e)
 {
     transactionTypePicker.Focus();
     transactionTypePicker.SelectedIndexChanged += TransactionTypePicker_SelectedIndexChanged;
     transactionTypePicker.Unfocused            -= TransactionTypePicker_Unfocused;
     transactionTypePicker.Unfocused            += TransactionTypePicker_Unfocused;
 }
コード例 #8
0
 private void Category_OnTapped(object sender, TapEventArgs e)
 {
     categoryPicker.Focus();
     categoryPicker.SelectedIndexChanged += CategoryPicker_SelectedIndexChanged;
     categoryPicker.Unfocused            -= CategoryPicker_Unfocused;
     categoryPicker.Unfocused            += CategoryPicker_Unfocused;
 }
コード例 #9
0
 /// <summary>
 /// constructor
 /// </summary>
 /// <param name="source"></param>
 /// <param name="newListener"></param>
 public TapEventArgs(TapEventArgs source = null, Listener newListener = null) : base(source, newListener)
 {
     if (source != null)
     {
         NumberOfTaps = source.NumberOfTaps;
     }
 }
コード例 #10
0
        private void RecordMap_Tap(object sender, TapEventArgs e)
        {
            switch (map.MapPositionOption)
            {
            case PositionOption.Pin:
                _latitude            = e.Position.Latitude;
                _longitude           = e.Position.Longitude;
                SaveButton.IsEnabled = true;
                UpdatePin();
                break;

            case PositionOption.Line:
                map.RouteCoordinates.Add(new Xamarin.Forms.Maps.Position(e.Position.Latitude, e.Position.Longitude));
                SaveButton.IsEnabled = map.RouteCoordinates.Count() > 1;
                break;

            case PositionOption.Area:
                map.ShapeCoordinates.Add(new Xamarin.Forms.Maps.Position(e.Position.Latitude, e.Position.Longitude));
                SaveButton.IsEnabled = map.ShapeCoordinates.Count() > 2;
                break;

            default:
                break;
            }
        }
コード例 #11
0
 protected virtual void OnTapped(TapEventArgs e)
 {
     Console.WriteLine("TAPPING COUPON");
     Console.WriteLine(e.Sender);
     Console.WriteLine(id);
     Console.WriteLine(ImageUrl);
     //AddText(TapInfo("Tapped", e));
 }
コード例 #12
0
 protected virtual void RaiseTapEvent(TapEventArgs e)
 {
     e.Canvas = Tie;
     if (null != OnTap)
     {
         OnTap(this, e);
     }
 }
コード例 #13
0
        protected virtual void OnTap(TapEventArgs e)         //handler for ontap
        {
            var handler = Tap;

            if (handler != null)
            {
                handler(this, e);
            }
        }
コード例 #14
0
        private string TapInfo(string eventName, TapEventArgs e)
        {
            StringBuilder sb = new StringBuilder(eventName);

            sb.Append($" {GetElementName(e)} {e.NumberOfTaps} times with {e.NumberOfTouches} fingers.");
            sb.Append($" ViewPosition: {e.ViewPosition.X:F}/{e.ViewPosition.Y:F}/{e.ViewPosition.Width:F}/{e.ViewPosition.Height:F}");
            AddTouches(sb, e);

            return(sb.ToString());
        }
コード例 #15
0
        private void MainPage_Tap(object sender, TapEventArgs e)
        {
            var context = (NewPlacePageViewModel)this.BindingContext;

            context.DrawLocation(new LocationItemViewModel()
            {
                Title     = "Desconocido",
                Latitude  = e.Position.Latitude,
                Longitude = e.Position.Longitude
            });
        }
コード例 #16
0
        void _map_Tap(object sender, TapEventArgs e)
        {
            if (_map.Pins.Count == 0)
            {
                BuildPin(e.Position);
                _map.Pins.Add(MyPositionPin);
                return;
            }

            MovePin(e.Position);
        }
コード例 #17
0
        private void Mapa_OnTap(object sender, TapEventArgs e)
        {
            var pin = new Pin
            {
                Type     = PinType.Place,
                Position = e.Position,
                Label    = "Receptor",
                Address  = e.Position.Latitude + " X " + e.Position.Latitude,
            };

            Mapas.Pins.Add(pin);
        }
コード例 #18
0
        private void TapBehavior_Tap(object sender, TapEventArgs e)
        {
            if (e.Device is StylusDevice)
            {
                ListBoxItem item = (ListBoxItem)HelperClass.FindVisualAncestor((DependencyObject)sender, (o) => o.GetType() == typeof(ListBoxItem));

                if (item != null)
                {
                    item.IsSelected = !item.IsSelected;
                }
            }
        }
コード例 #19
0
 private void TapBehavior_Tap(object sender, TapEventArgs e)
 {
     if (e.Device is StylusDevice)
     {
         double position = ((StylusDevice)e.Device).GetPosition(flipper).X;
         flipper.Rotate(position < flipper.ActualWidth / 2.0);
     }
     else
     {
         double position = ((MouseDevice)e.Device).GetPosition(flipper).X;
         flipper.Rotate(position < flipper.ActualWidth / 2.0);
     }
 }
コード例 #20
0
        private string TapInfo(string start, TapEventArgs e)
        {
            StringBuilder sb = new StringBuilder(start);

            sb.AppendFormat(" {0} {1} times with {2} fingers.", GetElementName(e), e.NumberOfTaps, e.NumberOfTouches);
            sb.AppendFormat(" ViewPosition: {0}/{1}/{2}/{3}, Touches: ", e.ViewPosition.X, e.ViewPosition.Y, e.ViewPosition.Width, e.ViewPosition.Height);
            if (e.Touches != null && e.Touches.Length > 0)
            {
                sb.Append(String.Join(", ", e.Touches.Select(t => t.X + "/" + t.Y)));
            }

            return(sb.ToString());
        }
コード例 #21
0
ファイル: TapSampleReceiver.cs プロジェクト: K33W1/MOBIGAM-MP
 private void Spawn(object sender, TapEventArgs e)
 {
     if (e.TappedObject == null)
     {
         Ray        ray     = Camera.main.ScreenPointToRay(e.TapPosition);
         GameObject toSpawn = toSpawnPrefabs[index];
         index = (index + 1) % toSpawnPrefabs.Length;
         Instantiate(toSpawn, ray.GetPoint(5f), Quaternion.identity);
     }
     else
     {
         Debug.Log($"Hit {e.TappedObject.name}!");
     }
 }
コード例 #22
0
ファイル: GestureManager.cs プロジェクト: K33W1/MOBIGAM-MP
    private void FireTapEvent()
    {
        GameObject   hitObj = GetHitGameObject(startPos);
        TapEventArgs args   = new TapEventArgs(startPos, hitObj);

        OnTap?.Invoke(this, args);

        if (hitObj != null)
        {
            if (hitObj.TryGetComponent(out ITappable tappedObj))
            {
                tappedObj.OnTap();
            }
        }
    }
コード例 #23
0
ファイル: MainGUI.cs プロジェクト: mortdeus/magnate
        void HandleShowOptionsButtonTGTapDetected(object sender, TapEventArgs e)
        {
            OptionsBox.Visible   = true;
            OptionsCheck.Visible = true;
            if (TutorialMode)
            {
                OptionsCheck.Enabled = true;
                OptionsCheck.Checked = true;
            }
            OptionsCloseButton.Visible     = true;
            OptionsTutorialOnorOff.Visible = true;
            QUITDEMO.Visible = true;

            ShowOptions.Visible = false;
        }
コード例 #24
0
    private void OnTap(object sender, TapEventArgs e)
    {
        if (e.TappedObject == null)
        {
            Debug.Log("you tapped on nothing!");
            Vector2 pos = e.TapPosition;
            Ray     r   = Camera.main.ScreenPointToRay(pos);

            Spawn(r.GetPoint(10));
        }
        else
        {
            Debug.Log($"Hit {e.TappedObject.name}");
        }
    }
コード例 #25
0
    private void onTapped(object sender, TapEventArgs e)
    {
        if ((focusedVisualizedTextTmp != "" && focusedVisualizedTextTmp != null) &&
            (visualizedTextFocused))
        {
            //Test
            selectedWordsList.Add(focusedVisualizedTextTmp);
            visualTextManager.visualizeSelectedWords(selectedWordsList);
        }


        //        selectedWordsList.Insert(selectedWordsList.Count, e.Word);
        //#if (!UNITY_EDITOR)
        //        ApiYummlyRecipes.Instance.HttpGetRecipesByIngredients(new string[] { e.Word });
        //#endif
    }
コード例 #26
0
        //private string getSpecificGoogleInfo(string placeId)
        //{
        //    string fixedUrl = detailSearch + placeId + "&key=" + googleKey;


        //    return fixedUrl;
        //}

        private void Image_Tapped(object sender, TapEventArgs e)
        {
            var cpn = (MR.Gestures.Image)sender;
            var abs = cpn.Parent.Id;
            // Debug.WriteLine("WERE TAPPING OTHER ====" + abs);
            var _coupon = couponList.couponList.FirstOrDefault(c => c.thisCoupon.ImageStream == cpn.Source);

            if (_coupon != null)
            {
                Debug.WriteLine("WERE TAPPING ICON ===" + _coupon.Loc);
                // Debug.WriteLine("WERE TAPPING ICON ===" + _coupon.Longitude);
                //  var findplace = new FindPlacePage(_coupon.Latitude, _coupon.Longitude);
                // await Navigation.PushAsync(findplace);
            }

            //Debug.WriteLine("WERE TAPPING ICON");
        }
コード例 #27
0
    private void FireTapEvent()
    {
        GameObject hitObj = GetHitInfo(startPoint);

        var args = new TapEventArgs(startPoint, hitObj);

        OnTap?.Invoke(this, args);

        if (hitObj is null)
        {
            return;
        }

        var tap = hitObj.GetComponent <ITapped>();

        tap.OnTap(args);
    }
コード例 #28
0
    void SingleTap()
    {
        Debug.LogError("SingleTap was recognized.");
        // source.PlayOneShot(singleTapSound);
        // select words
#if (!UNITY_EDITOR)
        // send event to Controller
        TapEventArgs args = new TapEventArgs();

        args.Word = "garlic";
        var handler = Tapped;
        if (handler != null)
        {
            handler.Invoke(this, args);
        }
#endif
    }
コード例 #29
0
        private async void couponTapped(object sender, TapEventArgs e)
        {
            var cpn     = (MR.Gestures.Image)sender;
            var _coupon = couponList.couponList.FirstOrDefault(c => c.thisCoupon.ImageStream == cpn.Source);

            //string fixedurl = getSpecificGoogleInfo(_coupon.PlaceId);
            //using (var client = new HttpClient())
            //{
            //    var response = await client.GetStringAsync(string.Format(fixedurl));
            //    var result = JsonConvert.DeserializeObject<GooglePlaces>(response);
            //    if (result.result != null)
            //    {
            //        var use = result.result;
            _coupon = await _google.GooglePlaceDetails(_coupon);;
            Console.WriteLine("use=>" + _coupon.thisCoupon.GoogleData.name);
            // }
            // }
        }
コード例 #30
0
ファイル: MainGUI.cs プロジェクト: mortdeus/magnate
        void btnBuildingsTabTGEventHandler(object sender, TapEventArgs e)
        {
            if (curSelectedTab == (int)selectedTab.BUILDINGS)
            {
                //deselects building tab
                BuildingsTabFocus.Visible = false;
                BuildingsTabTop.Visible   = false;

                if (!TutorialMode)
                {
                    DialogueBox.Visible = false;
                }
                DialogueBoxVisible         = false;
                BlackSmith.Visible         = false;
                CharacterOutline_1.Visible = false;
                CharacterOutline_2.Visible = false;


                curSelectedTab = (int)selectedTab.NONE;
            }
            else
            {
                //deselects everything else
                OfficersTabTop.Visible   = false;
                OfficersTabFocus.Visible = false;
                RecruitTabTop.Visible    = false;
                RecruitTabFocus.Visible  = false;
                AidenPortrait.Visible    = false;
                KiraPortrait.Visible     = false;



                //selects building tab
                BuildingsTabFocus.Visible = true;
                BuildingsTabTop.Visible   = true;
                //DialogueBox.Visible = true;
                BlackSmith.Visible = true;

                curSelectedTab = (int)selectedTab.BUILDINGS;

                DialogueBoxVisible = true;
            }
        }
コード例 #31
0
ファイル: CouponSchedule.cs プロジェクト: Mumot145/Fynd
        protected virtual void OnTapped(TapEventArgs e)
        {
            Console.WriteLine("TAPPING LOCATION");
            Console.WriteLine(e.Sender);
            Console.WriteLine(Loc.lat);
            Console.WriteLine(Loc.lng);
            // Console.WriteLine(Coordinates.lat);
            // Console.WriteLine(Coordinates.lng);
            Console.WriteLine(_placeId);
            if (OnFindCoupon == null)
            {
                return;
            }

            FindEventArgs args = new FindEventArgs(this);

            OnFindCoupon(this, args);
            ///OnFindCoupon(new FindEventArgs(_location));
            //AddText(TapInfo("Tapped", e));
        }
コード例 #32
0
		protected virtual void OnTapping(TapEventArgs e)
		{
			AddText(TapInfo("Tapping", e));
		}
コード例 #33
0
 private void TapBehavior_Tap(object sender, TapEventArgs e)
 {
     if (e.Device is StylusDevice)
     {
         double position = ((StylusDevice)e.Device).GetPosition(flipper).X;
         flipper.Rotate(position < flipper.ActualWidth / 2.0);
     }
     else
     {
         double position = ((MouseDevice)e.Device).GetPosition(flipper).X;
         flipper.Rotate(position < flipper.ActualWidth / 2.0);
     }
 }
コード例 #34
0
		private string TapInfo(string start, TapEventArgs e)
		{
			StringBuilder sb = new StringBuilder(start);

			sb.AppendFormat(" {0} {1} times with {2} fingers.", GetElementName(e), e.NumberOfTaps, e.NumberOfTouches);
			sb.AppendFormat(" ViewPosition: {0}/{1}/{2}/{3}, Touches: ", e.ViewPosition.X, e.ViewPosition.Y, e.ViewPosition.Width, e.ViewPosition.Height);
			if (e.Touches != null && e.Touches.Length > 0)
				sb.Append(String.Join(", ", e.Touches.Select(t => t.X + "/" + t.Y)));

			return sb.ToString();
		}
コード例 #35
0
        private void CanvasGallery_Tap(object sender, TapEventArgs args)
        {
            var image = args.OriginalSource as Image;
            if (image == null)
            {
                return;
            }

            this.DoTransitionToDetails(image);
            this.RaiseGestureChanged("Tap");
        }
コード例 #36
0
 protected virtual void OnTapped(TapEventArgs e)
 {
    // AddText(TapInfo("Tapped", e));
 }
コード例 #37
0
 void _tapbehavior_DoubleTap(object sender, TapEventArgs e)
 {
     SetValue(IsSelectedProperty, true);
 }
 private void OnTapping(object sender, TapEventArgs tapEventArgs)
 {
     var listView = (MultiLevelListView)Parent;
     listView.OnItemTapped(Item);
 }
コード例 #39
0
 private void Tap_Tap(object sender, TapEventArgs e)
 {
     var postit = sender as Postit;
     postit.Background = new SolidColorBrush(RandomHelper.GetRandomColor());
 }
コード例 #40
0
		protected virtual void OnDoubleTapped(TapEventArgs e)
		{
			AddText(TapInfo("DoubleTapped", e));
		}
コード例 #41
0
		void Red_DoubleTapped(object sender, TapEventArgs e)
		{
			AddText("BoxViewXaml.Red_DoubleTapped method called with " + e.NumberOfTouches + " fingers");
		}
 private void CanvasDetails_Tap(object sender, TapEventArgs args)
 {
     this.ImageSource = null;
     this.RaiseGestureChanged("Tap");
 }
コード例 #43
0
        private void TapBehavior_Tap(object sender, TapEventArgs e)
        {
            if (e.Device is StylusDevice)
            {
                ListBoxItem item = (ListBoxItem)HelperClass.FindVisualAncestor((DependencyObject)sender, (o) => o.GetType() == typeof(ListBoxItem));

                if (item != null)
                    item.IsSelected = !item.IsSelected;
            }
        }
コード例 #44
0
 private static void TriggerTapEvent(TapEventArgs eArgs)
 {
     if (TapEvent != null)
     {
         TapEvent(null, eArgs);
     }
 }