Пример #1
0
        public void Initialize(IXFAObject xfaObject, XDPFile xdp, XDocument form)
        {
            _logger.Debug("TemplateDOM Initialize!");

            _xdp  = xdp;
            _form = form;

            ResolveExternalReferences();

            xfaObject.template = new DynamicTemplateXml(_formResolved.ToString());
        }
Пример #2
0
        public Byte[] ProcessForm(XDPFile xdp, XDocument form)
        {
            _xdp  = xdp;
            _form = form;

            Stopwatch stopwatch = new Stopwatch();

            stopwatch.Start();

            _logger.Debug("Begin ProcessForm...");

            //TODO: Not sure the order in which to call these...
            _logger.DebugFormat("End ProcessForm, [{0} ms]", stopwatch.ElapsedMilliseconds);

            return(new byte[32]);
        }
Пример #3
0
        public void Test(XDPFile xdp, XDocument form)
        {
            _configDom.Initialize(_form);

            _connectionSetDom.Initialize(_form);

            _connectionDataDom.Initialize(_form);

            _xmlDataDom.Initialize(_formData);

            //xfa.record
            _xfaDataDom.Initialize(_xfaObject, _formData);

            //xfa.template
            _templateDom.Initialize(_xfaObject, _xdp, _form);

            _dataDescriptionDom.Initialize(_form);

            //xfa.form
            _formDom.Initialize(_form);

            _layoutDom.Initialize(_form);

            _engine.AddHostObject("xfa", _xfaObject);

            var a1 = _engine.Evaluate("xfa.record.CurrentRisk.Options.nodes.length");
            var a2 = _engine.Evaluate("xfa.record.CurrentRisk.Options.nodes.item(0)");
            var a3 = _engine.Evaluate("xfa.record.CurrentRisk.Options.nodes.item(0).OptionId.value");

            _engine.Execute("xfa.record.CurrentRisk.Options.nodes.item(0).OptionId.value=99");
            var a5 = _engine.Evaluate("xfa.record.CurrentRisk.Options.nodes.item(0).OptionId.value");
            var a6 = _engine.Evaluate("xfa.record.CurrentRisk.Options.nodes.item(0).OptionDetailECP.OptionDetailECPId.value");

            if (_xdp.Filename.Contains("Sample_001"))
            {
                var x = _xfaObject.template.GetDynamicMemberNames();

                var b1 = _engine.Evaluate("xfa.template.form1.minH");
                var b2 = _engine.Evaluate("xfa.template.form1.layout");
            }
        }