private Proxy getProxy() { MessicConfig mc = new MessicConfig(); String url = (String) mc.getProxyUrl(); String port = (String) mc.getProxyPort(); if ( url != null && port != null && url.length() > 0 && port.length() > 0 ) { SocketAddress addr = new InetSocketAddress( url, Integer.valueOf( port ) ); Proxy proxy = new Proxy( Proxy.Type.HTTP, addr ); return proxy; } return null; }
MessicConfig mc = new MessicConfig(); if ( !mc.isCheckUpdateEnabled() ) Proxy proxy = getProxy( new MessicConfig() );
/** * Do some checks before start. Return true if everything is OK. false is something is wrong and we cannot start. * * @return result */ private boolean checkBeforeStart() { // 1st- check if the destination folder exist MessicConfig mc = new MessicConfig(); String paramMusicFolder = mc.getMusicFolder(); File fMusicFolder = new File( paramMusicFolder ); final Properties ml = Util.getMultilanguage(); if ( !fMusicFolder.exists() ) { int result = JOptionPane.showConfirmDialog( ProcessMonitorWindow.this, ml.getProperty( "messic-check-musicfolder-noexist" ), "", JOptionPane.YES_NO_OPTION ); if ( result == JOptionPane.YES_OPTION ) { return true; } else { return false; } } return true; }
public void actionPerformed( ActionEvent e ) MessicConfig mc = new MessicConfig(); Properties p = mc.getConfiguration(); String storedMusicFolder = p.getProperty( MessicConfig.MESSIC_MUSICFOLDER );
if ( ffolder.exists() ) MessicConfig mc = new MessicConfig(); mc.getConfiguration().setProperty( MessicConfig.MESSIC_MUSICFOLDER, folder ); mc.save();
MessicConfig mc = new MessicConfig( true ); Properties p = mc.getConfiguration(); p.setProperty( MessicConfig.MESSIC_MUSICFOLDER,
MessicConfig mc = new MessicConfig();
MessicConfig sc = new MessicConfig(); String proxyURL = sc.getProxyUrl(); String proxyPort = sc.getProxyPort(); sc = new MessicConfig();