Ejemplo n.º 1
0
        public static ABCDockManager GetDockManager(ABCView view)
        {
            if (view.Mode == ViewMode.Design)
            {
                foreach (Component comp in view.Surface.DesignerHost.Container.Components)
                {
                    if (comp is ABCDockManager)
                    {
                        view.CurrentDockManager = (ABCDockManager)comp;
                        return((ABCDockManager)comp);
                    }
                }

                ABCDockManager manager = (ABCDockManager)view.Surface.DesignerHost.CreateComponent(typeof(ABCDockManager));
                manager.Form            = view;
                view.CurrentDockManager = manager;
                return(manager);
            }
            else
            {
                if (view.CurrentDockManager != null)
                {
                    return(view.CurrentDockManager);
                }

                view.CurrentDockManager = new ABCDockManager(view);
                return(view.CurrentDockManager);
            }
        }
Ejemplo n.º 2
0
        public void Load(XmlDocument doc, ViewMode mode)
        {
            Mode = mode;

            this.SuspendLayout();
            try
            {
                DataConfig = new ABCScreen.ABCScreenConfig(this);
                DataConfig.DeSerialization(doc);

                XmlNodeList nodeList = doc.GetElementsByTagName("C");
                ABCPresentHelper.LoadComponent(this, nodeList[0]);

                ABCDockManager.InitDockManager(this, doc);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message + " : " + ex.StackTrace);
            }

            this.InitControl();
            this.ResumeLayout(false);

            if (this.Surface != null)
            {
                this.Surface.UndoEngine.CleanEngine();
            }
        }
Ejemplo n.º 3
0
        public void PerformDock(ABCView view)
        {
            //if ( this.Tabbed )
            //    this.ActiveChild=(ABCDockPanel)this.Controls[0];
            ABCDockManager manager = ABCDockManager.GetDockManager(view);

            this.Register(manager);
            this.DockTo(this.Dock);
        }