Ejemplo n.º 1
0
        private void buttonStylizedGiveawaysOpen_Click(object sender, EventArgs e)
        {
            Bot bot;

            if (!Bot.Bots.TryGetValue(BotList.SelectedItem.ToString(), out bot))
            {
                return;
            }
            GiveawayForm giveawayForm = new GiveawayForm(this, bot.webBot);

            giveawayForm.Show();
        }
Ejemplo n.º 2
0
        internal async Task Run(GiveawayForm form)
        {
            this.form = form;
            isRunning = await Init();

            while (isRunning)
            {
                this.status = $"Running \n Coal: {iCoal} \n Level: {iLevel}";
                form.Invoke(new MethodInvoker(delegate
                {
                    form.UpdateStatus(status);
                }));
                if (iCoal > 0)
                {
                    await CheckGiveaways();
                }
                await Task.Delay(15 * 60 * 1000); // Wait 15min
                await RefreshProfile();
            }
        }