Exemplo n.º 1
0
 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.");
                     }
                 }
             }
         }
     }
 }
Exemplo n.º 2
0
 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.");
                     }
                 }
             }
         }
     }
 }