예제 #1
0
 private void Parse()
 {
     try {
         var lexer = new ScnNodeLexer(Source, "track");
         if (lexer.Nodes != null)
         {
             foreach (var node in lexer.Nodes)
             {
                 Add(new ScnTrack(SourcePath, node));
             }
         }
     } catch (Exception x) {
         System.Windows.Forms.MessageBox.Show(x.Message + "\r\n\r\n" + x.StackTrace);
     }
 }
예제 #2
0
        public static ScnMemCellCollection Parse(ref string text, List <string> param_list, V3D rotation)
        {
            var cells = new ScnMemCellCollection();

            try {
                var lexer = new ScnNodeLexer(text, "memcell");
                if (lexer.Nodes != null)
                {
                    foreach (var node in lexer.Nodes)
                    {
                        var m = new ScnMemCell(node, param_list, rotation);
                        cells.Add(m.Name, m);
                        log.Trace("memcell, type {0}, name {1} params {2}", m.Type, m.Name, param_list);
                    }
                }
            }
            catch (Exception x) {
                log.Error(x.Message + "\r\n" + x.StackTrace + "\r\n");
                //System.Windows.Forms.MessageBox.Show(x.Message + "\r\n\r\n" + x.StackTrace);
            }
            return(cells);
        }