private void button7_Click(object sender, EventArgs e) { StringBuilder sb = new StringBuilder(); int result = TTCurrency.TT_DisableCash(sb); listViewAdd("禁止投币:" + result.ToString() + "," + sb.ToString()); }
private void SetBillType() { StringBuilder sb = new StringBuilder(); int result = TTCurrency.TT_SetBillType(127, sb); listViewAdd("接收金额:" + result + "," + sb.ToString()); }
private void button6_Click(object sender, EventArgs e) { StringBuilder sb = new StringBuilder(); int result = TTCurrency.TT_EnableCash(60, sb); listViewAdd("开始投币:" + result + "," + sb.ToString()); Thread.Sleep(2000); readMoneyThread = new Thread(delegate() { readMoney(); }); readMoneyThread.Start(); }
public static void GetPublicCurrencies(TickTraderWebClient client) { // Public currencies List <TTCurrency> publicCurrencies = client.GetPublicAllCurrencies(); foreach (var c in publicCurrencies) { Console.WriteLine("Currency: " + c.Name); } TTCurrency publicCurrency = client.GetPublicCurrency(publicCurrencies[0].Name).FirstOrDefault(); if (publicCurrency != null) { Console.WriteLine("{0} currency precision: {1}", publicCurrency.Name, publicCurrency.Precision); } }
private void readMoney() { StringBuilder sb = new StringBuilder(); int money = 0; int countMoney = 0; while (true) { money = TTCurrency.TT_GetMoney(sb); if (money <= 0) { continue; } listViewAdd(money + "元"); countMoney += money; Thread.Sleep(100); //延时100毫秒 } }