예제 #1
0
        public void Populate(Hashtable values, string tagFormat)
        {
            StringTheory phrase = new StringTheory();

            foreach (string str in values.Keys)
            {
                phrase.Renew(tagFormat);
                phrase.Replace("*", str);
                this.Replace(phrase, values[str]);
            }
        }
예제 #2
0
파일: Item.cs 프로젝트: built/BoxBoy
 public string getXml()
 {
     StringTheory theory = new StringTheory("<%islandName%>%body%</%islandName%>\n");
     StringTheory val = new StringTheory();
     StringTheory theory3 = new StringTheory();
     foreach (string str in this.getFieldNames())
     {
         val.Renew("    <%fieldName%>%fieldValue%</%fieldName%>\n");
         val.Replace("%fieldName%", str.ToLower());
         val.Replace("%fieldValue%", ((Field)this[str]).getValue());
         theory3.Append(val);
     }
     theory.Replace("%islandName%", this.StreamName.ToLower());
     theory.Replace("%body%", theory3);
     return theory.ToString();
 }
예제 #3
0
 public void Populate(Hashtable values, string tagFormat)
 {
     StringTheory phrase = new StringTheory();
     foreach (string str in values.Keys)
     {
         phrase.Renew(tagFormat);
         phrase.Replace("*", str);
         this.Replace(phrase, values[str]);
     }
 }