Exemple #1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="workspace"></param>
        /// <param name="desktopView"></param>
        protected internal WorkspaceView(Workspace workspace, DesktopWindowView desktopView)
        {
            var componentView = (IApplicationComponentView)ViewFactory.CreateAssociatedView(workspace.Component.GetType());

            componentView.SetComponent((IApplicationComponent)workspace.Component);

            _control = (Control)componentView.GuiElement;
            _tabPage = new Crownwood.DotNetMagic.Controls.TabPage {
                Control = _control, Tag = this
            };
            this.DesktopView = desktopView;

            _dialogBoxManager = new WorkspaceDialogBoxViewManager(this, _control);
        }
Exemple #2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="dialogBox"></param>
        /// <param name="owner"></param>
        protected internal DialogBoxView(DialogBox dialogBox, DesktopWindowView owner)
        {
            IApplicationComponentView componentView = (IApplicationComponentView)ViewFactory.CreateAssociatedView(dialogBox.Component.GetType());

            componentView.SetComponent((IApplicationComponent)dialogBox.Component);

            // cache the app component - we'll need it later to get the ExitCode
            _component = (IApplicationComponent)dialogBox.Component;

            _form              = CreateDialogBoxForm(dialogBox, (Control)componentView.GuiElement);
            _form.FormClosing += new FormClosingEventHandler(_form_FormClosing);

            _owner = owner.DesktopForm;
        }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="shelf"></param>
 /// <param name="desktopView"></param>
 protected internal ShelfView(Shelf shelf, DesktopWindowView desktopView)
 {
     _shelf       = shelf;
     _desktopView = desktopView;
 }