public void Call(DmType dmtype, string callstring) { ts_Caller.ts_call_AxCL2005_16W caller = new ts_Caller.ts_call_AxCL2005_16W(); int i = SetTransMode(2, 3); //通讯设置 i = SetSerialPortPara(1, Convert.ToInt32(com), 115200); //设置串口通讯 StartSend(); //构建节目结构 i = AddControl(1, 1); //添加屏幕 i = AddProgram(1, 1, 0); //添加节目 string str = ""; if (callstring == "您好,欢迎光临") { SendScreenPara(1, 1, 128, 32);//设置屏幕参数 str = "祝您早日康复"; } else if (dmtype == DmType.姓名) { str = "姓名:" + callstring; caller.Call(str);// jianqg 2013-4-11 增加 郴州妇幼需求 必须呼叫姓名 } else if (dmtype == DmType.应收) { str = "应收:" + callstring + "元"; caller.Call(str); } else { str = callstring; } i = AddLnTxtString(1, 1, 1, 0, 0, 128, 32, str, "宋体", 16, 255, false, false, false, 1, 20, 1); //添加单行文本 Thread.Sleep(100); //程序需要休眠100毫秒 才能 最好的显示到LED屏幕上 i = SendControl(1, 1, IntPtr.Zero); //发送端口数据 }
public void Call(string ss, string zl) { ts_Caller.ts_call_AxCL2005_16W caller = new ts_Caller.ts_call_AxCL2005_16W(); string str = "实收:" + ss + "元"; // jianqg 2013-4-11 修改,实收与找零一并呼叫, 郴州妇幼需求 string strcall = str; if (zl != null && zl.Trim() != "" && Convertor.IsNumeric(zl) && double.Parse(zl) > 0) { strcall += "找零:" + zl + "元"; } int i = AddLnTxtString(1, 1, 1, 0, 0, 128, 32, str, "宋体", 16, 255, false, false, false, 1, 20, 1); Thread.Sleep(100); caller.Call(strcall);// caller.Call(str); // jianqg 2013-4-11 修改 i = SendControl(1, 1, IntPtr.Zero); str = "找零:" + zl + "元"; i = AddLnTxtString(1, 1, 1, 0, 0, 128, 32, str, "宋体", 16, 255, false, false, false, 1, 20, 1); Thread.Sleep(100); //caller.Call(str);// jianqg 2013-4-11 注释 i = SendControl(1, 1, IntPtr.Zero); }
public void Call(DmType dmtype, string callstring) { ts_Caller.ts_call_AxCL2005_16W caller = new ts_Caller.ts_call_AxCL2005_16W(); //int i = SetTransMode(2, 3);//通讯设置 //i = SetSerialPortPara(1, Convert.ToInt32(com), 115200);//设置串口通讯 //StartSend();//构建节目结构 //i = AddControl(1, 1);//添加屏幕 //i = AddProgram(1, 1, 0);//添加节目 string str = ""; int row = 0; if (callstring == "您好,欢迎光临") { //SendScreenPara(1, 1, 128, 32);//设置屏幕参数 str = "祝您早日康复"; } else if (dmtype == DmType.姓名) { str = "姓名:" + callstring; caller.Call(str);// jianqg 2013-4-11 增加 郴州妇幼需求 必须呼叫姓名 row = 0; xm = str; dehxs = ""; ys = ""; ss = ""; zl = ""; } else if (dmtype == DmType.应收) { str = "应收:" + callstring + "元"; caller.Call(str); row = 1; ys = str; ss = ""; zl = ""; dehxs = str; } else if (dmtype == DmType.实收) { str = "实收:" + callstring + "元"; caller.Call(str); row = 2; ss = str; zl = ""; dehxs = str; } else if (dmtype == DmType.找零) { str = "找零:" + callstring + "元"; caller.Call(str); row = 3; ss = str; //把找零放到找零那里 dehxs = str; } else if (dmtype == DmType.清除) { clearScreen(); } else { str = callstring; } // i = AddLnTxtString(1, 1, 1, 0, 0, 128, 32, str, "宋体", 16, 255, false, false, false, 1, 20, 1);//添加单行文本 Thread.Sleep(int.Parse(ycsj));//程序需要休眠100毫秒 才能 最好的显示到LED屏幕上 // i = SendControl(1, 1, IntPtr.Zero);//发送端口数据 string[] context = new string[] { xm, dehxs }; sendText(context, row); }