Share via


DialogForm Class

Definition

Provides a base class for fixed-size dialog boxes.

public ref class DialogForm abstract : Microsoft::Web::Management::Client::Win32::BaseForm
public abstract class DialogForm : Microsoft.Web.Management.Client.Win32.BaseForm
type DialogForm = class
    inherit BaseForm
Public MustInherit Class DialogForm
Inherits BaseForm
Inheritance
DialogForm
Derived

Examples

The following example shows a partial implementation of the DialogForm class.

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();
    }

Constructors

DialogForm(IServiceProvider)

Initializes a new instance of the DialogForm class.

Properties

CanShowHelp

Gets a value indicating whether the context-sensitive Help button is shown.

(Inherited from BaseForm)
ServiceProvider

Gets the service object for the class.

(Inherited from BaseForm)

Methods

DisplayErrorMessage(Exception, ResourceManager)

Displays the error message from the exception thrown by the IServiceProvider interface.

(Inherited from BaseForm)
Dispose(Boolean)

Releases the unmanaged resources used by the BaseForm and optionally releases the managed resources.

(Inherited from BaseForm)
GetService(Type)

Retrieves the requested service.

(Inherited from BaseForm)
OnActivated(EventArgs)

Occurs when the base form is activated.

(Inherited from BaseForm)
OnHelpRequested(HelpEventArgs)

Occurs when a Help control is activated.

(Inherited from BaseForm)
OnInitialActivated(EventArgs)

Occurs when the base form is first activated.

(Inherited from BaseForm)
ShowError(Exception, String, Boolean)

Displays the specified exception and information about the exception in a message box.

(Inherited from BaseForm)
ShowHelp()

When overridden in a derived class, displays the Help file.

(Inherited from BaseForm)
ShowMessage(String, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton)

Displays a message box that uses the specified text, button set, symbol, and default button.

(Inherited from BaseForm)
ShowMessage(String)

Displays a message box that uses the specified text.

(Inherited from BaseForm)
Update()

When overridden in a derived class, updates the view of the form.

(Inherited from BaseForm)
WndProc(Message)

Reroutes the context-sensitive Help button events to the ShowHelp() method.

(Inherited from BaseForm)

Applies to