Ejemplo n.º 1
0
        /// <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;
        }
Ejemplo n.º 2
0
        /// <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);
        }