public virtual void pauseApp() { if (Display.getDisplay(this).getCurrent() == cameraCanvas) { cameraCanvas.stop(); } }
public virtual void destroyApp(bool b) { if (Display.getDisplay(this).getCurrent() == cameraCanvas) { cameraCanvas.stop(); } }
internal virtual void cameraCanvasCaptured(sbyte[] pngData) { cameraCanvas.stop(); displayCanvas.Image = pngData; Display.getDisplay(this).setCurrent(displayCanvas); Image image = Image.createImage(pngData, 0, pngData.Length); // TODO Uncomment below for demo on emulator try { image = Image.createImage("/qrcode.jpg"); } catch (System.IO.IOException ioe) { } QRCodeDecoder decoder = new QRCodeDecoder(); QRCodeDecoder.setCanvas(displayCanvas); try { decodedTextBox.DecodedString = new String(decoder.decode(new J2MEImage(image))); } catch (DecodingFailedException dfe) { displayCanvas.println("Decoding failed"); displayCanvas.println("(" + dfe.getMessage() + ")"); displayCanvas.println("--------"); return; } displayCanvas.println("--------"); displayCanvas.addViewDecodedStringCommand(); }
public virtual void startApp() { Displayable current = Display.getDisplay(this).getCurrent(); if (current == null) { cameraCanvas = new CameraCanvas(this); displayCanvas = new DisplayCanvas(this); decodedTextBox = new DecodedTextBox(this); Display.getDisplay(this).setCurrent(cameraCanvas); cameraCanvas.start(); } else { if (current == cameraCanvas) { cameraCanvas.start(); } Display.getDisplay(this).setCurrent(current); } }
internal virtual void toDecodedTextBox() { Display.getDisplay(this).setCurrent(decodedTextBox); }
internal virtual void decodedTextBoxBack() { Display.getDisplay(this).setCurrent(displayCanvas); }
internal virtual void displayCanvasBack() { Display.getDisplay(this).setCurrent(cameraCanvas); cameraCanvas.start(); }