/// <summary> /// Constructor. /// </summary> /// <param name="dialogBox"></param> /// <param name="owner"></param> protected internal WorkspaceDialogBoxView(WorkspaceDialogBox dialogBox, WorkspaceView owner) { _owner = owner; var componentView = dialogBox.ComponentView; _content = (Control) componentView.GuiElement; _form = CreateDialogBoxForm(dialogBox, _content); _form.FormClosing += DialogBoxFormClosing; }
/// <summary> /// Constructor. /// </summary> /// <param name="dialogBox"></param> /// <param name="owner"></param> protected internal WorkspaceDialogBoxView(WorkspaceDialogBox dialogBox, WorkspaceView owner) { _owner = owner; var componentView = (IApplicationComponentView)ViewFactory.CreateAssociatedView(dialogBox.Component.GetType()); componentView.SetComponent((IApplicationComponent)dialogBox.Component); _content = (Control) componentView.GuiElement; _form = CreateDialogBoxForm(dialogBox, _content); _form.FormClosing += DialogBoxFormClosing; }
/// <summary> /// Constructor. /// </summary> /// <param name="dialogBox"></param> /// <param name="owner"></param> protected internal WorkspaceDialogBoxView(WorkspaceDialogBox dialogBox, WorkspaceView owner) { _owner = owner; var componentView = (IApplicationComponentView)ViewFactory.CreateAssociatedView(dialogBox.Component.GetType()); componentView.SetComponent((IApplicationComponent)dialogBox.Component); _content = (Control)componentView.GuiElement; _form = CreateDialogBoxForm(dialogBox, _content); _form.FormClosing += DialogBoxFormClosing; }
/// <summary> /// Disposes of this object. /// </summary> /// <param name="disposing"></param> protected override void Dispose(bool disposing) { if (disposing) { if (_form != null) { _reallyClose = true; // Remove the dialog box _owner.RemoveDialogBoxView(this); _content.Dispose(); _content = null; _form.Dispose(); _form = null; } } base.Dispose(disposing); }