예제 #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Itch Bundle Claimer v0.2");
            Console.WriteLine("========================");
            Console.WriteLine("Choose your browser: 1. Chrome, 2. Firefox");

            string browserInputStr = Console.ReadLine();
            int    browserInput;

            if (int.TryParse(browserInputStr, out browserInput) == false)
            {
                return;
            }

            switch (browserInput)
            {
            case 1:
                BrowserInterface.SetBrowserType(BrowserInterface.Type.Chrome);
                break;

            case 2:
                BrowserInterface.SetBrowserType(BrowserInterface.Type.Firefox);
                break;

            default:
                return;
            }

            DisplayConfigMenu();
            Console.Clear();

            Console.WriteLine("Enter your Itch bundle link:");
            string bundleUrl = Console.ReadLine();

            Console.WriteLine("After the browser window opens, log in to Itch and return here to continue.");
            Console.WriteLine("Press enter to start...");
            Console.ReadLine();

            ItchBundleInterface itchBundleInterface;

            if (args.Length > 0 && args[0] == "dummy")
            {
                itchBundleInterface = new DummyBundleInterface(bundleUrl);
            }
            else
            {
                itchBundleInterface = new ItchBundleInterface(bundleUrl);
            }

            itchBundleInterface.Start(Config.Active.StartPage);

            Console.WriteLine("Finished claiming. Press enter to exit...");
            Console.ReadLine();
        }
예제 #2
0
 public GamePageInterface(string gameUrl, BrowserInterface browserInterface)
 {
     this.gameUrl          = gameUrl;
     this.browserInterface = browserInterface;
 }
 public ItchBundleInterface(string rootUrl)
 {
     bundleRootUrl    = rootUrl;
     browserInterface = BrowserInterface.Build();
 }