void AddDocuments()
        {
            NUIDocument doc;

            for (int i = 1; i < 5; i++)
            {
                doc = new NUIDocument("Document " + i.ToString(), -1, NDockingPanelsExampleForm.GetTextBox());
                nDockManager1.DocumentManager.AddDocument(doc);
            }
        }
Exemple #2
0
        public NMdiMenuMergeForm()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            m_UpdateFormCaption.Checked = true;

            nCommandBarsManager1.Palette.Copy(NUIManager.Palette);
            nDockManager1.Palette.Copy(NUIManager.Palette);
            nDockManager1.DocumentStyle.DocumentViewStyle = DocumentViewStyle.MdiStandard;

            NUIDocument doc;

            for (int i = 1; i < 5; i++)
            {
                doc        = new NUIDocument("Document " + i.ToString());
                doc.Client = NDockingPanelsExampleForm.GetTextBox();
                nDockManager1.DocumentManager.AddDocument(doc);
            }

            INUIDocumentHost host = nDockManager1.DocumentManager.Documents[3].Host as NMdiChild;

            if (host == null)
            {
                return;
            }

            host.Activate();

            NMdiChild child = host as NMdiChild;

            if (child != null)
            {
                child.WindowState = FormWindowState.Maximized;
            }
        }