private void button2_Click(object sender, EventArgs e)
        {
            index = 0;
            myWebInfo = new infoWeb("sina");
            items = myServer.getUserInfo("sina");
            webBrowser1.Navigate(myWebInfo.loginUrl);

            //MessageBox.Show(webBrowser1.Document.Cookie);
            //MessageBox.Show(cookie.core.GetCookies(webBrowser1.Url.ToString()));
            //MessageBox.Show(cookie.core.GetCookies("http://t.163.com/session"));
               // webBrowser1.Navigate("http://reg.163.com/Logout.jsp");

            //webBrowser1.Document.Cookie.Remove(0,webBrowser1.Document.Cookie.Length);
            //ClearCookie();
        }
 private void button3_Click(object sender, EventArgs e)
 {
     index = 0;
     myWebInfo = new infoWeb("baidu");
     items = myServer.getUserInfo("baidu");
     webBrowser1.Navigate(myWebInfo.loginUrl);
 }
        private void button1_Click(object sender, EventArgs e)
        {
            index = 0;
            myWebInfo = new infoWeb("163");
            items = myServer.getUserInfo("163");
            //myWebInfo.loginUrl;
            foreach(Data item in items){
               // WebBrowser wb = new WebBrowser();
               // wb.Navigate("http://t.163.com/session");
               // wb.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(changeText);

            }

            //cookie.core.SetCookies("http://www.baidu.com", "BAIDUID=521BFCBD1CB25E10D130CC2371FAC037:FG=1; H_PS_PSSID=3364_3424_1448_3089; BDUSS=Blc2t1ZDhBbTd-dFlFakw3UC1OaHl-djFHdjBCU0V0elBQfm9nVlZsTU42WWxTQVFBQUFBJCQAAAAAAAAAAAEAAADkm5gdMTM2MTgzMTkyNTYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1cYlINXGJSeT; HOSUPPORT=1; Hm_lvt_90056b3f84f90da57dc0f40150f005d5=1382177793; Hm_lpvt_90056b3f84f90da57dc0f40150f005d5=1382177807; SAVEUSERID=480e1624ecd775cac16f9073a1929a87bca8ff; USERNAMETYPE=2; HISTORY_E=0926e7412afb5487f1c61018e4dfbe8357360847beb9c7; PTOKEN=a2fce7f9a244a69d1cf0de7f4fdbd0be; STOKEN=d399877eeace63e0842b4fc3bda15603");
            //MessageBox.Show(cookie.core.GetCookies("http://www.baidu.com"));
            //cookie.core.SetCookies("http://weibo.com/", "SUS=SID-3286645891-1382182663-GZ-n3b8m-a74c290a3941abe57e0eb211ff227ec7; SUE=es%3Dbe0cc4071fd2adffab2d2a436405390c%26ev%3Dv1%26es2%3D2e4f636535fe7b5d974da8bb46c94157%26rs0%3DIMafjNmI3bVbR5F8b%252BB7g9%252BBbvGY8fOUNMOawtKa7dEjmaCClmQ7m%252FHnjii0wsTubOuwWZ5PyiN7ZT6qxFlBcUE4eiycDuCS1Fy32H80lBovbRjjnm34wXMLXWu4x4bS3Ke5enbQBLp3m6pyQ7YaJqEQ4AW1WtA5E8rloI0DqIg%253D%26rv%3D0; SUP=cv%3D1%26bt%3D1382182663%26et%3D1382269063%26d%3D40c3%26i%3D7ec7%26us%3D1%26vf%3D0%26vt%3D0%26ac%3D2%26st%3D0%26lt%3D1%26uid%3D3286645891%26user%3D457786907%2540qq.com%26ag%3D4%26name%3D457786907%2540qq.com%26nick%3Dlol945%26sex%3D%26ps%3D0%26email%3D%26dob%3D%26ln%3D457786907%2540qq.com%26os%3D%26fmp%3D%26lcp%3D; ALF=1384774663; sso_info=v02m6alo5qztaybtrC5jYOUpp2WpaSPk4yyjoOYto2DlLiOk4TA; U_TRS1=00000068.ba0a2189.52626f0c.8ad0620b; U_TRS2=00000068.ba1d2189.52626f0c.6964908d; tgc=TGT-MzI4NjY0NTg5MQ==-1382182663-gz-48288BDCB64B4C1A464E2EC9AF1C7DAE; ALC=ac%3D2%26bt%3D1382182663%26cv%3D4.0%26et%3D1384774663%26uid%3D3286645891%26vf%3D0%26vt%3D0%26es%3Dc15ed13f2f811fdd609f245838f97afc; LT=1382182663");

            //MessageBox.Show(cookie.core.GetCookies("http://login.sina.com.cn"));
            //cookie.core.SetCookies("http://t.163.com", "_ntes_nnid=0a4d1251955c9fd1a8062940ad9a6400,1382090517346; _ntes_nuid=0a4d1251955c9fd1a8062940ad9a6400; [email protected]|1382106357|0|other|00&99|chq&1382105009&other#chq&null#10#0#0|&0|t|[email protected]; ALLYESID4=00131018173432872526709; usertrack=c+5+hFJhPQRuWnVd899TAg==; NTES_SESS=pTGKe6eKPz6T.oX7rVsEtnYl2qZfGBc3ENYKu29nhtiz22wsVv_GY.WiS3w8_3b6rhn7r9n3RBupLGjpQoIoN7L9oxPRGvSj1ZET622LWKXOtfO3YLPFslnOey8e.N3ZgPN.DRcomOPy0acJTIAIwkaBF4WtDW36m; S_INFO=1382106357|0|##|[email protected]; ANTICSRF=0cbfc67be6c24d7d3cd8f5e1d9a62c67; T_INFO=F9C5D3AE1F7D31FCE81BC2069FCFE5495C51C1E0BA58AA032B416ECC07AABEC083A3E82DE8B4D58F09A7B1FA13A74BC4; [email protected]%261%266%260%[email protected]%261%264%260%7C; SID=e7685bba-911f-4cba-97e0-34723a8aad72; JSESSIONID=adbWcuZeDpNG5eHht9lhu");
            //MessageBox.Show(cookie.core.GetCookies("http://t.163.com"));

            //webBrowser1.Navigate("http://login.sina.com.cn/member/my.php?entry=sso");
            //webBrowser1.Navigate("http://weibo.com/");
            webBrowser1.Navigate(myWebInfo.loginUrl);

            //webBrowser1.Stop();

            //webBrowser1.Navigate("http://www.baidu.com");

            //while(webBrowser1.ReadyState==WebBrowserReadyState.Complete){

              //  break;
        }