Пример #1
0
        private async void CaptchaClick(object sender, RoutedEventArgs e)
        {
            start_login.captcha_src_result = new LoginHelper.CaptchaSrcResult();
            await start_login.GetCaptchaSrc();

            if (start_login.captcha_src_result.Status == 1)
            {
                CaptchaImg.Source = start_login.captcha_src_result.CaptchaSrc;
            }
            else
            {
                Console.WriteLine("Captcha Failed");
            }
        }
Пример #2
0
        private async Task <bool> CheckLogin()
        {
            var check_login_result = await LoginHelper.CheckLogin();

            if (check_login_result.Status == 1)
            {
                return(true);
            }
            var start_login = new LoginHelper.StartLogin();
            await start_login.GetCaptchaSrc();

            if (start_login.captcha_src_result.Status == -1)
            {
                return(true);
            }
            else
            {
                var login_popup = new Views.Login(ref start_login);
                GridMain.Children.Add(login_popup);
                Grid.SetRowSpan(login_popup, 2);
                Grid.SetColumnSpan(login_popup, 2);
            }
            return(false);
        }