UrlBuilder.BuildUrl Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Cria uma interface para criar ou escolher uma URL.
Sobrecargas
| Name | Description |
|---|---|
| BuildUrl(IComponent, Control, String, String, String) |
Cria uma interface para criar ou escolher uma URL. |
| BuildUrl(IComponent, Control, String, String, String, UrlBuilderOptions) |
Cria uma interface para criar ou escolher uma URL, usando o objeto especificado UrlBuilderOptions . |
| BuildUrl(IServiceProvider, Control, String, String, String, UrlBuilderOptions) |
Cria uma interface para criar ou escolher uma URL, usando o objeto especificado UrlBuilderOptions . |
BuildUrl(IComponent, Control, String, String, String)
Cria uma interface para criar ou escolher uma 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
Parâmetros
- component
- IComponent
O IComponent site de quem deve ser usado para aceder a serviços em tempo de design.
- initialUrl
- String
O URL inicial deve ser mostrado na janela do seletor.
- caption
- String
A legenda da janela do picker.
- filter
- String
A cadeia de filtro a usar para filtrar opcionalmente os ficheiros exibidos na janela do seletor.
Devoluções
O URL deveria da interface.
Exemplos
O exemplo de código seguinte mostra como usar o BuildUrl método para lançar um construtor de URLs a partir de um comando de menu no momento do design.
// 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
Ver também
Aplica-se a
BuildUrl(IComponent, Control, String, String, String, UrlBuilderOptions)
Cria uma interface para criar ou escolher uma URL, usando o objeto especificado UrlBuilderOptions .
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
Parâmetros
- component
- IComponent
O IComponent site de quem deve ser usado para aceder a serviços em tempo de design.
- initialUrl
- String
O URL inicial deve ser mostrado na janela do seletor.
- caption
- String
A legenda da janela do picker.
- filter
- String
A cadeia de filtro a usar para filtrar opcionalmente os ficheiros exibidos na janela do seletor.
- options
- UrlBuilderOptions
A indicando UrlBuilderOptions as opções para a seleção de URL.
Devoluções
O URL deveria da interface.
Exemplos
// 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
Ver também
Aplica-se a
BuildUrl(IServiceProvider, Control, String, String, String, UrlBuilderOptions)
Cria uma interface para criar ou escolher uma URL, usando o objeto especificado UrlBuilderOptions .
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
Parâmetros
- serviceProvider
- IServiceProvider
O IServiceProvider a ser usado para aceder a serviços em tempo de design.
- initialUrl
- String
O URL inicial deve ser mostrado na janela do seletor.
- caption
- String
A legenda da janela do picker.
- filter
- String
A cadeia de filtro a usar para filtrar opcionalmente os ficheiros exibidos na janela do seletor.
- options
- UrlBuilderOptions
A indicando UrlBuilderOptions as opções para a seleção de URL.
Devoluções
O URL deveria da interface.
Observações
A IServiceProvider interface é usada para obter a IDesignerHost implementação para o host projetista.