public async Task <List <UiNode> > GetUINodesForPanel(string panelId)
        {
            return(await Task.Run(() =>
            {
                if (engine == null)
                {
                    return null;
                }

                return engine.GetUINodesForPanel(panelId);
            }));
        }
Exemple #2
0
        public IActionResult List()
        {
            if (engine == null)
            {
                return(BadRequest());
            }

            ViewBag.showMainPanel = engine.GetUINodesForPanel(MAIN_PANEL_ID).Any();

            List <PanelNode> allPanels      = engine.GetPanels();
            List <PanelNode> notEmptyPanels = new List <PanelNode>();

            foreach (var panel in allPanels)
            {
                if (engine.GetUINodesForPanel(panel.Id).Any())
                {
                    notEmptyPanels.Add(panel);
                }
            }

            return(View(notEmptyPanels));
        }