コード例 #1
0
 public virtual void  pauseApp()
 {
     if (Display.getDisplay(this).getCurrent() == cameraCanvas)
     {
         cameraCanvas.stop();
     }
 }
コード例 #2
0
 public virtual void  destroyApp(bool b)
 {
     if (Display.getDisplay(this).getCurrent() == cameraCanvas)
     {
         cameraCanvas.stop();
     }
 }
コード例 #3
0
    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();
    }
コード例 #4
0
    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);
        }
    }
コード例 #5
0
 internal virtual void  toDecodedTextBox()
 {
     Display.getDisplay(this).setCurrent(decodedTextBox);
 }
コード例 #6
0
 internal virtual void  decodedTextBoxBack()
 {
     Display.getDisplay(this).setCurrent(displayCanvas);
 }
コード例 #7
0
 internal virtual void  displayCanvasBack()
 {
     Display.getDisplay(this).setCurrent(cameraCanvas);
     cameraCanvas.start();
 }