public virtual void actionPerformed(System.Object event_sender, System.EventArgs event_Renamed) { //UPGRADE_NOTE: The method 'java.util.EventObject.getSource' needs to be in a event handling method in order to be properly converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1171"' if (event_sender == fileMenuQuit) { gui.ExitOnClose = true; gui.close(); } else { //UPGRADE_NOTE: The method 'java.util.EventObject.getSource' needs to be in a event handling method in order to be properly converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1171"' if (event_sender == fileMenuCloseGui) { gui.ExitOnClose = false; gui.close(); } else { //UPGRADE_NOTE: The method 'java.util.EventObject.getSource' needs to be in a event handling method in order to be properly converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1171"' if (event_sender == fileMenuBatch) { JFileChooser chooser = new JFileChooser(gui.Preferences.get("menubar.batchLastPath", "")); chooser.setMultiSelectionEnabled(false); if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { System.IO.FileInfo file = chooser.SelectedFile; if (file != null && System.IO.File.Exists(file.FullName)) { gui.Preferences.put("menubar.batchLastPath", file.FullName); gui.StringChannel.executeCommand("(batch " + file.FullName + ")"); JOptionPane.showMessageDialog(this, "Batch process started.\nPlease check the log for Messages.\nThe process might be running in the background for a while."); } } } } } }
public virtual void actionPerformed(System.Object event_sender, System.EventArgs event_Renamed) { //UPGRADE_NOTE: The method 'java.util.EventObject.getSource' needs to be in a event handling method in order to be properly converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1171"' if (event_sender == assertButton) { channel.executeCommand(getCurrentDeftemplateString(false)); JOptionPane.showMessageDialog(this, "Template created.\nPlease check the log for Messages."); } else { //UPGRADE_NOTE: The method 'java.util.EventObject.getSource' needs to be in a event handling method in order to be properly converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1171"' if (event_sender == cancelButton) { close(); } else { //UPGRADE_NOTE: The method 'java.util.EventObject.getSource' needs to be in a event handling method in order to be properly converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1171"' if (event_sender == reloadButtonDumpAreaTemplate) { dumpAreaTemplate.setText(getCurrentDeftemplateString(true)); } else { //UPGRADE_NOTE: The method 'java.util.EventObject.getSource' needs to be in a event handling method in order to be properly converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1171"' if (event_sender == addSlotButton) { EditorRow row = new EditorRow(new DeleteButton(IconLoader.getImageIcon("delete"), rows.size()), new JLabel("Slot " + (rows.size() + 1)), NewTypesCombo, new JTextField()); row.deleteButton.addActionListener(this); addRemoveButton(templatePanel, row.deleteButton, gridbag, gridbagConstraints, (rows.size() + 1)); addLabel(templatePanel, row.rowLabel, gridbag, gridbagConstraints, (rows.size() + 1)); addTypesCombo(templatePanel, row.typeBox, gridbag, gridbagConstraints, (rows.size() + 1)); addNameField(templatePanel, row.nameField, gridbag, gridbagConstraints, (rows.size() + 1)); rows.add(row); templatePanel.revalidate(); } else { //UPGRADE_NOTE: The method 'java.util.EventObject.getSource' needs to be in a event handling method in order to be properly converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1171"' if (event_sender is DeleteButton) { //UPGRADE_NOTE: The method 'java.util.EventObject.getSource' needs to be in a event handling method in order to be properly converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1171"' DeleteButton deleteButton = (DeleteButton)event_sender; rows.remove(deleteButton.Row); templatePanel.removeAll(); initTemplatePanel(); for (int i = 0; i < rows.size(); ++i) { EditorRow editorRow = (EditorRow)rows.get(i); editorRow.deleteButton.Row = i; editorRow.rowLabel.setText("Slot " + (i + 1)); addRemoveButton(templatePanel, editorRow.deleteButton, gridbag, gridbagConstraints, i + 1); addLabel(templatePanel, editorRow.rowLabel, gridbag, gridbagConstraints, i + 1); addTypesCombo(templatePanel, editorRow.typeBox, gridbag, gridbagConstraints, i + 1); addNameField(templatePanel, editorRow.nameField, gridbag, gridbagConstraints, i + 1); } templatePanel.repaint(); templatePanel.revalidate(); } } } } } }