コード例 #1
0
        public override bool checkLogin(loginCookies login)
        {
            if (login.username == "" || login.cookies == "")
            {
                return(false);
            }


            webHandler.setCookies(login.cookies);

            userLoginName = login.username;

            return(isLoggedIn());
        }
コード例 #2
0
        //public override Submission getNextImage()
        //{

        //    if (pos >= subs.Count())
        //    {
        //        return new Submission();
        //    }
        //    int i = pos;
        //    pos++;

        //    string uri = subs[i].thumbnail.ToString();
        //    Image image = webHandler.getImage(uri);

        //    Submission sub = new Submission();
        //    sub.thumbnail = image;
        //    sub.title = subs[i].title;
        //    string str = string.Format("FA_{0}", subs[i].id);
        //    sub.pageSource = str;

        //    return sub;
        //}

        //public override List<Subs> getThumbsList()
        //{
        //    return subs;
        //}

        public override async Task <bool> checkLogin(loginCookies login)
        {
            if (login.username == "" || login.cookies == "")
            {
                return(false);
            }


            webHandler.setCookies(login.cookies);

            userLoginName = login.username;

            return(await isLoggedInAsync());
        }
コード例 #3
0
        public override async Task <bool> checkLogin(loginCookies login)
        {
            WebHandler webHandler = new WebHandler();

            string data = string.Format("sid={0}", login.cookies);
            string url  = baseUrl + "api_submissions.php";

            string html = await webHandler.getPageAsync(url, data);

            dynamic json = JsonConvert.DeserializeObject(html);

            if (json.sid == "" || jsonError(json))
            {
                return(false);
            }

            sid = json.sid;

            loggedinUsername = login.username;

            return(true);
        }
コード例 #4
0
        public override bool checkLogin(loginCookies login)
        {
            WebHandler webHandler = new WebHandler();

            string data = string.Format("username={0}&password={1}", login.username, login.password);
            string url  = baseUrl + "api_login.php";

            string html = webHandler.getPage(url, data);

            dynamic json = JsonConvert.DeserializeObject(html);

            if (json.sid == "" || jsonError(json))
            {
                return(false);
            }

            sid = json.sid;

            loggedinUsername = login.username;

            return(true);
        }
コード例 #5
0
 public virtual async Task <bool> checkLogin(loginCookies login)
 {
     return(false);
 }
コード例 #6
0
 public virtual bool checkLogin(loginCookies login)
 {
     return(false);
 }