示例#1
0
 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
0
 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
0
        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
0
// メソッド

		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
0
// パブリックメソッド

		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);
		}
        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
0
 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);
 }