本文整理汇总了C#中XmlDbRow类的典型用法代码示例。如果您正苦于以下问题:C# XmlDbRow类的具体用法?C# XmlDbRow怎么用?C# XmlDbRow使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XmlDbRow类属于命名空间,在下文中一共展示了XmlDbRow类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Parse
public override bool Parse(XmlDbRow row, ref string error)
{
mName = new WeightOption.NameOption(row);
mInjuredStory = row.GetString("InjuredStory");
if (!ParserFunctions.TryParseEnum<SimDescription.DeathType>(row.GetString("Type"), out mType, SimDescription.DeathType.None))
{
error = "Type not valid";
return false;
}
if (mType == SimDescription.DeathType.None)
{
error = "Type cannot be None";
return false;
}
mSuccess = new WeightScenarioHelper(Origin.FromWatchingSimSuffer);
if (!mSuccess.Parse(row, Manager, this, "Success", ref error))
{
return false;
}
return base.Parse(row, ref error);
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:26,代码来源:SendToHospitalScenario.cs
示例2: Perform
protected override void Perform(BooterHelper.BootFile file, XmlDbRow row)
{
BooterHelper.DataBootFile dataFile = file as BooterHelper.DataBootFile;
if (dataFile == null) return;
ParseSkillData(dataFile.Data, row, true);
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:7,代码来源:SkillBooter.cs
示例3: Perform
protected override void Perform(BooterHelper.BootFile file, XmlDbRow row)
{
WeatherProfile profile = GetProfile(row);
if (profile == null) return;
profile.ParseTemperature(row);
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:7,代码来源:TemperatureBooter.cs
示例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");
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:27,代码来源:ScoringStage.cs
示例5: 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);
}
}
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:26,代码来源:PercipitationData.cs
示例6: 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");
try
{
data.SetGUID(name);
}
catch (ArgumentException e)
{
Common.Exception("", e);
}
if (!data.Valid)
{
return;
}
data.name = name;
data.icon = icon;
data.isBusinessType = business;
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);
}
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:34,代码来源:LotTypeBooter.cs
示例7: Perform
protected override void Perform(BooterHelper.BootFile file, XmlDbRow row)
{
BooterHelper.DataBootFile careerFile = new BooterHelper.DataBootFile(file.ToString(), row.GetString("Careers"), false);
if (!careerFile.IsValid)
{
BooterLogger.AddError(file.ToString() + ": Unknown Careers File " + row.GetString("Careers"));
return;
}
BooterHelper.DataBootFile careerEventsFile = new BooterHelper.DataBootFile(careerFile.ToString(), row.GetString("CareerEvents"), false);
if (careerEventsFile.IsValid)
{
foreach (Career career in CareerManager.CareerList)
{
XmlDbTable table3 = careerEventsFile.GetTable(career.Guid.ToString ());
if (table3 != null)
{
LoadCareerEvents(career, careerEventsFile, table3);
}
}
}
BooterHelper.DataBootTable table = new BooterHelper.DataBootTable(careerFile, "CareerList");
if (!table.IsValid)
{
BooterLogger.AddError(file.ToString() + ": No CareerList " + careerFile.ToString());
return;
}
table.Load(new CareerLoader(careerEventsFile).LoadCareer);
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:32,代码来源:CareersBooter.cs
示例8: 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);
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:25,代码来源:PropagateLikingScenario.cs
示例9: 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"));
}
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:34,代码来源:MoodletSymptom.cs
示例10: OccultSymptom
public OccultSymptom(XmlDbRow row)
: base(row)
{
if (BooterLogger.Exists(row, "Occult", Guid))
{
if (!row.TryGetEnum<OccultTypes>("Occult", out mOccult, OccultTypes.None))
{
BooterLogger.AddError(" Unknown Occult: " + row.GetString("Occult"));
}
}
if (BooterLogger.Exists(row, "Remove", Guid))
{
mRemove = row.GetBool("Remove");
}
if (BooterLogger.Exists(row, "DropOthers", Guid))
{
mDropOthers = row.GetBool("DropOthers");
}
if (BooterLogger.Exists(row, "AllowIfOthers", Guid))
{
mAllowIfOthers = row.GetBool("AllowIfOthers");
}
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:26,代码来源:OccultSymptom.cs
示例11: Perform
protected override void Perform(BooterHelper.BootFile file, XmlDbRow row)
{
string toneName = row.GetString("ToneName");
if (string.IsNullOrEmpty(toneName))
{
BooterLogger.AddError("Tone found with no name");
return;
}
Type classType = row.GetClassType("FullClassName");
if (classType == null)
{
BooterLogger.AddError("Tone: " + toneName + " FullClassName no match");
return;
}
string guid = row.GetString("CareerGuid");
OccupationNames careerGuid = OccupationNames.Undefined;
ParserFunctions.TryParseEnum<OccupationNames>(guid, out careerGuid, OccupationNames.Undefined);
if (careerGuid == OccupationNames.Undefined)
{
careerGuid = unchecked((OccupationNames)ResourceUtils.HashString64(guid));
}
Career staticCareer = CareerManager.GetStaticCareer (careerGuid);
if (staticCareer == null)
{
BooterLogger.AddError("Tone: " + toneName + " CareerGuid no match");
return;
}
staticCareer.SharedData.ToneDefinitions.Add(new CareerBooterToneDefinition(row, classType));
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:35,代码来源:ToneBooter.cs
示例12: Parse
public bool Parse(XmlDbRow row, StoryProgressionObject manager, IUpdateManager updater, string prefix, ref string error)
{
if ((!string.IsNullOrEmpty(prefix)) && (!Parse(row, manager, updater, null, ref error)))
{
return false;
}
if (row.Exists(prefix + "RecruitAllowSteal"))
{
mAllowSteal = row.GetBool(prefix + "RecruitAllowSteal");
}
if (mActorRecruit == null)
{
mActorRecruit = new SimScenarioFilter();
}
if (!mActorRecruit.Parse(row, manager, updater, prefix + "RecruitActor", false, ref error))
{
return false;
}
if (mTargetRecruit == null)
{
mTargetRecruit = new SimScenarioFilter();
}
if (!mTargetRecruit.Parse(row, manager, updater, prefix + "RecruitTarget", false, ref error))
{
return false;
}
return true;
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:34,代码来源:SimRecruitFilter.cs
示例13: 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);
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:8,代码来源:WeatherData.cs
示例14: TestSettingStage
public TestSettingStage(XmlDbRow row)
: base(row)
{
if (BooterLogger.Exists(row, "Setting", Name))
{
mSetting = row.GetString("Setting");
}
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:8,代码来源:TestSettingStage.cs
示例15: CounterStage
public CounterStage(XmlDbRow row)
: base(row)
{
if (BooterLogger.Exists(row, "Counter", Name))
{
mCounter = row.GetString("Counter");
}
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:8,代码来源:CounterStage.cs
示例16: SimpleStage
public SimpleStage(XmlDbRow row)
: base(row)
{
if (BooterLogger.Exists(row, "NextStage", Name))
{
mNextStage.First = row.GetString("NextStage");
}
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:8,代码来源:SimpleStage.cs
示例17: MetricSkillX
// Methods
public MetricSkillX(XmlDbRow row, int metricNumber)
: base(row, metricNumber)
{
if (SkillGuid == SkillNames.None)
{
SkillGuid = unchecked((SkillNames)ResourceUtils.HashString64(row.GetString("Args" + metricNumber)));
}
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:9,代码来源:MetricSkillX.cs
示例18: FirestarterSymptom
public FirestarterSymptom(XmlDbRow row)
: base(row)
{
if (BooterLogger.Exists(row, "Maximum", Guid))
{
mMaximum = row.GetInt("Maximum");
}
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:8,代码来源:FirestarterSymptom.cs
示例19: EventChoice
public EventChoice(XmlDbRow row, Dictionary<string, Dictionary<int, CareerLevel>> careerLevels, string careerName)
: base(row, careerLevels, careerName)
{
mYesRewardsList = OpportunityBooter.ParseRewards(row, sYesRewardColumns, kNumRewards);
mYesLoseRewardsList = OpportunityBooter.ParseRewards(row, sYesLoseRewardColumns, kNumRewards);
mNoRewardsList = OpportunityBooter.ParseRewards(row, sNoRewardColumns, kNumRewards);
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:9,代码来源:EventChoice.cs
示例20: Parse
public override bool Parse(XmlDbRow row, SimPersonality personality, ref string error)
{
if (!base.Parse(row, personality, ref error)) return false;
if (!row.Exists("Name"))
{
error = "Name missing";
return false;
}
else if (!row.Exists("Default"))
{
error = "Default missing";
return false;
}
else
{
CASAgeGenderFlags ageGender;
if (!ParserFunctions.TryParseEnum<CASAgeGenderFlags>(row.GetString("AgeGender"), out ageGender, CASAgeGenderFlags.None))
{
error = "Unknown AgeGender " + row.GetString("AgeGender");
return false;
}
mAge = ageGender & CASAgeGenderFlags.AgeMask;
if (mAge == CASAgeGenderFlags.None)
{
mAge = CASAgeGenderFlags.AgeMask;
}
mGender = ageGender & CASAgeGenderFlags.GenderMask;
if (mGender == CASAgeGenderFlags.None)
{
mGender = CASAgeGenderFlags.GenderMask;
}
StringToSpeciesList converter = new StringToSpeciesList();
mSpecies = converter.Convert(row.GetString("Species"));
if (mSpecies == null)
{
error = converter.mError;
return false;
}
if (mSpecies.Count == 0)
{
mSpecies.Add(CASAgeGenderFlags.Human);
}
}
mName = row.GetString("Name");
SetValue (row.GetBool("Default"));
return true;
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:57,代码来源:AgeGenderOption.cs
注:本文中的XmlDbRow类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论