예제 #1
0
파일: Ebookdz_f.cs 프로젝트: 24/source_04
        public static void Test_Login_02()
        {
            Http      http     = Ebookdz.LoadMainPage();
            XXElement xeSource = new XXElement(http.zGetXDocument().Root);

            Trace.WriteLine("Login        : \"{0}\"", Ebookdz.GetLogin(xeSource));
            bool isLoggedIn = Ebookdz.IsLoggedIn(xeSource);

            Trace.WriteLine("Is logged in : \"{0}\"", isLoggedIn);
            if (!isLoggedIn)
            {
                http = Ebookdz.Login(xeSource);
                Ebookdz.SaveCookies(http.RequestParameters.Cookies);

                http     = Ebookdz.LoadMainPage();
                xeSource = new XXElement(http.zGetXDocument().Root);
                Trace.WriteLine("Login        : \"{0}\"", Ebookdz.GetLogin(xeSource));
                Trace.WriteLine("Is logged in : \"{0}\"", Ebookdz.IsLoggedIn(xeSource));
            }
        }