Пример #1
0
 internal QRCodeDecoderGUIExample()
 {
     System.Console.Out.WriteLine("Starting QRCode Decoder GUI Example ...");
     //UPGRADE_TODO: Method 'java.awt.Component.setSize' was converted to 'System.Windows.Forms.Control.Size' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtComponentsetSize_int_int'"
     Size            = new System.Drawing.Size(400, 400);
     Closing        += new System.ComponentModel.CancelEventHandler(this.QRCodeDecoderGUIExample_Closing_EXIT_ON_CLOSE);
     menuBar         = new System.Windows.Forms.MainMenu();
     openMenu        = new System.Windows.Forms.MenuItem();
     openMenu.Text   = "Open Image";
     openMenu.Click += new System.EventHandler(this.actionPerformed);
     SupportClass.CommandManager.CheckCommand(openMenu);
     menuBar.MenuItems.Add(openMenu);
     Menu = menuBar;
     //UPGRADE_TODO: Constructor 'javax.swing.JTextField.JTextField' was converted to 'System.Windows.Forms.TextBox' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingJTextFieldJTextField_int'"
     url = new System.Windows.Forms.TextBox();
     //UPGRADE_TODO: Method 'javax.swing.text.JTextComponent.setText' was converted to 'System.Windows.Forms.TextBoxBase.Text' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingtextJTextComponentsetText_javalangString'"
     url.Text      = "(Or input image url here.)";
     button        = SupportClass.ButtonSupport.CreateStandardButton("Open from URL");
     button.Click += new System.EventHandler(this.actionPerformed);
     SupportClass.CommandManager.CheckCommand(button);
     System.Windows.Forms.Panel urlPanel = new System.Windows.Forms.Panel();
     //UPGRADE_TODO: Method 'java.awt.Container.add' was converted to 'System.Windows.Forms.ContainerControl.Controls.Add' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtContaineradd_javaawtComponent'"
     urlPanel.Controls.Add(url);
     //UPGRADE_TODO: Method 'java.awt.Container.add' was converted to 'System.Windows.Forms.ContainerControl.Controls.Add' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtContaineradd_javaawtComponent'"
     urlPanel.Controls.Add(button);
     button = SupportClass.ButtonSupport.CreateStandardButton("URL");
     //UPGRADE_TODO: Method 'javax.swing.JFrame.getContentPane' was converted to 'System.Windows.Forms.Form' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingJFramegetContentPane'"
     //UPGRADE_TODO: Method 'java.awt.Container.add' was converted to 'System.Windows.Forms.ContainerControl.Controls.Add' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtContaineradd_javaawtComponent_javalangObject'"
     ((System.Windows.Forms.ContainerControl) this).Controls.Add(urlPanel);
     urlPanel.Dock = System.Windows.Forms.DockStyle.Top;
     urlPanel.SendToBack();
     //UPGRADE_TODO: Constructor may need to be changed depending on function performed by the 'System.Windows.Forms.FileDialog' object. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1270'"
     chooser = SupportClass.FileDialogSupport.CreateOpenFileDialog("Open QR Code Image");
     //UPGRADE_ISSUE: Method 'javax.swing.JFileChooser.setFileFilter' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingJFileChoosersetFileFilter_javaxswingfilechooserFileFilter'"
     chooser.setFileFilter(new ImageFileFilter());
     //UPGRADE_TODO: Method 'java.awt.Component.setLocation' was converted to 'System.Windows.Forms.Control.Location' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtComponentsetLocation_int_int'"
     Location = new System.Drawing.Point(300, 200);
     SupportClass.SelectText(url, 0, url.Text.Length);
     //UPGRADE_TODO: Method 'java.awt.Component.setVisible' was converted to 'System.Windows.Forms.Control.Visible' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtComponentsetVisible_boolean'"
     //UPGRADE_TODO: 'System.Windows.Forms.Application.Run' must be called to start a main form. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1135'"
     Visible = true;
 }