コード例 #1
0
        public async void LoadUserList(string token)
        {
            indicator.StartIndicator();
            Menue.Clear();
            var userList = await userDetailsServices.GetFriendsList(token);


            FriendListResponseModel friendResponsModel = JsonConvert.DeserializeObject <FriendListResponseModel>(userList);

            if (friendResponsModel.status.Equals("ok"))
            {
                if (!friendResponsModel.services.Any())
                {
                    IsEmptyList = true;
                }
                else
                {
                    foreach (var user in friendResponsModel.services)
                    {
                        menue.Add(new Service()
                        {
                            USERNAME = user.USERNAME, PICTURE_URL = user.PICTURE_URL
                        });
                    }

                    IsEmptyList = false;
                }
            }

            indicator.EndIndicator();
        }
コード例 #2
0
        public async void GetAuthonticationChallange(int id, int rootPage)
        {
            indicator.StartIndicator();
            var challnageResult = await challangeServices.GetChallange(id);

            if (challnageResult)
            {
                await navigation.PushAsync(new InstergramVeryfiyCode(rootPage));
            }
            else
            {
            }
            indicator.EndIndicator();
        }
コード例 #3
0
        public async Task <bool> AuthonticationAsync()
        {
            indicator.StartIndicator();
            var result = await services.UserLogin(Username, Password);

            if (result.Item2)
            {
                indicator.EndIndicator();
                await navigation.PushAsync(new ItemPage(result.Item1));
            }
            else
            {
                indicator.EndIndicator();
                return(false);
            }

            return(true);
        }
コード例 #4
0
        public async Task <bool> Authontication()
        {
            indicator.StartIndicator();
            var result = await instergramServices.UserLogin(Username, PassWord);

            if (result.Item3)
            {
                indicator.EndIndicator();

                if (result.Item4 == 0)
                {
                    await navigation.PushAsync(new CompletionPage());
                }
                else if (result.Item4 == 2)
                {
                    var insterUser = new InsterUserModel()
                    {
                        email = result.Item2, phone = result.Item1, pageRoot = result.Item4
                    };
                    await navigation.PushAsync(new SelecteChallengePage(insterUser));
                }
                else if (result.Item4 == 8)
                {
                    var insterUser = new InsterUserModel()
                    {
                        email = result.Item2, phone = result.Item1, pageRoot = result.Item4
                    };
                    await navigation.PushAsync(new SelecteChallengePage(insterUser));
                }
            }
            else
            {
                indicator.EndIndicator();
                return(false);
            }

            return(true);
        }
コード例 #5
0
        public async Task <bool> VerfyCode()
        {
            bool verifyStatus = false;

            indicator.StartIndicator();
            if (RootPage == 2)
            {
                verifyStatus = await verifyService.GetVerifyCodeServices(VerifyCode);
            }
            else if (RootPage == 8)
            {
                verifyStatus = await verifyService.GetVerifyCodeTwofactorAuthontication(VerifyCode);
            }

            if (!verifyStatus)
            {
                indicator.EndIndicator();
                return(false);
            }
            indicator.EndIndicator();
            await navigation.PushAsync(new CompletionPage());

            return(true);
        }