public async void CheckForUpdates(bool popupIfNoneFound = false) { if (Updater.IsDownloadInProgress) { ShowInfo("An update is in progress!", "Updater"); return; } GitHubRelease updateInfo = await Updater.CheckForUpdate(); if (updateInfo == null) { if (popupIfNoneFound) { ShowInfo("No updates available.", "Updater"); } return; } SetTimedStatusText("Update available!", duration: 10); UpdateWindowRequest?.Invoke(this, new UpdateInfoEventArgs() { UpdateInfo = updateInfo, InstallCallback = InstallUpdate_Confirm }); }
public IActionResult Update(Guid id, [FromBody] UpdateWindowRequest request) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id == Guid.Empty) { return(BadRequest("The id parameter should be defined")); } var response = _windowService.Update(id, request); return(response != null ? (IActionResult)Ok(response) : NotFound()); }
public DeliveryWindowDto Update(Guid id, UpdateWindowRequest request) { var model = _repo.Update(id, _mapper.Map <DeliveryWindow>(request)); return(_mapper.Map <DeliveryWindowDto>(model)); }