コード例 #1
0
        public override void LoadConfig(FXmlNode config)
        {
            base.LoadConfig(config);
            // Load type
            string type = config[PTY_TYPE];

            if (!RString.IsEmpty(type))
            {
                _dataType = REnum.ToValue <EAopParameterType>(type);
            }
            // Load component
            if (config.HasNode())
            {
                FXmlNode node = config.Nodes[0];
                if (node.IsName(XAopComponent.TAG))
                {
                    _dataType = EAopParameterType.Component;
                }
            }
            // Load value
            if (_dataType == EAopParameterType.String)
            {
                _dataValue = config.Text;
            }
        }
コード例 #2
0
ファイル: FSourceBuilder.cs プロジェクト: whztt07/MoCross
 private void BuildNode(FXmlNode config, string path)
 {
     // Build child
     if (config.HasNode)
     {
         foreach (FXmlNode node in config.Nodes)
         {
             BuildNode(node, path + config["name"]);
         }
     }
     // Build Parent
     if (config.IsName("Folder"))
     {
         string clsName = MakeClassName(path + config["name"]);
         _source.AppendLine("   public class " + clsName + " {");
         BuildNodeSource(config, path);
         _source.AppendLine("   }");
     }
 }