예제 #1
0
파일: Form1.cs 프로젝트: luzhengning/wtPay
        private void button7_Click(object sender, EventArgs e)
        {
            StringBuilder sb     = new StringBuilder();
            int           result = TTCurrency.TT_DisableCash(sb);

            listViewAdd("禁止投币:" + result.ToString() + "," + sb.ToString());
        }
예제 #2
0
파일: Form1.cs 프로젝트: luzhengning/wtPay
        private void SetBillType()
        {
            StringBuilder sb     = new StringBuilder();
            int           result = TTCurrency.TT_SetBillType(127, sb);

            listViewAdd("接收金额:" + result + "," + sb.ToString());
        }
예제 #3
0
파일: Form1.cs 프로젝트: luzhengning/wtPay
        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();
        }
예제 #4
0
        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);
            }
        }
예제 #5
0
파일: Form1.cs 프로젝트: luzhengning/wtPay
        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毫秒
            }
        }