我用的是vs2013和PTVS,我想按一个按钮来调用一个函数。但我是python和WPF的初学者,所以遇到了一些麻烦,所以我的函数类是:
class VendasXML(object):
def MakeXML(self) :
offset = 0
url = 'https://api.mercadolibre.com/orders/search?seller=' + AutenticacaoML["user_id"] + '&access_token=' + AutenticacaoML["access_token"] + '&offset=' + str(offset)
response = urllib2.urlopen(url)
b = response.read()
bjson = json.loads(b)
total = str(bjson['paging']['total'])
limit = str(bjson['paging']['limit'])
total = int(total)
limit = int(limit)
i = 0
TotalRec = 0
Totalt = 0
窗口和我的类:
^{pr2}$我在WPF的button标记中调用函数:
^{3}$当我点击这个按钮时,我调用了这个函数:
我该怎么做才能克服这个问题?在
我找到了解决办法:
以及:
^{pr2}$相关问题 更多 >
编程相关推荐