Exemplo n.º 1
0
        protected FormManager OnlyQL(string rawQL, ElementManagerController elementManagerController, ref List <string> errors)
        {
            FormNode formNode = QLParserHelper.Parse(rawQL);

            if (!Analyser.Analyse(formNode))
            {
                errors.AddRange(Analyser.GetErrors());
                return(null);
            }

            return(ElementManagerFactory.CreateForm(formNode, elementManagerController));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Handles QL-language input
        /// </summary>
        /// <param name="rawQL">Raw QL-language string</param>
        public virtual void HandleQL(string rawQL)
        {
            FormNode node = QLParserHelper.Parse(rawQL);

            if (!Analyser.Analyse(node))
            {
                ShowError(Analyser.GetErrors().ToArray());
                return;
            }

            FormManager formManager = ElementManagerFactory.CreateForm(node, this);

            DisplayForm(formManager.Text, formManager);
            //IEnumerable<ElementManager> widgets = ElementManagerFactory.CreateWidgets(node, this);
            //DisplayForm(node.FormName, widgets.ToArray());
        }
Exemplo n.º 3
0
        private FormManager QLQLS(string rawQl, string rawQls, ElementManagerController elementManagerController, ref List <string> errors)
        {
            FormNode formNode = QLParserHelper.Parse(rawQl);
            QLSNode  qlsNode  = QLSParserHelper.Parse(rawQls);

            if (!Analyser.Analyse(formNode, qlsNode))
            {
                errors.AddRange(Analyser.GetErrors());
                return(null);
            }

            FormManager result = ElementManagerFactory.CreateForm(formNode, elementManagerController);

            result = ElementManagerFactory.ApplyQLS(result, qlsNode, elementManagerController, ref errors);
            return(result);
        }