/// <summary> /// 服务端发生更新,客户端也需更新 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void Current_CheckAndDownloadUpdateCompleted(object sender, CheckAndDownloadUpdateCompletedEventArgs e) { var message = new MessageOperationLibrary.Events.VersionUpdateEvent(); if (e.UpdateAvailable && e.Error == null) { message.Message = "应用新版本已经下载成功,将在下次启动时生效。"; MessageEventAggregatorRepository.EventAggregator.Publish<VersionUpdateEvent>(message); } else if (e.Error != null) { message.Message = "更新版本出错,请重新启动。"; MessageEventAggregatorRepository.EventAggregator.Publish<VersionUpdateEvent>(message); } }
private void OnVersionUpdate(VersionUpdateEvent e) { VersionUpdateMessage = e.Message; }