private void clearScreen() { TSenderParam param = new TSenderParam(); ushort K; GetDeviceParam(ref param.devParam); param.notifyMode = LEDSender.NOTIFY_BLOCK; param.wmHandle = (UInt32)0; param.wmMessage = WM_LED_NOTIFY; K = (ushort)LEDSender.Do_MakeRoot(LEDSender.ROOT_PLAY, LEDSender.COLOR_MODE_DOUBLE, LEDSender.SURVIVE_ALWAYS); LEDSender.Do_AddChapter(K, 3000, LEDSender.WAIT_CHILD); LEDSender.Do_AddRegion(K, int.Parse(left), int.Parse(top), int.Parse(width), int.Parse(height), 0); //第1页面 LEDSender.Do_AddLeaf(K, 3000, LEDSender.WAIT_CHILD); }
private void button2_Click(object sender, EventArgs e) { string xc, crk, source, to, sku, desc; xc = null; crk = null; source = null; to = null; sku = null; desc = null; SqlConnection conne = new SqlConnection(con); //获取小车号/出入库类型/起始位/目标位 conne.Open(); string sql = "select * from OD_TASK where RELEASESTATUS='Y' and HADFINISH='Y'"; SqlCommand cmd = new SqlCommand(sql, conne); SqlDataReader read = cmd.ExecuteReader(); read.Read(); xc = read["CONTAINERNO"].ToString(); crk = read["TASKTYPEDESCRIPTION"].ToString().Replace("堆垛机", ""); source = read["SOURCEPLACE"].ToString(); to = read["TOPLACE"].ToString(); conne.Close(); //根据小车号获取物料号/物料名称 conne.Open(); string sqlsku = "select * from IV_CONTAINER_VS_ITEM where CONTAINERID='" + xc + "'"; SqlCommand cmdsku = new SqlCommand(sqlsku, conne); SqlDataReader readsku = cmdsku.ExecuteReader(); while (readsku.Read()) { sku += readsku["ITEMSKU"].ToString() + ";"; desc += readsku["ITEMDESC"].ToString() + ";"; } conne.Close(); ////获取物料名称 //string sqldesc = "select ITEMDESC from IV_CONTAINER_VS_ITEM where CONTAINERID='" + xc + "'"; //conne.Open(); //SqlCommand cmddesc = new SqlCommand(sqldesc, conne); //desc = cmddesc.ExecuteScalar().ToString(); //conne.Close(); Int32 param_index = 0; ushort K; GetDeviceParamWithoutStruct(param_index, (Int32)LEDSender2.NOTIFY_EVENT, (Int32)Handle, WM_LED_NOTIFY); K = (ushort)LEDSender2.Do_MakeRoot(LEDSender2.ROOT_PLAY, LEDSender2.COLOR_MODE_DOUBLE, LEDSender2.SURVIVE_ALWAYS); LEDSender2.Do_AddChapter(K, 30000, LEDSender2.WAIT_CHILD); LEDSender2.Do_AddRegion(K, 0, 0, 256, 160, 0); //添加表头 LEDSender2.Do_AddLeaf(K, 10000000, LEDSender2.WAIT_CHILD); LEDSender2.Do_AddText(K, 0, 1, 256, 16, 1, 0, "吉利沃尔沃立体库", "宋体", 12, 255, 0, 0, 1, 1, 5, 1, 5, 0, 0, 100000); LEDSender2.Do_AddText(K, 10, 26, 110, 16, 1, 0, "小车号:" + xc, "宋体", 11, 255, 0, 0, 0, 1, 5, 1, 5, 0, 0, 100000); LEDSender2.Do_AddText(K, 125, 26, 131, 16, 1, 0, "任务类型:" + crk, "宋体", 11, 255, 0, 0, 0, 1, 5, 1, 5, 0, 0, 100000); LEDSender2.Do_AddText(K, 10, 47, 256, 16, 1, 0, "物料号:" + sku, "宋体", 11, 255, 0, 0, 0, 1, 5, 1, 5, 0, 0, 100000); LEDSender2.Do_AddText(K, 10, 69, 256, 16, 1, 0, "物料名称:" + desc, "宋体", 11, 255, 0, 0, 0, 1, 5, 1, 5, 0, 0, 100000); LEDSender2.Do_AddText(K, 10, 92, 110, 16, 1, 0, "起始位:" + source, "宋体", 11, 255, 0, 0, 0, 1, 5, 1, 5, 0, 0, 100000); LEDSender2.Do_AddText(K, 125, 92, 131, 16, 1, 0, "目标位:" + to, "宋体", 11, 255, 0, 0, 0, 1, 5, 1, 5, 0, 0, 100000); LEDSender2.Do_AddText(K, 10, 116, 256, 16, 1, 0, "作业时间:" + DateTime.Now, "宋体", 11, 255, 0, 0, 0, 1, 5, 1, 5, 0, 0, 100000); LEDSender2.Do_AddText(K, 0, 140, 256, 16, 1, 0, "技术支持:伟本智能机电(上海)股份有限公司", "宋体", 10, 255, 0, 0, 1, 1, 5, 1, 5, 0, 0, 100000); Parse(LEDSender2.Do_LED_SendToScreen2(param_index, K)); }