private async void OnCheckForUpdatesAsync(object obj) { UpdateController updateController = new UpdateController(); await updateController.CheckForUpdateAsync(); if (!updateController.UpdateFound) { PopupWrapper popupWrapper = this.messagePopup; string[] cOMSIDLATESTVERSION = new string[] { ResourcesModel.Instanse.COM_SID_LATEST_VERSION, ResourcesModel.Instanse.MAPP_SID_YOU_HAVE_THE_LATEST_VERION }; popupWrapper.Show(cOMSIDLATESTVERSION); } else { UpdateMessagePopupViewModel updateMessagePopupViewModel = new UpdateMessagePopupViewModel(); object obj1 = await base.Controller.CreatePopup(updateMessagePopupViewModel, false).ShowDialogAsync(); bool?decision = (obj1 as AlternativePopupEventArgs).Decision; if ((!decision.GetValueOrDefault() ? false : decision.HasValue)) { Process.Start(updateController.UpdateUrl); } if (updateController.ForceUpdate) { Application.Current.Shutdown(); } } }
private async Task CheckForUpdates() { UpdateController updateController = new UpdateController(); await updateController.CheckForUpdateAsync(); if (updateController.UpdateFound) { UpdateMessagePopupViewModel updateMessagePopupViewModel = new UpdateMessagePopupViewModel(); object obj = await base.Controller.CreatePopup(updateMessagePopupViewModel, false).ShowDialogAsync(); bool?decision = (obj as AlternativePopupEventArgs).Decision; if ((!decision.GetValueOrDefault() ? false : decision.HasValue)) { Process.Start(updateController.UpdateUrl); } if (updateController.ForceUpdate) { Application.Current.Shutdown(); } } }