Example #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="ipWML"></param>
 /// <param name="sourceDataTable"></param>
 /// <param name="templetFileName"></param>
 public TDB2WML(TParseWMLitem ipWML, DataTable sourceDataTable, string templetFileName)
 {
     data_table = sourceDataTable;
     iPitem     = ipWML;
     templet_s  = new TempletFile_Struct(templetFileName);
 }
Example #2
0
        protected void ADD_WXSect(int recno, TempletFile_Struct templet_s, StreamWriter sw, DataRow aDR)
        {
            if (recno > 1)
            {
                templet_s.posi = templet_s.SectBegin; sw.Write("<wx:sect>");
            }
            bool   procTag     = false;
            bool   procField   = false;
            bool   procPictTag = false;
            string tempfield   = "";
            string temptag     = "";

            while (templet_s.posi < templet_s.lines.Length)
            {
                char ch = templet_s.lines[templet_s.posi];
                if (!procField && ch != '|' && ch != '#' && !(procPictTag && iPitem.pictflag))
                {
                    sw.Write(ch.ToString());
                }
                switch (ch)
                {
                case '<': temptag = ""; procTag = true; break;

                case '>': procTag = false;
                    if (temptag == "/wx:sect")
                    {
                        return;
                    }
                    if (temptag == "w:pict" && iPitem.pictflag)
                    {
                        procPictTag = true;
                    }
                    if (temptag == "/w:pict" && iPitem.pictflag)
                    {
                        procPictTag = false; sw.Write(iPitem.getPICTCODE()); sw.Write("</w:pict>");
                    }
                    break;

                case '#': if (!procTag)
                    {
                        procField = true; tempfield = "";
                    }
                    break;

                case '|': if (!procTag)
                    {
                        procField = false; sw.Write(iPitem.getFielddata(tempfield, "28", aDR));
                    }
                    break;

                default:
                    if (!procTag && procField)
                    {
                        tempfield += ch;
                    }
                    if (procTag)
                    {
                        temptag += ch;
                    }
                    break;
                }
                templet_s.posi++;
            }
        }
Example #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="ipWML"></param>
 /// <param name="sourceDataTable"></param>
 /// <param name="templetFileName"></param>
 public TDB2WMLforTowPage(TParseWMLitem ipWML, DataTable sourceDataTable, string templetFileName0, string tempfilename1) : base(ipWML, sourceDataTable, templetFileName0)
 {
     templet_s001 = new TempletFile_Struct(tempfilename1);
     templet_s001.ReadTemplet2Lines();//
 }