/*
 * HelloWorld.java
 *
 * Created on 21 maggio 2004, 7.36
 */

package it.businesslogic.ireport.plugin.checkupdate;

/**
 *
 * @author  Administrator
 */
public class CheckUpdate extends it.businesslogic.ireport.plugin.IReportPlugin {
    
    boolean firstTime = true;
    
    
    
    /** Creates a new instance of HelloWorld */
    public CheckUpdate() {
        
    }
    
    public void call() {
        
         if (!firstTime || it.businesslogic.ireport.gui.MainFrame.getMainInstance().getProperties().getProperty("updateOnStartup", "true").equals("true"))
         {
             UpgradeSearch us = new UpgradeSearch();
       
             try {
                javax.swing.SwingUtilities.invokeLater(us);
            } catch (Exception ex) {}
         }
         firstTime = false;
    }
    
    public void configure() {
        CheckUpdateDialog cup = new CheckUpdateDialog(getMainFrame(), true);
        cup.setVisible(true);
        
    }
    
}
