Example #1
0
        private ViewHostPanelInfo findPanel(LayoutElementName elementName)
        {
            if (elementName.ViewType == ViewType.Window || elementName.LocationHint == ViewLocations.Floating)
            {
                ViewHostPanelInfo panel = new ViewHostPanelInfo()
                {
                    ElementName = elementName
                };
                openPanels.Add(panel);
                return(panel);
            }

            //Try to find an existing panel
            foreach (var panel in openPanels)
            {
                if (panel.ElementName == elementName)
                {
                    return(panel);
                }
            }
            ViewHostPanelInfo newPanel = new ViewHostPanelInfo()
            {
                ElementName = elementName
            };

            openPanels.Add(newPanel);
            return(newPanel);
        }
Example #2
0
        public void requestOpen(View view, AnomalousMvcContext context)
        {
            ViewHostPanelInfo panel = findPanel(view.ElementName);

            if (panel != null)
            {
                panel.Queued        = view;
                panel.QueuedContext = context;
            }
        }