示例#1
0
 internal void StatusUpdate()
 {
     if (form == null)
     {
         return;
     }
     if (isRunning)
     {
         this.status = $"Running \n Coal: {iCoal} \n Level: {iLevel}";
         form.Invoke(new MethodInvoker(delegate
         {
             form.UpdateStatus(status, string.IsNullOrWhiteSpace(Log) ? "" : Log);
         }));
     }
     else
     {
         form.Invoke(new MethodInvoker(delegate { form.UpdateStatus(string.Empty); }));
     }
 }
示例#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();
            }
        }