| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | Bx5GEnv.initial(3000); |
| | | Bx5GScreenClient screen = new Bx5GScreenClient("my"); |
| | | DisplayStyleFactory.DisplayStyle[] styles = DisplayStyleFactory.getStyles().toArray(new DisplayStyleFactory.DisplayStyle[0]); |
| | | if (!screen.connect("192.168.10.61",5005)) { |
| | | System.err.println("连接失败!!!!"); |
| | | return; |
| | | } |
| | | screen.turnOn(); |
| | | ProgramBxFile pf = new ProgramBxFile( 0, screen.getProfile()); |
| | | pf.setFrameShow(false); |
| | | // 分别输入X,Y,width,heigth |
| | | TextCaptionBxArea area = new TextCaptionBxArea( 100,50,800,600,screen.getProfile()); |
| | | // 创建一个数据页 |
| | | // 第一行数据 |
| | | TextBxPage page = new TextBxPage("入库"); |
| | | // 第二行数据 |
| | | page.newLine( "物料:" ); |
| | | page.newLine("接收器 RX18 XH 6V (数量:2)"); |
| | | page.newLine("中控 BM蓝牙 英文 6V (数量:1)"); |
| | | page.newLine("线束 S2588-1-XX 无实物(数量:5)"); |
| | | page.newLine("目标库位:0100204"); |
| | | // 设置字体 |
| | | page.setFont( new Font("宋体",Font.PLAIN,12)); |
| | | // 设置显示特技为快速打出 |
| | | page.setDisplayStyle(styles[2]); |
| | | area.addPage(page); |
| | | pf.addArea( area ); |
| | | // 更新节目 |
| | | screen.writeProgram(pf); |
| | | // 继开与控制器之间的链接 |
| | | screen.disconnect(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public static void main1(String[] args) throws Exception { |
| | | Bx5GEnv.initial(3000); |
| | | // 创建screen对象,用于对控制器进行访问,客户端模式 |
| | | Bx5GScreenClient screen = new Bx5GScreenClient("my"); |
| | | // 创建screen对象,用于对控制器进行访问,串口模式 |