package command;

/*
 * Copyright (c) 2002-2007 TeamDev Ltd. All rights reserved.
 *
 * Use is subject to license terms.
 *
 * The complete licence text can be found at
 * http://www.teamdev.com/winpack/license.jsf
 */

import com.jniwrapper.win32.ie.WebBrowser;
import com.jniwrapper.win32.ie.command.SaveAsCommand;
import core.BasicSample;

/**
 * This sample invokes Save dialog.
 *
 * @author Alexei Orischenko
 */
public class SaveDialogSample extends BasicSample
{
    public SaveDialogSample()
    {
        super("Save Dialog");
    }

    protected void execute()
    {
        final WebBrowser browser = getBrowser();
        browser.navigate("http://google.com");
        browser.waitReady();

        showMessage("Invoke Save Dialog");

        browser.execute(new SaveAsCommand());
    }

    public static void main(String[] args) throws Exception
    {
        new SaveDialogSample().run();
    }
}
