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

            if (re == System.Net.HttpStatusCode.OK)
            {
                return(true);
            }
            return(false);
        }
示例#2
0
        //检测是否能链接到教务系统
        public async Task <bool> GetConnectedStatus(Services.HttpBaseService _httpService)
        {
            try
            {
                var re = await _httpService.GetResponseCode(GetBaseUri() + educenterUri);

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