private async Task SendProblemReport() { StartBeingBusy("Sending Problem Report ..."); var state = await _composr.GatherClientState(); _client.SendClientState(state); await Loggly.Post(JsonConvert.SerializeObject(state)); StartBeingBusy("Problem reported. (closing this window ...)"); await Task.Delay(1000 * 3); SetStatus(IDLE_STATUS); StopBeingBusy(); CloseUI(); }
private void OnBroadcastReceived(object sender, KeyValuePair <string, string> msg) { if (!IsRelevantMessage(msg.Value)) { return; } if (_isBusy) { return; } _isBusy = true; Task.Run(async() => { var state = await _composr.GatherClientState(); _listnr.SendClientState(state); _isBusy = false; }); }