DialogForm(IServiceProvider) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the DialogForm class.
protected:
DialogForm(IServiceProvider ^ serviceProvider);
protected DialogForm (IServiceProvider serviceProvider);
new Microsoft.Web.Management.Client.Win32.DialogForm : IServiceProvider -> Microsoft.Web.Management.Client.Win32.DialogForm
Protected Sub New (serviceProvider As IServiceProvider)
Parameters
- serviceProvider
- IServiceProvider
A IServiceProvider interface that represents the service provider for the form.
Examples
The following example shows an implementation of the DialogForm constructor.
internal sealed class MyUpgradeDlg : DialogForm {
private PictureBox _warnPB;
private TextBox _warnTB;
private CheckBox _warnAgainCB;
private Button _closeBtn;
private LinkLabel _referenceLink;
private WebObjectsModuleProxy _serviceProxy;
private int _serviceDisabledReason;
public MyUpgradeDlg(IServiceProvider serviceProvider,
WebObjectsModuleProxy serviceProxy, int serviceDisabledReason)
: base(serviceProvider) {
_serviceProxy = serviceProxy;
_serviceDisabledReason = serviceDisabledReason;
InitializeComponent();
Text = "My Web Management Tool Title";
}
protected override bool CanShowHelp {
get { return false; }
}
void _referenceLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) {
Process.Start(_myLink);
}
private void OnCloseButtonClick(object sender, EventArgs e) {
if (_warnAgainCB.Checked) {
_serviceProxy.RemoveServiceDisabledReason();
}
DialogResult = DialogResult.OK;
Close();
}