示例#1
0
        void LayoutSerializationCallback(object sender, LayoutSerializationCallbackEventArgs e)
        {
            switch (e.Model)
            {
            case LayoutAnchorable la:
                e.Content = ToolPanes.FirstOrDefault(p => p.ContentId == la.ContentId);
                e.Cancel  = e.Content == null;
                la.CanDockAsTabbedDocument = false;
                if (!e.Cancel)
                {
                    e.Cancel = ((ToolPaneModel)e.Content).IsVisible;
                    ((ToolPaneModel)e.Content).IsVisible = true;
                }
                break;

            default:
                e.Cancel = true;
                break;
            }
        }
示例#2
0
        internal void LayoutSerializationCallback(object sender, LayoutSerializationCallbackEventArgs e)
        {
            switch (e.Model)
            {
            case LayoutAnchorable la:
                switch (la.ContentId)
                {
                case AssemblyListPaneModel.PaneContentId:
                    e.Content = AssemblyListPaneModel.Instance;
                    break;

                case SearchPaneModel.PaneContentId:
                    e.Content = SearchPaneModel.Instance;
                    break;

                case AnalyzerPaneModel.PaneContentId:
                    e.Content = AnalyzerPaneModel.Instance;
                    break;

#if DEBUG
                case DebugStepsPaneModel.PaneContentId:
                    e.Content = DebugStepsPaneModel.Instance;
                    break;
#endif
                default:
                    e.Cancel = true;
                    break;
                }
                if (!e.Cancel)
                {
                    ToolPanes.Add((ToolPaneModel)e.Content);
                }
                break;

            default:
                e.Cancel = true;
                break;
            }
        }
示例#3
0
 internal void EnsureUnclosablePanes()
 {
     ToolPanes.Add(AssemblyListPaneModel.Instance);
 }