Esempio n. 1
0
        //检测是否已经认证过教务系统
        public async Task <bool> GetAuthState(Service.HttpBaseService _httpService, string username)
        {
            var re = await _httpService.GetResponseCode(checckAuthUri + username);

            if (re == System.Net.HttpStatusCode.OK)
            {
                return(true);
            }
            return(false);
        }
Esempio n. 2
0
        public async Task <bool> GetAuthenStatus()
        {
            try
            {
                var code = await _httpService.GetResponseCode(lgnUri);

                if (code == System.Net.HttpStatusCode.OK)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch
            {
                return(false);
            }
        }
        /// <summary>
        /// 设置登录状态,检测登录页“F.htm”
        /// </summary>
        /// <returns></returns>
        public async Task SetAuthenStatus()
        {
            try
            {
                var code = await _httpService.GetResponseCode(bjutUri);

                if (code == System.Net.HttpStatusCode.OK)
                {
                    IsAuthencated = true;
                }
                else
                {
                    IsAuthencated = false;
                }
            }
            catch
            {
                IsAuthencated = false;
            }
        }
Esempio n. 4
0
        //检测是否能链接到教务系统
        public async Task <bool> GetConnectedStatus(Service.HttpBaseService _httpService)
        {
            try
            {
                var re = await _httpService.GetResponseCode(educenterUri);

                if (re == System.Net.HttpStatusCode.OK)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch
            {
                return(false);
            }
        }