Mercurial > 510Connectbot
comparison src/org/tn5250j/framework/tn5250/tnvt.java @ 23:cfcb8d9859a8 tn5250
adding tn5250 files
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Tue, 03 Jun 2014 11:37:06 -0700 |
parents | 69a407d33146 |
children | d1c549560aff |
comparison
equal
deleted
inserted
replaced
22:e067ee54f638 | 23:cfcb8d9859a8 |
---|---|
646 * Opens a dialog and asks the user before sending a request | 646 * Opens a dialog and asks the user before sending a request |
647 * | 647 * |
648 * @see {@link #systemRequest(String)} | 648 * @see {@link #systemRequest(String)} |
649 */ | 649 */ |
650 public final void systemRequest() { | 650 public final void systemRequest() { |
651 final String sysreq = this.controller.showSystemRequest(); | 651 String ask = manager.res.getString(R.string.prompt_sys_request); |
652 String sysreq = bridge.promptHelper.requestStringPrompt(null, ask); | |
652 systemRequest(sysreq); | 653 systemRequest(sysreq); |
653 } | 654 } |
654 | 655 |
655 /** | 656 /** |
656 * @param sr - system request option | 657 * @param sr - system request option |
996 // the screen. | 997 // the screen. |
997 //for (; (i < screen.length) && (screen[i] == ' '); i++); | 998 //for (; (i < screen.length) && (screen[i] == ' '); i++); |
998 | 999 |
999 String remainder = new String(screen, i + 1, screen.length | 1000 String remainder = new String(screen, i + 1, screen.length |
1000 - (i + 1)); | 1001 - (i + 1)); |
1001 // System.out.println("Sensing action command in the input! = " | 1002 //controller.fireScanned(command, remainder); |
1002 // + command); | 1003 log.info("trying to run " + command + " " + remainder); |
1003 controller.fireScanned(command, remainder); | |
1004 break; | 1004 break; |
1005 } | 1005 } |
1006 } | 1006 } |
1007 } | 1007 } |
1008 | 1008 |
1009 public void run() { | 1009 public void run() { |
1010 | 1010 |
1011 if (enhanced) | 1011 if (enhanced) sfParser = new WTDSFParser(this); |
1012 sfParser = new WTDSFParser(this); | |
1013 | 1012 |
1014 bk = new Stream5250(); | 1013 bk = new Stream5250(); |
1015 | 1014 |
1016 while (keepTrucking) { | 1015 while (keepTrucking) { |
1017 | 1016 |
1049 setInvited(); | 1048 setInvited(); |
1050 break; | 1049 break; |
1051 case 2: | 1050 case 2: |
1052 log.debug("Output Only"); | 1051 log.debug("Output Only"); |
1053 parseIncoming(); | 1052 parseIncoming(); |
1054 // System.out.println(screen52.dirty); | |
1055 screen52.updateDirty(); | 1053 screen52.updateDirty(); |
1056 | |
1057 // invited = true; | |
1058 | |
1059 break; | 1054 break; |
1060 case 3: | 1055 case 3: |
1061 log.debug("Put/Get Operation"); | 1056 log.debug("Put/Get Operation"); |
1062 parseIncoming(); | 1057 parseIncoming(); |
1063 // inviteIt =true; | |
1064 setInvited(); | 1058 setInvited(); |
1065 if (!firstScreen) { | 1059 if (!firstScreen) { |
1066 firstScreen = true; | 1060 firstScreen = true; |
1067 controller.fireSessionChanged(TN5250jConstants.STATE_CONNECTED); | 1061 //controller.fireSessionChanged(TN5250jConstants.STATE_CONNECTED); |
1068 } | 1062 } |
1069 break; | 1063 break; |
1070 case 4: | 1064 case 4: |
1071 log.debug("Save Screen Operation"); | 1065 log.debug("Save Screen Operation"); |
1072 parseIncoming(); | 1066 parseIncoming(); |
1521 break; | 1515 break; |
1522 | 1516 |
1523 case ESC: // ESCAPE | 1517 case ESC: // ESCAPE |
1524 break; | 1518 break; |
1525 case 7: // audible bell | 1519 case 7: // audible bell |
1526 controller.signalBell(); | 1520 manager.playBeep(); |
1527 bk.getNextByte(); | 1521 bk.getNextByte(); |
1528 bk.getNextByte(); | 1522 bk.getNextByte(); |
1529 break; | 1523 break; |
1530 case CMD_WRITE_TO_DISPLAY: // 0x11 17 write to display | 1524 case CMD_WRITE_TO_DISPLAY: // 0x11 17 write to display |
1531 error = writeToDisplay(true); | 1525 error = writeToDisplay(true); |
2163 | 2157 |
2164 private void processCC1(byte byte1) { | 2158 private void processCC1(byte byte1) { |
2165 log.debug(" Control byte1 " + Integer.toBinaryString(byte1 & 0xff)); | 2159 log.debug(" Control byte1 " + Integer.toBinaryString(byte1 & 0xff)); |
2166 | 2160 |
2167 if ((byte1 & 0x04) == 0x04) { | 2161 if ((byte1 & 0x04) == 0x04) { |
2168 controller.signalBell(); | 2162 manager.playBeep(); |
2169 } | 2163 } |
2170 if ((byte1 & 0x02) == 0x02) { | 2164 if ((byte1 & 0x02) == 0x02) { |
2171 screen52.getOIA().setMessageLightOff(); | 2165 screen52.getOIA().setMessageLightOff(); |
2172 } | 2166 } |
2173 if ((byte1 & 0x01) == 0x01) { | 2167 if ((byte1 & 0x01) == 0x01) { |
2701 | 2695 |
2702 public final ICodePage getCodePage() { | 2696 public final ICodePage getCodePage() { |
2703 return codePage; | 2697 return codePage; |
2704 } | 2698 } |
2705 | 2699 |
2706 /** | |
2707 * @see org.tn5250j.Session5250#signalBell() | |
2708 */ | |
2709 public void signalBell() { | 2700 public void signalBell() { |
2710 controller.signalBell(); | 2701 manager.playBeep(); |
2711 } | 2702 } |
2712 | 2703 |
2713 } | 2704 } |