Ejemplo n.º 1
0
        VBAStaticEngine(string script)
        {
            m_script = script;

            //vbaobject host
            IVBAObjectHost i = new VBALogHost();

            m_vbaobjhosts.Add(i.Name, i);
            i = new VBAIEHost();
            m_vbaobjhosts.Add(i.Name, i);
            i = new VBATaskHost();
            m_vbaobjhosts.Add(i.Name, i);
            i = new VBAUtilityHost();
            m_vbaobjhosts.Add(i.Name, i);
            i = new VBAHtmlHost();
            m_vbaobjhosts.Add(i.Name, i);

            //vbaobjstop
            if (m_vbaobjstop.Count == 0)
            {
                IVBAObject o = new VBALogStop();
                m_vbaobjstop.Add(o.Name, o);
                o = new VBAIEStop();
                m_vbaobjstop.Add(o.Name, o);
                o = new VBATaskStop();
                m_vbaobjstop.Add(o.Name, o);
                o = new VBAUtilityStop();
                m_vbaobjstop.Add(o.Name, o);
                o = new VBAHtmlStop();
                m_vbaobjstop.Add(o.Name, o);
            }

            m_engine.BeforeCompile += new EventHandler(VBAStaticEngine_BeforeComplie);

            Complie();
        }
        VBAStaticEngine(string script)
        {
            m_script = script;

            //vbaobject host
            IVBAObjectHost i = new VBALogHost();
            m_vbaobjhosts.Add(i.Name, i);
            i = new VBAIEHost();
            m_vbaobjhosts.Add(i.Name, i);
            i = new VBATaskHost();
            m_vbaobjhosts.Add(i.Name, i);
            i = new VBAUtilityHost();
            m_vbaobjhosts.Add(i.Name, i);
            i = new VBAHtmlHost();
            m_vbaobjhosts.Add(i.Name, i);

            //vbaobjstop
            if (m_vbaobjstop.Count == 0)
            {                
                IVBAObject o = new VBALogStop();
                m_vbaobjstop.Add(o.Name, o);
                o = new VBAIEStop();
                m_vbaobjstop.Add(o.Name, o);
                o = new VBATaskStop();
                m_vbaobjstop.Add(o.Name, o);
                o = new VBAUtilityStop();
                m_vbaobjstop.Add(o.Name, o);
                o = new VBAHtmlStop();
                m_vbaobjstop.Add(o.Name, o);
            }

            m_engine.BeforeCompile += new EventHandler(VBAStaticEngine_BeforeComplie);

            Complie();
        }