コード例 #1
0
        void NextPage()
        {
            var me    = RealmUserServices.GetMe(true);
            var realm = RealmManager.SharedInstance.GetRealm(null);

            //cache facebook image
            var str   = "https://graph.facebook.com/" + Shared.FacebookUserId + "/picture?type=large";
            var image = UIImage.LoadFromData(NSData.FromUrl(NSUrl.FromString(str)));
            var bytes = ImageUtils.ByteArrayFromImage(image, 50);

            S3Utils.UploadPhoto(bytes, me.LocalProfileImageURL, me.RemoteProfileImageURL, "Profile.png", null, null);

            Shared.NextPage();

            UIView.Animate(1, delegate
            {
                View.Alpha = 0;
            }, delegate
            {
                if (String.IsNullOrEmpty(me.FirstName) || String.IsNullOrEmpty(me.LastName))
                {
                    ((LandingTabbarController)TabBarController).SetSelectedViewControllerByType(typeof(HelloViewController), false, null);
                }
                else
                {
                    SlinkUser.SetNextHandelByNameIfNecessary();
                    ApplicationExtensions.ShowOnboarding(false);
                }
            });
        }
コード例 #2
0
        partial void StartButtonClicked(Foundation.NSObject sender)
        {
            string firstName = FirstNameTextField.Text.Trim();
            string lastName  = LastNameTextField.Text.Trim();

            bool allFieldsValid = ValidateAllFields();

            if (!allFieldsValid)
            {
                return;
            }

            var realm = RealmManager.SharedInstance.GetRealm(null);
            var me    = RealmUserServices.GetMe(false);


            realm.Write(() =>
            {
                me.FirstName = firstName;
                me.LastName  = lastName;
            });

            SlinkUser.SetNextHandelByNameIfNecessary();

            UIView.Animate(1, delegate
            {
                View.Alpha = 0;
            }, delegate
            {
                ApplicationExtensions.ShowOnboarding(true);
            });
        }
コード例 #3
0
ファイル: LoginFragment.cs プロジェクト: seasiainfotech/Slink
        void NextPage()
        {
            var me = RealmUserServices.GetMe(true);

            //cache facebook image
            var str   = "https://graph.facebook.com/" + Shared.FacebookUserId + "/picture?type=large";
            var image = ImageUtils.GetImageBitmapFromUrl(str);
            var bytes = ImageUtils.ImagetoByteArray(image, 100);

            S3Utils.UploadPhoto(bytes, me.LocalProfileImageURL, me.RemoteProfileImageURL, "Profile.png", null, null);

            Shared.NextPage();

            if (String.IsNullOrEmpty(me.FirstName) || String.IsNullOrEmpty(me.LastName))
            {
                //((LandingTabbarController)TabBarController).SetSelectedViewControllerByType(typeof(HelloViewController), false, null);
            }
            else
            {
                SlinkUser.SetNextHandelByNameIfNecessary();
                Activity.StartActivity(typeof(InstructionActivity));
            }
        }