UrlBuilder.BuildUrl Metodo

Definizione

Crea un'interfaccia utente per la creazione o la selezione di un URL.

Overload

BuildUrl(IComponent, Control, String, String, String)

Crea un'interfaccia utente per la creazione o la selezione di un URL.

BuildUrl(IComponent, Control, String, String, String, UrlBuilderOptions)

Crea un'interfaccia utente per la creazione o la selezione di un URL utilizzando l'oggetto UrlBuilderOptions specificato.

BuildUrl(IServiceProvider, Control, String, String, String, UrlBuilderOptions)

Crea un'interfaccia utente per la creazione o la selezione di un URL utilizzando l'oggetto UrlBuilderOptions specificato.

BuildUrl(IComponent, Control, String, String, String)

Crea un'interfaccia utente per la creazione o la selezione di un URL.

public:
 static System::String ^ BuildUrl(System::ComponentModel::IComponent ^ component, System::Windows::Forms::Control ^ owner, System::String ^ initialUrl, System::String ^ caption, System::String ^ filter);
public static string BuildUrl (System.ComponentModel.IComponent component, System.Windows.Forms.Control owner, string initialUrl, string caption, string filter);
static member BuildUrl : System.ComponentModel.IComponent * System.Windows.Forms.Control * string * string * string -> string
Public Shared Function BuildUrl (component As IComponent, owner As Control, initialUrl As String, caption As String, filter As String) As String

Parametri

component
IComponent

Oggetto IComponent il cui sito deve essere utilizzato per accedere ai servizi in fase di progettazione.

owner
Control

Oggetto Control utilizzato come padre della finestra di selezione.

initialUrl
String

URL iniziale da mostrare nella finestra di selezione.

caption
String

Titolo della finestra di selezione.

filter
String

Stringa di filtro da utilizzare per filtrare i file visualizzati nella finestra di selezione.

Restituisce

URL restituito dall'interfaccia utente.

Esempio

Nell'esempio di codice seguente viene illustrato come usare il BuildUrl metodo per avviare un generatore di URL da un comando di menu in fase di progettazione.

// Create a parent control.
System::Windows::Forms::Control^ c = gcnew System::Windows::Forms::Control;
c->CreateControl();

// Launch the Url Builder using the specified control
// parent, initial URL, empty relative base URL path,
// window caption, filter String* and URLBuilderOptions value.
UrlBuilder::BuildUrl( this->Component, c, "http://www.example.com", "Select a URL", "", UrlBuilderOptions::None );
// This method handles the "Launch Url Builder UI" menu command.
// Invokes the BuildUrl method of the System.Web.UI.Design.UrlBuilder.
private void launchUrlBuilder(object sender, EventArgs e)
{
    // Create a parent control.
    System.Windows.Forms.Control c = new System.Windows.Forms.Control();            
    c.CreateControl();            
                
    // Launch the Url Builder using the specified control
    // parent, initial URL, empty relative base URL path,
    // window caption, filter string and URLBuilderOptions value.
    UrlBuilder.BuildUrl(
        this.Component, 
        c, 
        "http://www.example.com", 
        "Select a URL", 
        "", 
        UrlBuilderOptions.None);                      
}
' This method handles the "Launch Url Builder UI" menu command.
' Invokes the BuildUrl method of the System.Web.UI.Design.UrlBuilder.
Private Sub launchUrlBuilder(ByVal sender As Object, ByVal e As EventArgs)
    ' Create a parent control.
    Dim c As New System.Windows.Forms.Control()
    c.CreateControl()

    ' Launch the Url Builder using the specified control
    ' parent, initial URL, empty relative base URL path,
    ' window caption, filter string and URLBuilderOptions value.
    UrlBuilder.BuildUrl( _
        Me.Component, _
        c, _
        "http://www.example.com", _
        "Select a URL", _
        "", _
        UrlBuilderOptions.None)
End Sub

Vedi anche

Si applica a

BuildUrl(IComponent, Control, String, String, String, UrlBuilderOptions)

Crea un'interfaccia utente per la creazione o la selezione di un URL utilizzando l'oggetto UrlBuilderOptions specificato.

public:
 static System::String ^ BuildUrl(System::ComponentModel::IComponent ^ component, System::Windows::Forms::Control ^ owner, System::String ^ initialUrl, System::String ^ caption, System::String ^ filter, System::Web::UI::Design::UrlBuilderOptions options);
