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); })); } }
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(); } }