Udostępnij przez


UrlBuilder.BuildUrl Metoda

Definicja

Tworzy interfejs użytkownika do utworzenia lub wybrania adresu URL.

Przeciążenia

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

Tworzy interfejs użytkownika do utworzenia lub wybrania adresu URL.

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

Tworzy interfejs użytkownika do tworzenia lub wybierania adresu URL przy użyciu określonego UrlBuilderOptions obiektu.

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

Tworzy interfejs użytkownika do tworzenia lub wybierania adresu URL przy użyciu określonego UrlBuilderOptions obiektu.

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

Tworzy interfejs użytkownika do utworzenia lub wybrania adresu 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

Parametry

component
IComponent

Obiekt IComponent , którego witryna ma być używana do uzyskiwania dostępu do usług w czasie projektowania.

owner
Control

Element Control używany jako element nadrzędny dla okna selektora.

initialUrl
String

Początkowy adres URL, który ma być wyświetlany w oknie selektora.

caption
String

Podpis okna selektora.

filter
String

Ciąg filtru używany do opcjonalnego filtrowania plików wyświetlanych w oknie selektora.

Zwraca

Adres URL zwrócony z interfejsu użytkownika.

Przykłady

W poniższym przykładzie kodu pokazano, jak użyć BuildUrl metody , aby uruchomić konstruktora adresów URL z poziomu polecenia menu w czasie projektowania.

// 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

Zobacz też

Dotyczy

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

Tworzy interfejs użytkownika do tworzenia lub wybierania adresu URL przy użyciu określonego UrlBuilderOptions obiektu.

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

Parametry

component
IComponent

Obiekt IComponent , którego witryna ma być używana do uzyskiwania dostępu do usług w czasie projektowania.

owner
Control

Element Control używany jako element nadrzędny dla okna selektora.

initialUrl
String

Początkowy adres URL, który ma być wyświetlany w oknie selektora.

caption
String

Podpis okna selektora.

filter
String

Ciąg filtru używany do opcjonalnego filtrowania plików wyświetlanych w oknie selektora.

options
UrlBuilderOptions

Element UrlBuilderOptions wskazujący opcje wyboru adresu URL.

Zwraca

Adres URL zwrócony z interfejsu użytkownika.

Przykłady

// 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

Zobacz też

Dotyczy

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

Tworzy interfejs użytkownika do tworzenia lub wybierania adresu URL przy użyciu określonego UrlBuilderOptions obiektu.

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

Parametry

serviceProvider
IServiceProvider

Element używany do uzyskiwania IServiceProvider dostępu do usług w czasie projektowania.

owner
Control

Element Control używany jako element nadrzędny dla okna selektora.

initialUrl
String

Początkowy adres URL, który ma być wyświetlany w oknie selektora.

caption
String

Podpis okna selektora.

filter
String

Ciąg filtru używany do opcjonalnego filtrowania plików wyświetlanych w oknie selektora.

options
UrlBuilderOptions

Element UrlBuilderOptions wskazujący opcje wyboru adresu URL.

Zwraca

Adres URL zwrócony z interfejsu użytkownika.

Uwagi

Interfejs IServiceProvider służy do uzyskiwania implementacji IDesignerHost hosta projektanta.

Zobacz też

Dotyczy