C# Class NuGet.Options.PackageSourcesOptionsControl

Represents the Tools - Options - Package Manager dialog
The code in this class assumes that while the dialog is open, noone is modifying the VSPackageSourceProvider directly. Otherwise, we have a problem with synchronization with the package source provider.
Inheritance: System.Windows.Forms.UserControl
Show file Open project: themotleyfool/NuGet Class Usage Examples

Public Methods

Method Description
PackageSourcesOptionsControl ( IServiceProvider serviceProvider ) : System
PackageSourcesOptionsControl ( IVsPackageSourceProvider packageSourceProvider, IServiceProvider serviceProvider ) : System

Private Methods

Method Description
ApplyChangedSettings ( ) : bool

Persist the package sources, which was add/removed via the Options page, to the VS Settings store. This gets called when users click OK button.

ClearNameSource ( ) : void
ClearSettings ( ) : void

This gets called when users close the Options dialog

CopySelectedItem ( PackageSource selectedPackageSource ) : void
CreateNewPackageSource ( ) : PackageSource
DetermineInitialDirectory ( ) : string
GetCheckBoxRectangleForListBoxItem ( int itemIndex ) : Rectangle
InitializeOnActivated ( ) : void
IsPathRootedSafe ( string path ) : bool
MoveSelectedItem ( int offset ) : void
NewBounds ( Rectangle sourceBounds, int xOffset, int yOffset ) : Rectangle
OnAddButtonClick ( object sender, EventArgs e ) : void
OnBrowseButtonClicked ( object sender, EventArgs e ) : void
OnRemoveButtonClick ( object sender, EventArgs e ) : void
OnSelectedPackageSourceChanged ( object sender, EventArgs e ) : void
OnUpdateButtonClick ( object sender, EventArgs e ) : void
PackageSourcesContextMenu_ItemClicked ( object sender, ToolStripItemClickedEventArgs e ) : void
PackageSourcesListBox_DrawItem ( object sender, DrawItemEventArgs e ) : void
PackageSourcesListBox_KeyUp ( object sender, KeyEventArgs e ) : void
PackageSourcesListBox_MeasureItem ( object sender, System.Windows.Forms.MeasureItemEventArgs e ) : void
PackageSourcesListBox_MouseMove ( object sender, MouseEventArgs e ) : void
PackageSourcesListBox_MouseUp ( object sender, MouseEventArgs e ) : void
SelectAndFocus ( TextBox textBox ) : void
SetupEventHandlers ( ) : void
TogglePackageSourceEnabled ( int itemIndex ) : void
TryUpdateSource ( ) : TryUpdateSourceResults
UpdateUI ( ) : void

Method Details

PackageSourcesOptionsControl() public method

public PackageSourcesOptionsControl ( IServiceProvider serviceProvider ) : System
serviceProvider IServiceProvider
return System

PackageSourcesOptionsControl() public method

public PackageSourcesOptionsControl ( IVsPackageSourceProvider packageSourceProvider, IServiceProvider serviceProvider ) : System
packageSourceProvider IVsPackageSourceProvider
serviceProvider IServiceProvider
return System