public void DefaultLayout()
        {
            //The default layout doesn't have any docked memory views, but the process of clearing the layout will detach
            //any memory views found from the docking system. It is important that no zombie memory views exist (i.e. every
            //memory view should either be visible, docked and hidden, or killed). If there are any memory views in our heirarchy,
            //we will add them to the lower pane after the watch view.

            ClearContents();

            //Arranging the subwindows cannot be done consistently between the different docking window styles.
            if (this.DocumentStyle == DocumentStyle.SystemMdi)
            {
                //If the layout is "SystemMdi", the docking system is completely bypassed, and the resulting layout is pretty bad.
                Form ParentForm = (Form)this.Parent;
                ParentForm.IsMdiContainer              = true;
                RegistersView.MdiParent                = OutputView.MdiParent = WatchView.MdiParent = DataCacheView.MdiParent =
                    InstructionCacheView.MdiParent     = UnifiedCacheView.MdiParent = StackView.MdiParent =
                        PluginUIControlsView.MdiParent = CodeView.MdiParent = (Form)this.Parent;
                RegistersView.Show();
                OutputView.Show();
                WatchView.Show();
                DataCacheView.Show();
                InstructionCacheView.Show();
                UnifiedCacheView.Show();
                StackView.Show();
                PluginUIControlsView.Show();
                CodeView.Show();
            }
            else
            {
                //If the layout is "DockingMdi", "DockingSdi" or "DockingWindow", we can construct the classic ARMSim interface.
                if (DocumentStyle == DocumentStyle.DockingMdi)
                {
                    Form ParentForm = (Form)this.Parent;
                    ParentForm.IsMdiContainer = true;
                }
                //Put registers on the left
                RegistersView.Show(this, DockState.DockLeft);
                CodeView.Show(this, DockState.Document);

                //Put output and watch views in a tabbed pane on the bottom.
                OutputView.Show(CodeView.Pane, DockAlignment.Bottom, 0.25);
                WatchView.Show(OutputView.Pane, null);

                //Add any memory views after the watch view (sorted by index)
                ICollection <MemoryViewWrapper> allMV = AllMemoryViews;
                if (allMV.Count > 0)
                {
                    MemoryViewWrapper[] SortedMV = allMV.ToArray();
                    Array.Sort(SortedMV, delegate(MemoryViewWrapper x, MemoryViewWrapper y) { return(x.Index - y.Index); });
                    foreach (MemoryViewWrapper mv in SortedMV)
                    {
                        mv.Show(OutputView.Pane, null);
                    }
                }

                OutputView.Pane.ActiveContent = OutputView;


                //Put the PluginUI, followed by the three cache displays, in a tabbed
                //pane at the top of the code window and hide all three of them.
                //(They can be enabled manually through the menus).


                PluginUIControlsView.Show(CodeView.Pane, DockAlignment.Top, 0.25);

                //Put the three cache views on the top and hide.
                DataCacheView.Show(PluginUIControlsView.Pane, null);
                InstructionCacheView.Show(PluginUIControlsView.Pane, null);
                UnifiedCacheView.Show(PluginUIControlsView.Pane, null);

                PluginUIControlsView.Hide();
                DataCacheView.Hide();
                InstructionCacheView.Hide();
                UnifiedCacheView.Hide();

                //Put the stack view in a hidden window on the right
                StackView.Show(this, DockState.DockRightAutoHide);
            }
        }