private void OnDialogWindowClosed(object sender, EventArgs e)
        {
            foreach (PackagesProviderBase provider in explorer.Providers)
            {
                // give each provider a chance to clean up itself
                provider.Dispose();
            }

            explorer.Providers.Clear();

            // flush output messages to the Output console at once when the dialog is closed.
            _smartOutputConsoleProvider.Flush();

            _updateAllUIService.DisposeElement();

            if (_httpClientEvents != null)
            {
                _httpClientEvents.SendingRequest -= OnSendingRequest;
            }

            RemoveUpdateBar();
            RemoveRestoreBar();

            CurrentInstance = null;
        }
Exemple #2
0
        /// <summary>
        /// Called when coming back from the Options dialog
        /// </summary>
        private static void OnActivated(Project project)
        {
            var window = new PackageManagerWindow(project);

            try
            {
                window.ShowModal();
            }
            catch (TargetInvocationException exception)
            {
                MessageHelper.ShowErrorMessage(exception, NuGet.Dialog.Resources.Dialog_MessageBoxTitle);
                ExceptionHelper.WriteToActivityLog(exception);
            }
        }
        private void OnDialogWindowClosed(object sender, EventArgs e)
        {
            foreach (PackagesProviderBase provider in explorer.Providers)
            {
                // give each provider a chance to clean up itself
                provider.Dispose();
            }

            explorer.Providers.Clear();

            // flush output messages to the Output console at once when the dialog is closed.
            _smartOutputConsoleProvider.Flush();

            CurrentInstance = null;
        }
Exemple #4
0
 private void OnDialogWindowLoaded(object sender, RoutedEventArgs e)
 {
     // HACK: Keep track of the currently open instance of this class.
     CurrentInstance = this;
 }