[Javanetsim-cvs] javaNetSim/guiUI MainScreen.java,1.25,1.26
Status: Beta
Brought to you by:
darkkey
From: Alexander B. <da...@us...> - 2005-12-08 20:33:11
|
Update of /cvsroot/javanetsim/javaNetSim/guiUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20936/guiUI Modified Files: MainScreen.java Log Message: timer layerinfo bugfix. happy coding && debugging to Ilgar! Index: MainScreen.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/MainScreen.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** MainScreen.java 8 Dec 2005 20:10:58 -0000 1.25 --- MainScreen.java 8 Dec 2005 20:32:53 -0000 1.26 *************** *** 3022,3026 **** String msg = JOptionPane.showInputDialog(this, "Message:", "Message.", JOptionPane.QUESTION_MESSAGE); ! String cnt = JOptionPane.showInputDialog(this, "Number:", "How many times send.", JOptionPane.QUESTION_MESSAGE); if(port!=null && ip!=null && msg!=null && cnt!=null){ --- 3022,3026 ---- String msg = JOptionPane.showInputDialog(this, "Message:", "Message.", JOptionPane.QUESTION_MESSAGE); ! String cnt = JOptionPane.showInputDialog(this, "Quantity:", "How many times send.", JOptionPane.QUESTION_MESSAGE); if(port!=null && ip!=null && msg!=null && cnt!=null){ *************** *** 3051,3057 **** { private MainScreen ms; ! public TTask (MainScreen ms) { this.ms=ms; --- 3051,3059 ---- { private MainScreen ms; + private int counts; ! public TTask (MainScreen ms, int counts) { + this.counts=counts; this.ms=ms; *************** *** 3062,3067 **** { ms.printLayerInfo(false); ! ms.addFooter(); ! this.cancel(); } } --- 3064,3071 ---- { ms.printLayerInfo(false); ! if(counts--<=0){ ! ms.addFooter(); ! this.cancel(); ! } } } *************** *** 3087,3091 **** String msg = JOptionPane.showInputDialog(this, "Message:", "Message.", JOptionPane.QUESTION_MESSAGE); ! String cnt = JOptionPane.showInputDialog(this, "Number:", "How many times send.", JOptionPane.QUESTION_MESSAGE); if(port!=null && ip!=null && msg!=null && cnt!=null){ --- 3091,3095 ---- String msg = JOptionPane.showInputDialog(this, "Message:", "Message.", JOptionPane.QUESTION_MESSAGE); ! String cnt = JOptionPane.showInputDialog(this, "Quantity:", "How many times send.", JOptionPane.QUESTION_MESSAGE); if(port!=null && ip!=null && msg!=null && cnt!=null){ *************** *** 3097,3101 **** Timer timer = null; timer=new Timer(); ! timer.schedule(new TTask(this),4000,4000); ((Echo_tcp)((core.ApplicationLayerDevice)Sim.getNode(inNodeName)).getApp(30017)).SendEcho(msg, ip, Integer.valueOf(port).intValue(), Integer.valueOf(cnt).intValue()); --- 3101,3105 ---- Timer timer = null; timer=new Timer(); ! timer.schedule(new TTask(this, 1),4000,4000); ((Echo_tcp)((core.ApplicationLayerDevice)Sim.getNode(inNodeName)).getApp(30017)).SendEcho(msg, ip, Integer.valueOf(port).intValue(), Integer.valueOf(cnt).intValue()); |