public static string BuildUrl (System.ComponentModel.IComponent component, System.Windows.Forms.Control owner, string initialUrl, string caption, string filter, System.Web.UI.Design.UrlBuilderOptions options);
static member BuildUrl : System.ComponentModel.IComponent * System.Windows.Forms.Control * string * string * string * System.Web.UI.Design.UrlBuilderOptions -> string
Public Shared Function BuildUrl (component As IComponent, owner As Control, initialUrl As String, caption As String, filter As String, options As UrlBuilderOptions) As String

Parametri

component
IComponent

Oggetto IComponent il cui sito deve essere utilizzato per accedere ai servizi in fase di progettazione.

owner
Control

Oggetto Control utilizzato come padre della finestra di selezione.

initialUrl
String

URL iniziale da mostrare nella finestra di selezione.

caption
String

Titolo della finestra di selezione.

filter
String

Stringa di filtro da utilizzare per filtrare i file visualizzati nella finestra di selezione.

options
UrlBuilderOptions

Oggetto UrlBuilderOptions che indica le opzioni per la selezione URL.

Restituisce

URL restituito dall'interfaccia utente.

Esempio

// Create a parent control.
System::Windows::Forms::Control^ c = gcnew System::Windows::Forms::Control;
c->CreateControl();

// Launch the Url Builder using the specified control
// parent, initial URL, empty relative base URL path,
// window caption, filter String* and URLBuilderOptions value.
UrlBuilder::BuildUrl( this->Component, c, "http://www.example.com", "Select a URL", "", UrlBuilderOptions::None );
// This method handles the "Launch Url Builder UI" menu command.
// Invokes the BuildUrl method of the System.Web.UI.Design.UrlBuilder.
private void launchUrlBuilder(object sender, EventArgs e)
{
    // Create a parent control.
    System.Windows.Forms.Control c = new System.Windows.Forms.Control();            
    c.CreateControl();            
                
    // Launch the Url Builder using the specified control
    // parent, initial URL, empty relative base URL path,
    // window caption, filter string and URLBuilderOptions value.
    UrlBuilder.BuildUrl(
        this.Component, 
        c, 
        "http://www.example.com", 
        "Select a URL", 
        "", 
        UrlBuilderOptions.None);                      
}
' This method handles the "Launch Url Builder UI" menu command.
' Invokes the BuildUrl method of the System.Web.UI.Design.UrlBuilder.
Private Sub launchUrlBuilder(ByVal sender As Object, ByVal e As EventArgs)
    ' Create a parent control.
    Dim c As New System.Windows.Forms.Control()
    c.CreateControl()

    ' Launch the Url Builder using the specified control
    ' parent, initial URL, empty relative base URL path,
    ' window caption, filter string and URLBuilderOptions value.
    UrlBuilder.BuildUrl( _
        Me.Component, _
        c, _
        "http://www.example.com", _
        "Select a URL", _
        "", _
        UrlBuilderOptions.None)
End Sub

Vedi anche

Si applica a

BuildUrl(IServiceProvider, Control, String, String, String, UrlBuilderOptions)

Crea un'interfaccia utente per la creazione o la selezione di un URL utilizzando l'oggetto UrlBuilderOptions specificato.

public:
 static System::String ^ BuildUrl(IServiceProvider ^ serviceProvider, System::Windows::Forms::Control ^ owner, System::String ^ initialUrl, System::String ^ caption, System::String ^ filter, System::Web::UI::Design::UrlBuilderOptions options);
public static string BuildUrl (IServiceProvider serviceProvider, System.Windows.Forms.Control owner, string initialUrl, string caption, string filter, System.Web.UI.Design.UrlBuilderOptions options);
static member BuildUrl : IServiceProvider * System.Windows.Forms.Control * string * string * string * System.Web.UI.Design.UrlBuilderOptions -> string
Public Shared Function BuildUrl (serviceProvider As IServiceProvider, owner As Control, initialUrl As String, caption As String, filter As String, options As UrlBuilderOptions) As String

Parametri

serviceProvider
IServiceProvider

Oggetto IServiceProvider da utilizzare per accedere ai servizi in fase di progettazione.

owner
Control

Oggetto Control utilizzato come padre della finestra di selezione.

initialUrl
String

URL iniziale da mostrare nella finestra di selezione.

caption
String

Titolo della finestra di selezione.

filter
String

Stringa di filtro da utilizzare per filtrare i file visualizzati nella finestra di selezione.

options
UrlBuilderOptions

Oggetto UrlBuilderOptions che indica le opzioni per la selezione URL.

Restituisce

URL restituito dall'interfaccia utente.

Commenti

L'interfaccia IServiceProvider viene usata per ottenere l'implementazione IDesignerHost per l'host della finestra di progettazione.

Vedi anche

Si applica a