当前位置: 首页>>代码示例>>C#>>正文


C# XmlElement.GetAttributeInt方法代码示例

本文整理汇总了C#中System.Xml.XmlElement.GetAttributeInt方法的典型用法代码示例。如果您正苦于以下问题:C# XmlElement.GetAttributeInt方法的具体用法?C# XmlElement.GetAttributeInt怎么用?C# XmlElement.GetAttributeInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Xml.XmlElement的用法示例。


在下文中一共展示了XmlElement.GetAttributeInt方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GuardSpawner

 public GuardSpawner(Model m, XmlElement e)
     : base(m, e)
 {
     NumGuards = e.GetAttributeInt("numguards", 2);
     MaxGuards = e.GetAttributeInt("maxguards", 2);
     RespawnRate = e.GetAttributeFloat("respawnrate", 0);
 }
开发者ID:chrisforbes,项目名称:aliengame,代码行数:7,代码来源:GuardSpawner.cs

示例2: Actor

 protected Actor(Model m, XmlElement e)
 {
     this.m = m;
     Position = new Point(e.GetAttributeInt("x", 0),
                          e.GetAttributeInt("y", 0));
     Direction = e.GetAttributeInt("dir", 0);
     Name = e.GetAttribute("name");
 }
开发者ID:chrisforbes,项目名称:aliengame,代码行数:8,代码来源:Actor.cs

示例3: Brush

        public Brush(XmlElement e)
        {
            Bounds = Rectangle.FromLTRB(
                e.GetAttributeInt("left", 0),
                e.GetAttributeInt("top", 0),
                e.GetAttributeInt("right", 0),
                e.GetAttributeInt("bottom", 0));

            Content = e.GetAttributeInt("content", 0);
        }
开发者ID:chrisforbes,项目名称:aliengame,代码行数:10,代码来源:Brush.cs

示例4: Load

// メソッド

		public void Load(HatomaruManager manager, XmlElement contentElement){
			string path = contentElement.GetAttribute(HatomaruReputation.UriAttributeName);
			Path = new AbsPath(path);
			Count = contentElement.GetAttributeInt(HatomaruReputation.CountAttributeName);
			Description = contentElement[HatomaruReputation.DescriptionElementName];

			Title = manager.GetResponseTitle(Path);

		}
开发者ID:bakera,项目名称:Hatomaru.dll,代码行数:11,代码来源:reputationContent.cs

示例5: LoadXml

// パブリックメソッド

		public void LoadXml(XmlElement e){
			Name = e.GetAttributeValue(ExtInfoName);
			ContentType = e.GetAttributeValue(ExtInfoType);
			Charset = e.GetAttributeValue(ExtInfoCharset);
			Description = e.InnerText;

			string tempDisposition = e.GetAttributeValue(ExtInfoDisposition);
			if(!string.IsNullOrEmpty(tempDisposition)) Disposition = true;

			int maxAgeDays = e.GetAttributeInt(ExtInfoMaxAge);
			MaxAge = new TimeSpan(maxAgeDays, 0, 0, 0);
		}
开发者ID:bakera,项目名称:Hatomaru.dll,代码行数:14,代码来源:extinfo.cs

示例6: LoadTradeSettings

        public void LoadTradeSettings(XmlElement node)
        {
            if (node == null) return;
            var tradeAuto = node.GetAttributeBool("tradeAuto");
            if (tradeAuto.HasValue)
                TradeAuto = tradeAuto.Value;

            MaxLeverage = node.GetAttributeDouble("maxLeverage");
            PercentLeverage = node.GetAttributeInt("percentLeverage") ?? 100;
            HedgingOrdersEnabled = node.GetAttributeBool("hedgingOrdersEnabled");
            FixedVolume = node.GetAttributeInt("fixedVolume");
            if (node.Attributes["volumeRound"] != null)
            {
                VolumeRoundType volRnd;
                VolumeRound = Enum.TryParse(node.Attributes["volumeRound"].Value, out volRnd)
                                  ? volRnd
                                  : (VolumeRoundType?)null;
            }
            MinVolume = node.GetAttributeInt("minVolume");
            MaxVolume = node.GetAttributeInt("maxVolume");
            StepVolume = node.GetAttributeInt("stepVolume");
            TargetAccount = node.GetAttributeInt("targetAccount");
        }
开发者ID:johnmensen,项目名称:TradeSharp,代码行数:23,代码来源:AutoTradeSettings.cs

示例7: Door

 public Door(XmlElement e)
 {
     Position = new Point(e.GetAttributeInt("x", 0), e.GetAttributeInt("y", 0));
     Kind = e.GetAttributeInt("kind", 0);
     State = e.GetAttributeInt("state", 0);
 }
开发者ID:chrisforbes,项目名称:aliengame,代码行数:6,代码来源:Door.cs


注:本文中的System.Xml.XmlElement.GetAttributeInt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。