Package omschaub.azcvsupdater.utilities.download

Examples of omschaub.azcvsupdater.utilities.download.MainCVSGetManual


        //item1.setImage(ImageRepository.getImage("manual_download"));
        item1.addListener(SWT.Selection, new Listener() {
            public void handleEvent(Event e) {
                try {
                    View.getPluginInterface().getPluginconfig().setPluginParameter("Azureus_downloadTracer",true);
                    MainCVSGetManual mainCVSGet = new MainCVSGetManual();
                    mainCVSGet.setURL(URLReader.get_cvsurl());
                    mainCVSGet.setDir(DirectoryUtils.getBackupDirectory() + System.getProperty("file.separator"));
                    mainCVSGet.initialize("torrent");
                    mainCVSGet.start();
                    }
                catch (Exception e1) {
                    e1.printStackTrace();
                }
            }
        });
       
        MenuItem item2 = new MenuItem (menu, SWT.PUSH);
        item2.setText ("Manually Download Latest Version Via HTTP (Only Use if Torrent Download Fails)");
        //item2.setImage(ImageRepository.getImage("manual_download"));
        item2.addListener(SWT.Selection, new Listener() {
            public void handleEvent(Event e) {
               
                if (version.equals("Checking...."))
                    return;
                AltCVSGet altget = new AltCVSGet();
                altget.setURL("http://azureus.sourceforge.net/cvs/" + version);
                altget.setDir(DirectoryUtils.getBackupDirectory() + System.getProperty("file.separator"));
                altget.setFileName(version);
                altget.initialize();
                altget.start();
               
            }
        });
    
       
       
        download_tb = new ToolItem (toolBar, SWT.DROP_DOWN);
        download_tb.setToolTipText("Manually Download Latest Version");
        download_tb.setImage(ImageRepository.getImage("manual_download"));
        download_tb.addListener (SWT.Selection, new Listener () {
            public void handleEvent (Event event) {
                if(event.detail == SWT.ARROW){
                    Rectangle rect = download_tb.getBounds ();
                    Point pt = new Point (rect.x, rect.y + rect.height);
                    pt = toolBar.toDisplay (pt);
                    menu.setLocation (pt.x, pt.y);
                    menu.setVisible (true);
                }else{
                    try {
                        View.getPluginInterface().getPluginconfig().setPluginParameter("Azureus_downloadTracer",true);
                        MainCVSGetManual mainCVSGet = new MainCVSGetManual();
                        mainCVSGet.setURL(URLReader.get_cvsurl());
                        mainCVSGet.setDir(DirectoryUtils.getBackupDirectory() + System.getProperty("file.separator"));
                        mainCVSGet.initialize("torrent");
                        mainCVSGet.start();
                        }
                    catch (Exception e1) {
                        e1.printStackTrace();
                    }
                }                   
View Full Code Here

TOP

Related Classes of omschaub.azcvsupdater.utilities.download.MainCVSGetManual

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.