private void _requestr_ResponseReceived(object sender, ApprovalEnvelope <string> envelope) { DoCancel(); if (envelope.IsApproved != true) { return; } var jobs = MarketDayCloser.GetActions(_main.ColxnsDB, _main.AppArgs, envelope.ResponderName); Parallel.Invoke(jobs.ToArray()); CurrentExe.RelaunchApp(); }
private async Task DownloadAndWriteToDisk() { Log("Downloading latest file from server ..."); var b64 = await _client.GetContentB64(_fileKey); if (b64.IsBlank()) { Log($"Something went wrong at {nameof(DownloadAndWriteToDisk)}!"); } Log("Writing downloaded file to disk ..."); DecodeB64ToDisk(b64); if (_fileKey == CheckerRelease.FileKey) { _listnr.Disconnect(); CurrentExe.RelaunchApp(); } }
private async Task ExitApp(bool relaunchAfter) { try { OnWindowClose(); await OnWindowCloseAsync(); _scope?.Dispose(); AppInsights.Flush(); if (relaunchAfter) { CurrentExe.RelaunchApp(); } else { CurrentExe.Shutdown(); } } catch { } }