本文整理汇总了C#中XmlDbRow.GetInt方法的典型用法代码示例。如果您正苦于以下问题:C# XmlDbRow.GetInt方法的具体用法?C# XmlDbRow.GetInt怎么用?C# XmlDbRow.GetInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XmlDbRow
的用法示例。
在下文中一共展示了XmlDbRow.GetInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Parse
public override void Parse(XmlDbRow row)
{
base.Parse(row);
mMinIntensityDuration = row.GetFloat("MinIntensityDuration", 0);
mTransitionTime.First = row.GetFloat("MinTransitionTime", 0);
mTransitionTime.Second = row.GetFloat("MaxTransitionTime", 0);
mIntensityWeights = new List<int>();
mIntensityWeights.Add(row.GetInt("LightWeight", 0));
mIntensityWeights.Add(row.GetInt("ModerateWeight", 0));
mIntensityWeights.Add(row.GetInt("HeavyWeight", 0));
mIntensityChangeWeights = new List<int>();
foreach (string strValue in row.GetStringList("NumIntensityChangeWeights", ','))
{
float value;
if (float.TryParse(strValue, out value))
{
mIntensityChangeWeights.Add((int)value);
}
else
{
mIntensityChangeWeights.Add(0);
}
}
}
示例2: MoodletSymptom
public MoodletSymptom(XmlDbRow row)
: base(row)
{
if (BooterLogger.Exists(row, "BuffName", Guid))
{
if (!row.TryGetEnum<BuffNames>("BuffName", out mBuff, BuffNames.Undefined))
{
mBuff = (BuffNames)row.GetUlong("BuffName", 0);
if (mBuff == 0)
{
mBuff = (BuffNames)ResourceUtils.HashString64(row.GetString("BuffName"));
}
if (!BuffManager.BuffDictionary.ContainsKey((ulong)mBuff))
{
BooterLogger.AddError(Guid + " Unknown BuffName: " + row.GetString("BuffName"));
}
}
}
mMoodValue = row.GetInt("MoodValue", 0);
mDuration = row.GetInt("Duration", 30);
if (mDuration <= 0)
{
mDuration = -1;
}
mOrigin = (Origin)row.GetUlong("Origin", 0);
if (mOrigin == Origin.None)
{
mOrigin = (Origin)ResourceUtils.HashString64(row.GetString("Origin"));
}
}
示例3: Parse
public override bool Parse(XmlDbRow row, string prefix, bool firstPass, ref string error)
{
mDelta = row.GetInt(prefix + "PropagateDelta", mDelta);
if (row.Exists(prefix + "PropagateFriend"))
{
if (!ParserFunctions.TryParseEnum<WhichSim>(row.GetString(prefix + "PropagateFriend"), out mFriendSim, WhichSim.Actor))
{
error = prefix + "PropagateFriend unknown";
return false;
}
}
SimScenarioFilter.RelationshipLevel relationLevel;
if (ParserFunctions.TryParseEnum<SimScenarioFilter.RelationshipLevel>(row.GetString(prefix + "PropagateRelationshipGate"), out relationLevel, SimScenarioFilter.RelationshipLevel.Neutral))
{
mRelationshipGate = (int)relationLevel;
}
else
{
mRelationshipGate = row.GetInt(prefix + "PropagateRelationshipGate", mRelationshipGate);
}
return base.Parse(row, prefix, firstPass, ref error);
}
示例4: ScoringStage
public ScoringStage(XmlDbRow row)
: base(row)
{
if (BooterLogger.Exists(row, "Scoring", Name))
{
mScoring = row.GetString("Scoring");
if (string.IsNullOrEmpty(mScoring))
{
BooterLogger.AddError(Name + " Empty Scoring");
}
else if (ScoringLookup.GetScoring(mScoring) == null)
{
BooterLogger.AddError(Name + " Invalid Scoring: " + mScoring);
}
}
if (row.GetString("Minimum") == "Strength")
{
mMinimum = int.MinValue;
}
else
{
mMinimum = row.GetInt("Minimum", int.MinValue);
}
mMinMutation = row.GetString("MinMutation");
}
示例5: TimedStage
public TimedStage(XmlDbRow row)
: base(row)
{
if (BooterLogger.Exists(row, "MinDuration", Name))
{
mMinDuration = row.GetInt("MinDuration", 0);
}
mMinMutation = row.GetString("MinMutation");
if (BooterLogger.Exists(row, "MaxDuration", Name))
{
mMaxDuration = row.GetInt("MaxDuration", 0);
}
mMaxMutation = row.GetString("MaxMutation");
}
示例6: FirestarterSymptom
public FirestarterSymptom(XmlDbRow row)
: base(row)
{
if (BooterLogger.Exists(row, "Maximum", Guid))
{
mMaximum = row.GetInt("Maximum");
}
}
示例7: Parse
public virtual void Parse(XmlDbRow row)
{
mWeight = row.GetInt("Weight", 0);
mLength.First = row.GetFloat("MinLength", 0);
mLength.Second = row.GetFloat("MaxLength", 0);
mTemp.First = row.GetFloat("MinTemp", 0);
mTemp.Second = row.GetFloat("MaxTemp", 0);
}
示例8: IncrementalStage
public IncrementalStage(XmlDbRow row)
: base(row)
{
if (BooterLogger.Exists(row, "Maximum", Name))
{
mMaximum = row.GetInt("Maximum", 0);
}
mMaxMutation = row.GetString("MaxMutation");
}
示例9: Perform
protected override void Perform(BooterHelper.BootFile file, XmlDbRow row)
{
Homemaker.StipendValue key;
if (!ParserFunctions.TryParseEnum<Homemaker.StipendValue>(row.GetString("Key"), out key, Homemaker.StipendValue.Undefined))
{
BooterLogger.AddError("Stipend Key Missing: " + row.GetString("Key"));
return;
}
int maximum = row.GetInt("Maximum");
int factor = row.GetInt("Factor");
bool positive = row.GetBool("Positive");
sData.Add(key, new Data (maximum, factor, positive));
BooterLogger.AddTrace(" Stipend Loaded: " + row.GetString("Key"));
}
示例10: MotiveSymptom
public MotiveSymptom(XmlDbRow row)
: base(row)
{
if (BooterLogger.Exists(row, "Motive", Guid))
{
if (!row.TryGetEnum<CommodityKind>("Motive", out mMotive, CommodityKind.None))
{
BooterLogger.AddError(" Unknown Motive: " + row.GetString("Motive"));
}
}
if (BooterLogger.Exists(row, "DeltaValue", Guid))
{
mDeltaValue = row.GetInt("DeltaValue", 0);
}
if (BooterLogger.Exists(row, "LowerBound", Guid))
{
mLowerBound = row.GetInt("LowerBound", 0);
}
}
示例11: Perform
protected override void Perform(BooterHelper.BootFile file, XmlDbRow row)
{
TagStaticData data = new TagStaticData();
string name = row.GetString("TypeName");
string icon = row.GetString("Icon");
string color = row.GetString("ColorHEX");
bool business = row.GetBool("isBusinessType");
int openHour = row.GetInt("OpenHour");
int closeHour = row.GetInt("CloseHour");
try
{
data.SetGUID(name);
}
catch (ArgumentException e)
{
Common.Exception("", e);
}
if (!data.Valid)
{
return;
}
data.name = name;
data.icon = icon;
data.isBusinessType = business;
data.openHour = openHour;
data.closeHour = closeHour;
data.SetColorHex(color);
if (!Tagger.staticData.ContainsKey(data.GUID))
{
Tagger.staticData.Add(data.GUID, data);
EnumInjection.InjectEnums<CommercialLotSubType>(new string[] { name }, new object[] { data.GUID }, false);
EnumInjection.InjectEnums<Lot.MetaAutonomyType>(new string[] { name }, new object[] { data.GUID }, false);
EnumInjection.InjectEnums<MetaAutonomyVenueType>(new string[] { name }, new object[] { data.GUID }, false);
}
}
示例12: CareerTransfer
public CareerTransfer(XmlDbRow row, Dictionary<string, Dictionary<int, CareerLevel>> careerLevels, string careerName)
: base(row, careerLevels, null)
{
mStringKey = "NRaas.CareerTransfer:" + row.GetString("EventType");
if (row.Exists("TransferCareer"))
{
string guid = row.GetString("TransferCareer");
ParserFunctions.TryParseEnum<OccupationNames>(guid, out mTransferCareer, OccupationNames.Undefined);
if (mTransferCareer == OccupationNames.Undefined)
{
mTransferCareer = unchecked((OccupationNames)ResourceUtils.HashString64(guid));
}
}
if (row.Exists("TransferBranch"))
{
mTransferBranch = row.GetString("TransferBranch");
}
if (row.Exists("TransferLevelAbsolute"))
{
mAbsoluteLevel = row.GetInt("TransferLevelAbsolute");
}
if (row.Exists("TransferLevelRelative"))
{
string relativeLevel = row.GetString("TransferLevelRelative");
List<string> relativeLevels = new List<string>(relativeLevel.Split(new char[] { ':' }));
mRelativeLevelMin = int.Parse(relativeLevels[0]);
if (relativeLevels.Count > 1)
{
mRelativeLevelMax = int.Parse(relativeLevels[1]);
}
else
{
if (mRelativeLevelMin > 0)
{
mRelativeLevelMax = mRelativeLevelMin;
mRelativeLevelMin = 0;
}
}
}
}
示例13: FindSimSymptom
public FindSimSymptom(XmlDbRow row)
: base(row)
{
mScoring = row.GetString("Scoring");
if (!string.IsNullOrEmpty(mScoring))
{
if (ScoringLookup.GetScoring(mScoring) == null)
{
BooterLogger.AddError(Guid + " Invalid Scoring: " + mScoring);
}
mMinimum = row.GetInt("Minimum", 0);
}
mAllowActive = row.GetBool("AllowActive");
}
示例14: Parse
public override bool Parse(XmlDbRow row)
{
mIndex = row.GetInt("Index", -1);
if (mIndex < 0)
{
BooterLogger.AddError("Invalid Index for " + mParentType + "." + mFieldName);
return false;
}
return base.Parse(row);
}
示例15: Parse
public override bool Parse(XmlDbRow row, ref string error)
{
mName = new WeightOption.NameOption(row);
mChance = row.GetInt("Chance", mChance);
mAcceptanceScoring = row.GetString("AcceptanceScoring");
mSuccess = new WeightScenarioHelper(Origin.None);
if (!mSuccess.Parse(row, Manager, this, "Success", ref error))
{
return false;
}
mFailure = new WeightScenarioHelper(Origin.FromRomanticBetrayal);
if (!mFailure.Parse(row, Manager, this, "Failure", ref error))
{
return false;
}
return base.Parse(row, ref error);
}