public async Task IsUpdateBot() { while (true) { await Task.Delay(1000); try { var client = new RestClient(_host); var request = new RestRequest($"GetIsUpdateBot/{Properties.Settings.Default.Key}"); var res = await client.ExecuteAsync(request); try { var isOn = bool.Parse(res.Content); if (isOn) { await SeleniumBot.ParseAll(); } } catch { } } catch { } } }
public async Task Execute(IJobExecutionContext context) { Properties.Settings.Default.LastParse = ""; Properties.Settings.Default.Save(); await SeleniumBot.ParseAll(); }
private async void updateLots_btn_Click(object sender, EventArgs e) { await SeleniumBot.ParseAll(); }