本文整理匯總了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);
}
示例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");
}
示例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);
}
示例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);
}
示例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);
}
示例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");
}
示例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);
}