Example #1
0
        bool ClickedDropItem(MapView mapView, Marker marker)
        {
            mSelectedDrop = mDrops[marker.ZIndex];
            if (mSelectedDrop.Password == string.Empty || mSelectedDrop.Password == null)
            {
                var        currentLocation = LocationHelper.GetLocationResult();
                CLLocation dLocation       = new CLLocation(mSelectedDrop.Location_Lat, mSelectedDrop.Location_Lnt);
                CLLocation cLocation       = new CLLocation(currentLocation.Latitude, currentLocation.Longitude);
                var        distance        = dLocation.DistanceFrom(cLocation);

                if (distance > Constants.PURCHASE_DISTANCE)
                {
                    PurchasePopUp pPopup = PurchasePopUp.Create(Constants.PURCHASE_TYPE.VIEW);
                    pPopup.PopUp(true, OpenPurchase);
                }
                else
                {
                    ViewDropDetail();
                }
            }
            else
            {
                ShowTextFieldBox(Constants.STR_VERIFY_PASSWORD_TITLE, "Cancel", new[] { "OK" }, VerifyPassword);
            }

            return(true);
        }
Example #2
0
 partial void ActionNoExpiry(UIButton sender)
 {
     if (sender.Selected)
     {
         txtExpireDate.Enabled = true;
         txtExpireDate.Text    = "";
         sender.Selected       = !sender.Selected;
     }
     else
     {
         PurchasePopUp pPopup = PurchasePopUp.Create(Constants.PURCHASE_TYPE.EXPIRY);
         pPopup.PopUp(true, ExpiryPurchase);
     }
 }
Example #3
0
        partial void ActionDropItem(UIButton sender)
        {
            if (!ItemModel.IsValidDrop())
            {
                ShowMessageBox(null, Constants.STR_DROP_INVALID);
                return;
            }

            var        currentLocation = LocationHelper.GetLocationResult();
            CLLocation dLocation       = new CLLocation(ItemModel.Location_Lat, ItemModel.Location_Lnt);
            CLLocation cLocation       = new CLLocation(currentLocation.Latitude, currentLocation.Longitude);
            var        distance        = dLocation.DistanceFrom(cLocation);

            if (distance > Constants.PURCHASE_DISTANCE)
            {
                PurchasePopUp pPopup = PurchasePopUp.Create(Constants.PURCHASE_TYPE.DROP);
                pPopup.PopUp(true, DropPurchase);
                return;
            }

            CreateDrop(ItemModel.parseItem);
        }