コード例 #1
0
 internal DisplayCanvas(QRCodeDecoderMIDletExample midlet)
 {
     this.midlet = midlet;
     addCommand(new Command("Camera", Command.BACK, 1));
     setCommandListener(this);
     logFont = Font.getDefaultFont();
     numRows = this.getHeight() / logFont.getHeight();
     numCols = this.getWidth() / logFont.charWidth('_');
     log     = new System.String[numRows];
 }
コード例 #2
0
 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;
     }
 }
コード例 #3
0
 internal DisplayCanvas(QRCodeDecoderMIDletExample midlet)
 {
     this.midlet = midlet;
     addCommand(new Command("Camera", Command.BACK, 1));
     setCommandListener(this);
     logFont = Font.getDefaultFont();
     numRows = this.getHeight() / logFont.getHeight();
     numCols = this.getWidth() / logFont.charWidth('_');
     log = new System.String[numRows];
 }
コード例 #4
0
 public DecodedTextBox(QRCodeDecoderMIDletExample midlet)
     : base("Decoded String", "", 2048, TextField.ANY)
 {
     this.midlet = midlet;
     addCommand(new Command("Back", Command.BACK, 1));
     setCommandListener(this);
 }
コード例 #5
0
 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;
     }
 }
コード例 #6
0
 public DecodedTextBox(QRCodeDecoderMIDletExample midlet) : base("Decoded String", "", 2048, TextField.ANY)
 {
     this.midlet = midlet;
     addCommand(new Command("Back", Command.BACK, 1));
     setCommandListener(this);
 }