Exemple #1
0
        private IContainer DoInclude(Include tag, IContainer parent, ValueStack.ValueStack stack)
        {
            var dal = ApplicationContext.Context.DAL;

            object component = CreateObject(stack, dal.GetScreenByName(tag.File));
            if (!(component is Component))
                throw new Exception("Only Component container is allowed to be included");

            object[] controls = ((IContainer)component).Controls;
            foreach (object child in controls)
                parent.AddChild(child);
            return parent;
        }
Exemple #2
0
 private void DoInclude(Include tag, ValueStack stack, System.Xml.XmlNode node, System.Xml.XmlWriter w)
 {
     String fName = String.Format(@"{0}\{1}", rootFolder, tag.File);
     using (System.IO.Stream input = System.IO.File.OpenRead(fName))
     {
         new Translator(rootFolder).Translate(stack, input, w);
     }
 }