예제 #1
0
        //get提交数据
        private void get2web(RfidCard rc)
        {
            string url    = text_URL.Text;
            string data   = "epc=" + rc.epc + "&time=" + rc.timestamp;
            string result = HttpClientFacde.HttpGet(url, data);

            if (result == null)
            {
                write_log("传输出错");
            }
            else
            {
                write_log("传输成功");
            }
        }
예제 #2
0
 //处理新卡的函数
 private void fun_invoke()
 {
     fIsInvoke = true;
     while (window_epcs.Count != 0)
     {
         KeyValuePair <String, RfidCard> epc = window_epcs.First();
         RfidCard rc = epc.Value;
         //do something
         if (checkBox_network.Checked && radioButton_get.Checked)
         {
             get2web(rc);
         }
         else if (checkBox_network.Checked && radioButton_post.Checked)
         {
             post2web(rc);
         }
         write_log("新刷卡:" + rc.epc + " 时间:" + util.Long2Time(rc.timestamp));
         window_epcs.Remove(epc.Key);
     }
     fIsInvoke = false;
 }