internal virtual void addViewDecodedStringCommand() { if (viewDecodedStringCommand == null) { viewDecodedStringCommand = new Command("Result", Command.SCREEN, 1); addCommand(viewDecodedStringCommand); } }
public virtual void commandAction(Command c, Displayable d) { if (c == viewDecodedStringCommand) { midlet.toDecodedTextBox(); } else { midlet.displayCanvasBack(); } }
public virtual void commandAction(Command c, Displayable d) { if (c == exitCommand) { midlet.cameraCanvasExit(); } else if (c == captureCommand) { takeSnapshot(); } }
public CameraCanvas(QRCodeDecoderMIDletExample midlet) { this.midlet = midlet; exitCommand = new Command("Exit", Command.EXIT, 1); addCommand(exitCommand); setCommandListener(this); try { player = Manager.createPlayer("capture://video"); player.realize(); videoControl = (VideoControl)player.getControl("VideoControl"); if (videoControl == null) { discardPlayer(); message1 = "Unsupported:"; message2 = "Can't get video control"; } else { videoControl.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, this); captureCommand = new Command("Capture", Command.SCREEN, 1); addCommand(captureCommand); } } catch (System.IO.IOException ioe) { discardPlayer(); message1 = "IOException:"; //UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Throwable.getMessage' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'" message2 = ioe.Message; } catch (MediaException me) { discardPlayer(); message1 = "MediaException:"; message2 = me.getMessage(); } catch (System.Security.SecurityException se) { discardPlayer(); message1 = "SecurityException"; //UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Throwable.getMessage' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'" message2 = se.Message; } }
public virtual void commandAction(Command c, Displayable d) { midlet.decodedTextBoxBack(); }
public CameraCanvas(QRCodeDecoderMIDletExample midlet) { this.midlet = midlet; exitCommand = new Command("Exit", Command.EXIT, 1); addCommand(exitCommand); setCommandListener(this); try { player = Manager.createPlayer("capture://video"); player.realize(); videoControl = (VideoControl) player.getControl("VideoControl"); if (videoControl == null) { discardPlayer(); message1 = "Unsupported:"; message2 = "Can't get video control"; } else { videoControl.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, this); captureCommand = new Command("Capture", Command.SCREEN, 1); addCommand(captureCommand); } } catch (System.IO.IOException ioe) { discardPlayer(); message1 = "IOException:"; //UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Throwable.getMessage' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'" message2 = ioe.Message; } catch (MediaException me) { discardPlayer(); message1 = "MediaException:"; message2 = me.getMessage(); } catch (System.Security.SecurityException se) { discardPlayer(); message1 = "SecurityException"; //UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Throwable.getMessage' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'" message2 = se.Message; } }