//sohu reg private void button2_Click(object sender, EventArgs e) { //GetImageEx GoodsFresh objFreshEx = new GoodsFresh(); ClassHttpPost webPost = new ClassHttpPost(); objFreshEx.SetWebPost(webPost); string strRet = webPost.GetHttpPage("https://session.trionworlds.com/login?service=unspecified&locale=zh_CN", "gb2312", "get", "", "", "", "*/*", ""); string strError = ""; // https://session.trionworlds.com/login;jsessionid=F355EBF3FCC45A052024921548FD6D59 //<form id="fm1" class="clearfix" action="/login;jsessionid=46E8217B16B969395A786F70C63DB4F0" method="post"> // string strUrl = GetKeyString(strRet, "id=\"fm1\" class=\"clearfix\" action=\"", "\""); strUrl = "https://session.trionworlds.com" + strUrl; string strCode = GetKeyString(strRet, "name=\"lt\" value=\"", "\"");; string strData = string.Format("[email protected]&password=l19b351k<={0}&_eventId=submit", strCode ); strRet = webPost.GetHttpPage(strUrl, "gb2312", "POST", "", strData, "https://session.trionworlds.com/login?service=unspecified&locale=zh_CN", "*/*", ""); }
//sohu reg private void button2_Click(object sender, EventArgs e) { //GetImageEx GoodsFresh objFreshEx = new GoodsFresh(); ClassHttpPost webPost = new ClassHttpPost(); objFreshEx.SetWebPost(webPost); string strRet = webPost.GetHttpPage("https://session.trionworlds.com/login?service=unspecified&locale=zh_CN", "gb2312", "get","", "", "", "*/*", ""); string strError = ""; // https://session.trionworlds.com/login;jsessionid=F355EBF3FCC45A052024921548FD6D59 //<form id="fm1" class="clearfix" action="/login;jsessionid=46E8217B16B969395A786F70C63DB4F0" method="post"> // string strUrl = GetKeyString(strRet, "id=\"fm1\" class=\"clearfix\" action=\"", "\""); strUrl = "https://session.trionworlds.com" + strUrl; string strCode = GetKeyString(strRet, "name=\"lt\" value=\"", "\""); ; string strData = string.Format("[email protected]&password=l19b351k<={0}&_eventId=submit", strCode ); strRet = webPost.GetHttpPage(strUrl, "gb2312", "POST","", strData, "https://session.trionworlds.com/login?service=unspecified&locale=zh_CN", "*/*", ""); }
private void button1_Click(object sender, EventArgs e) { // _GoodsFreshStr objInfoEx = new _GoodsFreshStr(); //objInfoEx.strAcc = "aaa"; TestStr1 bulder = new TestStr1(); bulder.strAcc = "AAA"; Hashtable tblHash = new Hashtable(); bulder.strAcc = "AAABBB"; _GoodsFreshStr objInfoExEx = new _GoodsFreshStr(); string strDirectoryXls = System.AppDomain.CurrentDomain.BaseDirectory + "xlsfile"; SaveToExcel(strDirectoryXls, null, "aaaaa"); return; GoodsFresh objFreshEx = new GoodsFresh(); ClassHttpPost webPost = new ClassHttpPost(); objFreshEx.SetWebPost(webPost); string strDirect = System.AppDomain.CurrentDomain.BaseDirectory + "pic"; if (!Directory.Exists(strDirect)) { Directory.CreateDirectory(strDirect); } return; //string str = System.Web.HttpUtility.UrlEncode("你好", Encoding.GetEncoding("gb2312")); string str = string.Format("{0} {1}", 519.0, 535.01); MessageBox.Show(str); return; TimerFunction(); return; string strAcc = "heilongjiangjt"; _GoodsFreshStr objInfo = new _GoodsFreshStr(); DataContrl.GetDataCache(strAcc, ref objInfo); MessageBox.Show(objInfo.iFreshCount.ToString()); objInfo.iFreshCount = 2; //DataContrl.InitFreshTime(); DataContrl.GetDataCache(strAcc, ref objInfo); MessageBox.Show(objInfo.iFreshCount.ToString()); return; IsSetIllegal(); return; _GoodsFreshStr goodInfo = new _GoodsFreshStr(); bool bRet = DataContrl.GetDataCache("heilongjiangjt", ref goodInfo); if (!bRet) { return; } GoodsFresh objFresh = new GoodsFresh(); objFresh.SetWebPost(goodInfo.webPost); bRet = objFresh.Login(goodInfo.strAcc, goodInfo.strPwd,true); string strError = ""; objFresh.FreshQuick(out strError,out strError); }
public void Fresh() { _GoodsFreshStr goodInfo = new _GoodsFreshStr(); GoodsFresh objFresh = new GoodsFresh(); bool bRet = false; string strFreshAcc = ""; string strModifyAcc = ""; string strSynAcc = ""; DateTime tOldShowTime = DateTime.Now.AddHours(-1); while (m_bFresh) { //同步列表 strSynAcc = DataContrl.GetFirstSynAccount(); if (strSynAcc != "") { ShowLogString(string.Format("{0} 开始同步商品信息!", strSynAcc)); bRet = DataContrl.GetDataCache(strSynAcc, ref goodInfo); if (!bRet) { Thread.Sleep(100); continue; } objFresh.SetWebPost(goodInfo.webPost); bRet = Fresh(ref goodInfo, objFresh,true); if (bRet) { goodInfo.strSynStatus = "同步成功,需要重启"; ShowLogString(string.Format("{0} 同步成功,需要重启", goodInfo.strAcc)); } else { //goodInfo.strSynStatus = "同步失败"; ShowLogString(string.Format("{0} 同步失败:{1}", goodInfo.strAcc, goodInfo.strSynStatus)); } ShowInfo(goodInfo); Thread.Sleep(1000); continue; } //从修改价格列表获取,如果有,则修改 strModifyAcc = DataContrl.GetFirstModifyAccount(); if (strModifyAcc != "") { ShowLogString(string.Format("{0} 开始修改价格!", strModifyAcc)); bRet = DataContrl.GetDataCache(strModifyAcc, ref goodInfo); if (!bRet) { Thread.Sleep(100); continue; } objFresh.SetWebPost(goodInfo.webPost); bRet = Modify(ref goodInfo, objFresh); if (bRet) { ShowLogString(string.Format("{0} 修改成功", goodInfo.strAcc)); } else { goodInfo.iFreshFailCount += 1; ShowLogString(string.Format("{0} 修改失败:{1}", goodInfo.strAcc, goodInfo.strFreshStatus)); } Thread.Sleep(1000); continue; } #if __PAOPAO Thread.Sleep(500); continue; #endif if (m_bSuspendFresh) { TimeSpan tSpan = DateTime.Now - tOldShowTime; if (tSpan.TotalMinutes > 2) { ShowLogString("刷新暂停中..."); tOldShowTime = DateTime.Now; } Thread.Sleep(500); continue; } //从刷新列表获取,有则刷新,无则继续循环 strFreshAcc = DataContrl.GetFirstAccount(); if (strFreshAcc == "") { Thread.Sleep(100); continue; } bRet = DataContrl.GetDataCache(strFreshAcc, ref goodInfo); if (!bRet) { Thread.Sleep(100); continue; } objFresh.SetWebPost(goodInfo.webPost); if (m_iFreshType == 0) //一键刷新 { goodInfo.bModify = false; bRet = FreshQuick(ref goodInfo, objFresh); } else { bRet = Fresh(ref goodInfo, objFresh,false); } if (bRet) { goodInfo.strFreshStatus = "刷新成功"; goodInfo.iFreshSucCount += 1; ShowLogString(string.Format("{0} 刷新成功", goodInfo.strAcc)); } else { goodInfo.iFreshFailCount += 1; ShowLogString(string.Format("{0} 刷新失败:{1}", goodInfo.strAcc, goodInfo.strFreshStatus)); } ShowInfo(goodInfo); Thread.Sleep(1000); } }
public void Fresh() { _GoodsFreshStr goodInfo = new _GoodsFreshStr(); GoodsFresh objFresh = new GoodsFresh(); bool bRet = false; string strFreshAcc = ""; string strModifyAcc = ""; string strSynAcc = ""; DateTime tOldShowTime = DateTime.Now.AddHours(-1); while (m_bFresh) { //从刷新列表获取,有则刷新,无则继续循环 strFreshAcc = DataContrl.GetFirstAccount(); if (strFreshAcc == "") { Thread.Sleep(100); break; } bRet = DataContrl.GetDataCache(strFreshAcc, ref goodInfo); if (!bRet) { Thread.Sleep(100); break; } if (m_bSuspendFresh) { MessageBox.Show("请确定在继续之前IP已经变化", "确认"); } objFresh.m_objForm = this; objFresh.SetWebPost(goodInfo.webPost); FreshQuick(goodInfo, objFresh); Thread.Sleep(1000); } }
//sohu reg private void button2_Click(object sender, EventArgs e) { _GoodsFreshStr goodInfo = new _GoodsFreshStr(); goodInfo.strAcc = "testAcc"; goodInfo.strOrderID = "222222222222222"; goodInfo.bShowAcc = true; AddViewItem(goodInfo); _GoodsFreshStr goodInfo1 = new _GoodsFreshStr(); goodInfo1.strAcc = "testAcc111"; goodInfo1.strOrderID = "BBBBBBBBBBB"; goodInfo1.bShowAcc = true; AddViewItem(goodInfo1); goodInfo.strOrderID = "3333333333"; goodInfo.bShowAcc = false; AddViewItem(goodInfo); goodInfo.strOrderID = "4444444444"; goodInfo.bShowAcc = false; AddViewItem(goodInfo); goodInfo.strOrderID = "4444444444"; goodInfo.bShowAcc = false; goodInfo.bModify = true; goodInfo.strFreshStatus = "获取订单成功"; AddViewItem(goodInfo); goodInfo1.strOrderID = "55555555555555"; goodInfo1.bShowAcc = false; AddViewItem(goodInfo1); goodInfo1.strOrderID = "6666666666666666"; goodInfo1.bShowAcc = false; AddViewItem(goodInfo1); return; //%u4E0A%u6D77 string strProvince = strProvince = Escape("上海");//, Encoding.GetEncoding("gb2312")); return; //GetImageEx GoodsFresh objFreshEx = new GoodsFresh(); ClassHttpPost webPost = new ClassHttpPost(); objFreshEx.SetWebPost(webPost); string strRet = webPost.GetHttpPage("https://session.trionworlds.com/login?service=unspecified&locale=zh_CN", "gb2312", "get","", "", "", "*/*", ""); string strError = ""; // https://session.trionworlds.com/login;jsessionid=F355EBF3FCC45A052024921548FD6D59 //<form id="fm1" class="clearfix" action="/login;jsessionid=46E8217B16B969395A786F70C63DB4F0" method="post"> // string strUrl = GetKeyString(strRet, "id=\"fm1\" class=\"clearfix\" action=\"", "\""); strUrl = "https://session.trionworlds.com" + strUrl; string strCode = GetKeyString(strRet, "name=\"lt\" value=\"", "\""); ; string strData = string.Format("[email protected]&password=l19b351k<={0}&_eventId=submit", strCode ); strRet = webPost.GetHttpPage(strUrl, "gb2312", "POST","", strData, "https://session.trionworlds.com/login?service=unspecified&locale=zh_CN", "*/*", ""); }
//sohu reg private void button2_Click(object sender, EventArgs e) { clsMCI cm = new clsMCI(); cm.FileName = "Notice.mp3"; cm.play(); return; _GoodsFreshStr goodInfo = null; DataContrl.GetDataCache("*****@*****.**", ref goodInfo); goodInfo.strFreshStatus = "下单成功"; ShowStatusInfo(goodInfo); DataContrl.GetDataCache("[email protected]", ref goodInfo); goodInfo.strFreshStatus = "失败"; ShowStatusInfo(goodInfo); DataContrl.GetDataCache("[email protected]", ref goodInfo); goodInfo.strFreshStatus = "登录中..."; ShowStatusInfo(goodInfo); return; string strShow = string.Format("{0}", DateTime.Now.ToFileTime()); MessageBox.Show(strShow); return; //GetImageEx GoodsFresh objFreshEx = new GoodsFresh(); ClassHttpPost webPost = new ClassHttpPost(); objFreshEx.SetWebPost(webPost); string strRet = webPost.GetHttpPage("https://session.trionworlds.com/login?service=unspecified&locale=zh_CN", "gb2312", "get","", "", "", "*/*", ""); string strError = ""; // https://session.trionworlds.com/login;jsessionid=F355EBF3FCC45A052024921548FD6D59 //<form id="fm1" class="clearfix" action="/login;jsessionid=46E8217B16B969395A786F70C63DB4F0" method="post"> // string strUrl = GetKeyString(strRet, "id=\"fm1\" class=\"clearfix\" action=\"", "\""); strUrl = "https://session.trionworlds.com" + strUrl; string strCode = GetKeyString(strRet, "name=\"lt\" value=\"", "\""); ; string strData = string.Format("[email protected]&password=l19b351k<={0}&_eventId=submit", strCode ); strRet = webPost.GetHttpPage(strUrl, "gb2312", "POST","", strData, "https://session.trionworlds.com/login?service=unspecified&locale=zh_CN", "*/*", ""); }
private void button1_Click(object sender, EventArgs e) { _GoodsFreshStr goodInfo = new _GoodsFreshStr(); GoodsFresh objFresh = new GoodsFresh(); goodInfo.strAcc = "*****@*****.**"; goodInfo.strPwd = "wawawo23"; goodInfo.goodId = "2892042"; goodInfo.skuId = "25063749"; goodInfo.strReceiver = "陈兵"; goodInfo.strProvince = "广东"; goodInfo.strCity = "深圳市"; goodInfo.strTown = "南山区"; goodInfo.strAddr = "南油地区"; goodInfo.strPostCode = "518052"; goodInfo.strPhone = "13028272672"; goodInfo.webPost = new ClassHttpPost(); string strError = ""; Login(goodInfo.webPost, goodInfo.strAcc, goodInfo.strPwd, ref strError, true); MessageBox.Show(strError); objFresh.m_objForm = this; objFresh.SetWebPost(goodInfo.webPost); objFresh.AddToCart(goodInfo); objFresh.SetTransTypeAndPayType(goodInfo); /* ClassHttpPost webpost = new ClassHttpPost(); string strError = ""; bool bRet = Login(webpost, "*****@*****.**", "wawawo20", ref strError); if (!bRet) { MessageBox.Show(strError); return; } GoodsFresh fresh = new GoodsFresh(); fresh.SetWebPost(webpost); fresh.AddToCart(textBoxGoodId.Text, textBoxSizeNo.Text, textBoxNum.Text); fresh.AddAddress(out strError); string strOrderNo = ""; fresh.SetTransTypeAndPayType(out strOrderNo); if (strOrderNo != "") MessageBox.Show(strOrderNo); */ }
private void button1_Click(object sender, EventArgs e) { // _GoodsFreshStr objInfoEx = new _GoodsFreshStr(); //objInfoEx.strAcc = "aaa"; TestStr1 bulder = new TestStr1(); bulder.strAcc = "AAA"; Hashtable tblHash = new Hashtable(); bulder.strAcc = "AAABBB"; _GoodsFreshStr objInfoExEx = new _GoodsFreshStr(); string strDirectoryXls = System.AppDomain.CurrentDomain.BaseDirectory + "xlsfile"; SaveToExcel(strDirectoryXls, null, "aaaaa"); return; GoodsFresh objFreshEx = new GoodsFresh(); ClassHttpPost webPost = new ClassHttpPost(); objFreshEx.SetWebPost(webPost); string strDirect = System.AppDomain.CurrentDomain.BaseDirectory + "pic"; if (!Directory.Exists(strDirect)) { Directory.CreateDirectory(strDirect); } return; //string str = System.Web.HttpUtility.UrlEncode("你好", Encoding.GetEncoding("gb2312")); string str = string.Format("{0} {1}", 519.0, 535.01); MessageBox.Show(str); return; TimerFunction(); return; string strAcc = "heilongjiangjt"; _GoodsFreshStr objInfo = new _GoodsFreshStr(); DataContrl.GetDataCache(strAcc, ref objInfo); MessageBox.Show(objInfo.iFreshCount.ToString()); objInfo.iFreshCount = 2; //DataContrl.InitFreshTime(); DataContrl.GetDataCache(strAcc, ref objInfo); MessageBox.Show(objInfo.iFreshCount.ToString()); return; IsSetIllegal(); return; _GoodsFreshStr goodInfo = new _GoodsFreshStr(); bool bRet = DataContrl.GetDataCache("heilongjiangjt", ref goodInfo); if (!bRet) { return; } GoodsFresh objFresh = new GoodsFresh(); objFresh.SetWebPost(goodInfo.webPost); bRet = objFresh.Login(goodInfo.strAcc, goodInfo.strPwd, true); string strError = ""; objFresh.FreshQuick(out strError, out strError); }
//sohu reg private void button2_Click(object sender, EventArgs e) { //GetImageEx GoodsFresh objFreshEx = new GoodsFresh(); ClassHttpPost webPost = new ClassHttpPost(); objFreshEx.SetWebPost(webPost); string strRet = webPost.GetHttpPage("http://passport.sohu.com/web/dispatchAction.action?registerType=Passport&showAllType=1", "gb2312", "get","", "", "", "*/*", ""); string strError = ""; objFreshEx.GetImageEx("c:\\ddddddd.bmp", out strError); // string strCode = ""; string strNumber = ""; strCode = "hfabe3a8"; strNumber = "SCYLSLALELJLAPCLSLELSLAJYJPLYPJPNPULYJPLELYPNJSLJLAJSLYLAPUJUPCLAPLPJPNLYLAJSLYLAPUJUPCLSLAPLPNLALEPJLYLAPCJUPJLYLSLAJYJPLELYPCLEPNJPLEJYLEPNPJPCPJLALSPCPJLALYLEJSPULEJSPNPCPJLAPJLEJUPJLEJSPULEJPJY"; string strData = string.Format("checkRegType=on&shortname=testregidnew2&user.password=wawawo20&password2=wawawo20&user.question=%CE%D2%BE%CD%B6%C1%B5%C4%D3%D7%B6%F9%D4%B0%C3%FB%B3%C6&questionbak=&answer=%B3%A4%BD%AD%D0%A1%D1%A7&validate={1}&privacy=1&uuidCode={0}&app_para=registerType%3DPassport%26showAllType%3D1&ot_registerid=®isterid=&appid=9998&autologin=1&ru=&domainName=sohu.com®isterType=Passport&showAllType=1", strNumber, strCode ); strRet = webPost.GetHttpPage("https://passport.sohu.com/web/Passportregister.action", "gb2312", "POST","", strData, "https://passport.sohu.com/web/dispatchAction.action?registerType=Passport&showAllType=1", "*/*", ""); }