Пример #1
0
 private static void ParseBrushes(ParseContext cxt, XmlDocument dom)
 {
     foreach (XmlNode brushes in dom.GetElementsByTagName("brushes"))
     {
         if (brushes is System.Xml.XmlComment)
             continue;
         foreach (XmlNode brush in brushes.ChildNodes)
         {
             if (brush is System.Xml.XmlComment)
                 continue;
             String tag = brush.Name;
             if (cxt.HasDefine(tag))
             {
                 throw new Exception(String.Format("��ˢ�ڵ�{0}��Ԥ����{1}�Ѵ���!", brush.OuterXml, tag));
             }
             cxt.AddDefine(tag, cxt.ParseToBrush(brush));
         }
     }
 }
Пример #2
0
 private static void ParsePens(ParseContext cxt, XmlDocument dom)
 {
     foreach (XmlNode pens in dom.GetElementsByTagName("pens"))
     {
         if (pens is System.Xml.XmlComment)
             continue;
         foreach (XmlNode pen in pens.ChildNodes)
         {
             if (pen is System.Xml.XmlComment)
                 continue;
             String tag = pen.Name;
             if (cxt.HasDefine(tag))
             {
                 throw new Exception(String.Format("���ʽڵ�{0}��Ԥ����{1}�Ѵ���!", pen.OuterXml, tag));
             }
             cxt.AddDefine(tag, cxt.ParseToPen(pen));
         }
     }
 }
Пример #3
0
 private static void ParseFonts(ParseContext cxt, XmlDocument dom)
 {
     foreach (XmlNode fonts in dom.GetElementsByTagName("fonts"))
     {
         if (fonts is System.Xml.XmlComment)
             continue;
         foreach (XmlNode font in fonts.ChildNodes)
         {
             if (font is System.Xml.XmlComment)
                 continue;
             String tag = font.Name;
             if (cxt.HasDefine(tag))
             {
                 throw new Exception(String.Format("����{0}��Ԥ����{1}�Ѵ���!", font.OuterXml, tag));
             }
             cxt.AddDefine(tag, cxt.ParseToFont(font));
         }
     }
 }