Example #1
0
 private void CheckForNuGetUpdate()
 {
     if (_productUpdateService != null && _hasConnectedToHttpSource)
     {
         _productUpdateService.CheckForAvailableUpdateAsync();
     }
 }
Example #2
0
        private void OnProviderSelectionChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
        {
            var selectedProvider = explorer.SelectedProvider as PackagesProviderBase;

            if (selectedProvider != null)
            {
                explorer.NoItemsMessage        = selectedProvider.NoItemsMessage;
                _prereleaseComboBox.Visibility = selectedProvider.ShowPrereleaseComboBox ? Visibility.Visible : Visibility.Collapsed;

                // save the selected provider to user settings
                _providerSettings.SelectedProvider = explorer.Providers.IndexOf(selectedProvider);
                // if this is the first time online provider is opened, call to check for update
                if (selectedProvider == explorer.Providers[1] && !_hasOpenedOnlineProvider)
                {
                    _hasOpenedOnlineProvider = true;
                    _productUpdateService.CheckForAvailableUpdateAsync();
                }

                _updateAllUIService.Hide();
            }
            else
            {
                _prereleaseComboBox.Visibility = Visibility.Collapsed;
            }
        }
 protected void CheckForNuGetUpdate()
 {
     _hasConnectedToHttpSource |= UriHelper.IsHttpSource(Source);
     if (_productUpdateService != null && _hasConnectedToHttpSource)
     {
         _productUpdateService.CheckForAvailableUpdateAsync();
     }
 }
Example #4
0
        private void OnProviderSelectionChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
        {
            var selectedProvider = explorer.SelectedProvider as PackagesProviderBase;

            if (selectedProvider != null)
            {
                explorer.NoItemsMessage = selectedProvider.NoItemsMessage;

                // save the selected provider to user settings
                _selectedProviderSettings.SelectedProvider = explorer.Providers.IndexOf(selectedProvider);
                // if this is the first time online provider is opened, call to check for update
                if (selectedProvider == explorer.Providers[1] && !_hasOpenedOnlineProvider)
                {
                    _hasOpenedOnlineProvider = true;
                    _productUpdateService.CheckForAvailableUpdateAsync();
                }
            }
        }