コード例 #1
0
        public UpdateHintViewModel(
            IUpdateHelper updateHelper,
            ITranslationUpdater translationUpdater,
            IEventAggregator eventAggregator,
            IVersionHelper versionHelper,
            IUpdateLauncher updateLauncher,
            IDispatcher dispatcher,
            IOnlineVersionHelper onlineVersionHelper,
            IAssemblyHelper assemblyHelper)
            :
            base(translationUpdater)
        {
            _updateHelper        = updateHelper;
            _eventAggregator     = eventAggregator;
            _updateLauncher      = updateLauncher;
            _dispatcher          = dispatcher;
            _onlineVersionHelper = onlineVersionHelper;
            _assemblyHelper      = assemblyHelper;

            SetCurrentDateFormat();

            AvailableVersionText = Translation.GetNewUpdateMessage(_onlineVersionHelper.GetOnlineVersion().Version.ToString(3),
                                                                   versionHelper.ApplicationVersion.ToString(3),
                                                                   CurrentVersionDate);
        }
コード例 #2
0
        private async Task InstallUpdate(object obj)
        {
            _eventAggregator.GetEvent <SetShowUpdateEvent>().Publish(false);
            FinishStep();

            var onlineVersion = _onlineVersionHelper.GetOnlineVersion();
            await _updateLauncher.LaunchUpdateAsync(onlineVersion);
        }
コード例 #3
0
 private async Task InstallUpdate()
 {
     var applicationVersion = _onlineVersionHelper.GetOnlineVersion();
     await _updateLauncher.LaunchUpdateAsync(applicationVersion);
 }