Esempio n. 1
0
        public void loadcomboTaks()
        {
            int items = 0;

            try {
                items = dataPos.shareoptions.Count;
            } catch {
                items = 0;
            }

            if (items == 0)
            {
                return;
            }

            shareList = new string[items];
            items     = 0;
            foreach (shareOptions s in dataPos.shareoptions)
            {
                shareList [items] = s.key;
                items++;
            }

            /*
             * shareList[0]= "FaceBook";
             * shareList[1]= "Twitter";
             * shareList[2]= "Email";
             */
            if (showComboTaks)
            {
                return;
            }

            cmbShare _pickerDataModel;

            _pickerDataModel = new cmbShare(this, shareList);

            if (IsTall)
            {
                pkrShare = new UIPickerView(new RectangleF(0, 290, 320, 216));
            }
            else
            {
                pkrShare = new UIPickerView(new RectangleF(0, 200, 320, 216));
            }

            pkrShare.Source = _pickerDataModel;
            pkrShare.ShowSelectionIndicator = true;



            var animation = CABasicAnimation.FromKeyPath("transform.translation.y");

            animation.From     = NSNumber.FromFloat(100);
            animation.To       = NSNumber.FromFloat(0);
            animation.Duration = .2;
            animation.FillMode = CAFillMode.Both;

            this.View.AddSubview(pkrShare);
            BarraShare = BarraShareGet();
            this.View.AddSubview(BarraShare);

            animation.AutoReverses = false;
            //animation.Delegate = new MyAnimationDelegate (v, true);
            pkrShare.Layer.AddAnimation(animation, "moveToHeader");

            pkrShare.Select(0, 0, false);

            showComboTaks = true;

            UpdatecurrenShareOpt = 0;
        }
Esempio n. 2
0
        private void loadpop(NSObject sender)
        {
            int items = 0;

            try {
                items = dataPos.shareoptions.Count;
            } catch {
                items = 0;
            }

            if (items == 0)
            {
                return;
            }

            shareList = new string[items];
            items     = 0;
            foreach (shareOptions s in dataPos.shareoptions)
            {
                shareList [items] = s.key;
                items++;
            }

            /*
             * shareList[0]= "FaceBook";
             * shareList[1]= "Twitter";
             * shareList[2]= "Email";
             */
            if (showComboTaks)
            {
                return;
            }

            cmbShare _pickerDataModel;

            _pickerDataModel = new cmbShare(this, shareList);

            BarraShare = BarraShareGet();
            pkrShare   = new UIPickerView(new RectangleF(0, 200, 320, 216));

            pkrShare.Source = _pickerDataModel;
            pkrShare.ShowSelectionIndicator = true;

            UIViewController vistaMain = new UIViewController();

            vistaMain.View.Frame = new RectangleF(0, 0, 320, 240);
            BarraShare.Frame     = new RectangleF(0, 0, 320, 40);
            pkrShare.Frame       = new RectangleF(0, 40, 320, 216);
            vistaMain.View.AddSubview(BarraShare);
            vistaMain.View.AddSubview(pkrShare);
            popviewNavigate = new UINavigationController(vistaMain);


            detailparameters = new UIPopoverController(popviewNavigate);
            detailparameters.SetPopoverContentSize(new SizeF(320, 240), true);

            detailparameters.DidDismiss += delegate {
                LastTappedButton = null;
                detailparameters = null;
            };
            UIButton tappedButton = (UIButton)sender;

            // this is for present the pop View
            detailparameters.PresentFromRect(tappedButton.Frame, View, UIPopoverArrowDirection.Any, true);
            LastTappedButton = tappedButton;
        }