using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using APITest;
using System.Threading;
namespace TBApiLoginC
{
public partial class TBCForm : Form
{
public TBCForm()
{
InitializeComponent();
}
public delegate void CallBackDelegate(string message);
string s;
Thread t1, t2; // 说明为窗体类成员
int h;
private void adds(object o)
{
string appkey = "XX";
string secret = "XX";
string session = "XX";
IDictionary<string, string> param = new Dictionary<string, string>();
param.Add("fields","nick,num_iid,title,nick,type,cid,pic_url,num,props,valid_thru,list_time,price,has_discount,has_invoice,has_warranty,has_showcase,modified,delist_time,postage_id,seller_cids,outer_id");
// param.Add("nick", "sandbox_c_1");
//Util.Post 集成了 系统参数 和 计算 sign的方法
s = Util.Post("http://gw.api.taobao.com/router/rest", appkey, secret, "taobao.items.onsale.get", session, param);
// MessageBox.Show(s);
CallBackDelegate cbd =o as CallBackDelegate;
//执行回调.
cbd(s);
h = 1;
}
//回调方法
private void CallBack(string message)
{
//主线程报告信息,可以根据这个信息做判断操作,执行不同逻辑.
// Message
淘宝登录及多线程同步
最新推荐文章于 2020-10-22 11:05:54 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)