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


C# XmlDbRow.GetBool方法代码示例

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


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

示例1: 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

示例2: CancelInteractionSymptom

        public CancelInteractionSymptom(XmlDbRow row)
            : base(row)
        {
            if (BooterLogger.Exists(row, "All", Guid))
            {
                mAll = row.GetBool("All");
            }

            if (BooterLogger.Exists(row, "AffectSleep", Guid))
            {
                mAffectSleep = row.GetBool("AffectSleep");
            }
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:13,代码来源:CancelInteractionSymptom.cs

示例3: 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

示例4: 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

示例5: ImpregnateSymptom

        public ImpregnateSymptom(XmlDbRow row)
            : base(row)
        {
            if (BooterLogger.Exists(row, "Clone", Guid))
            {
                mClone = row.GetBool("Clone");
            }

            if (BooterLogger.Exists(row, "AllowCloseRelations", Guid))
            {
                mAllowCloseRelations = row.GetBool("AllowCloseRelations");
            }

            if (row.Exists("HandlePlantSim"))
            {
                mHandlePlantSim = row.GetBool("HandlePlantSim");
            }
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:18,代码来源:ImpregnateSymptom.cs

示例6: SocialTest

        public SocialTest(XmlDbRow row)
        {
            string name = row.GetString("GUID");

            if (BooterLogger.Exists(row, "Socials", name))
            {
                mSocials = row.GetStringList("SocialName", ',');

                for (int i = mSocials.Count - 1; i >= 0; i--)
                {
                    if (ActionData.Get(mSocials[i]) == null)
                    {
                        BooterLogger.AddError(name + " Invalid Social: " + mSocials[i]);

                        mSocials.RemoveAt(i);
                    }
                }
            }

            if (BooterLogger.Exists(row, "AllowAccept", name))
            {
                mAllowAccept = row.GetBool("AllowAccept");
            }

            if (BooterLogger.Exists(row, "AllowReject", name))
            {
                mAllowReject = row.GetBool("AllowReject");
            }

            if (BooterLogger.Exists(row, "AllowRecipient", name))
            {
                mAllowRecipient = row.GetBool("AllowRecipient");
            }

            if (BooterLogger.Exists(row, "AllowInitiator", name))
            {
                mAllowInitiator = row.GetBool("AllowInitiator");
            }
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:39,代码来源:SocialTest.cs

示例7: Parse

        public override bool Parse(XmlDbRow row, ref string error)
        {
            mOccult = row.GetEnum<OccultTypes>("Occult", OccultTypes.None);
            if (mOccult == OccultTypes.None)
            {
                error = "Occult Fail: " + row.GetString("Occult");
                return false;
            }

            mAllowHybrid = row.GetBool("AllowHybrid");

            return base.Parse(row, ref error);
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:13,代码来源:CreateOccultScenario.cs

示例8: Parse

        public override bool Parse(XmlDbRow row, ref string error)
        {
            mName = row.GetString("Name");

            mAllowGoToJail = row.GetBool("AllowGoToJail");

            mAllowInjury = row.GetBool("AllowInjury");

            mSneakinessScoring = row.GetString("SneakinessScoring");

            mSuccess = new WeightScenarioHelper(Origin.FromBadGuest);
            if (!mSuccess.Parse(row, Manager, "Success", ref error))
            {
                return false;
            }

            mFailure = new WeightScenarioHelper(Origin.FromBadGuest);
            if (!mFailure.Parse(row, Manager, "Failure", ref error))
            {
                return false;
            } 
            
            return base.Parse(row, ref error);
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:24,代码来源:BreakScenario.cs

示例9: DeathSymptom

        public DeathSymptom(XmlDbRow row)
            : base(row)
        {
            if (BooterLogger.Exists(row, "Type", Guid))
            {
                if (!row.TryGetEnum<SimDescription.DeathType>("Type", out mType, SimDescription.DeathType.None))
                {
                    BooterLogger.AddError(" Unknown Type: " + row.GetString("Type"));
                }
            }

            if (BooterLogger.Exists(row, "AllowActive", Guid))
            {
                mAllowActive = row.GetBool("AllowActive");
            }
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:16,代码来源:DeathSymptom.cs

示例10: 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");
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:17,代码来源:FindSimSymptom.cs

示例11: 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"));
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:19,代码来源:HomemakerBooter.cs

示例12: 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;
            }

            mName = row.GetString("Name");

            SetValue (row.GetBool("Default"));

            return true;
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:21,代码来源:BooleanOption.cs

示例13: Parse

        public bool Parse(XmlDbRow row, StoryProgressionObject manager, IUpdateManager updater, string prefix, bool errorIfNone, ref string error)
        {
            mDisallowRelated = row.GetBool(prefix + "DisallowRelated");

            if (row.Exists(prefix + "StandardFilter"))
            {
                mEnabled = true;

                if (!ParserFunctions.TryParseEnum<StandardFilter>(row.GetString(prefix + "StandardFilter"), out mStandardFilter, StandardFilter.None))
                {
                    error = prefix + "StandardFilter invalid";
                    return false;
                }
            }

            string customTest = row.GetString(prefix + "CustomTest");

            mCustomTest = new Common.MethodStore(customTest, new Type[] { typeof(Parameters), typeof(SimDescription), typeof(SimDescription) });
            if ((mCustomTest == null) && (!string.IsNullOrEmpty(customTest)))
            {
                error = prefix + "CustomTest Invalid";
                return false;
            }

            switch (mStandardFilter)
            {
                case StandardFilter.ExistingFriend:
                case StandardFilter.ExistingEnemy:
                case StandardFilter.Nemesis:
                    if (!row.Exists(prefix + "StandardIgnoreBusy"))
                    {
                        error = prefix + "StandardIgnoreBusy missing";
                        return false;
                    }

                    mStandardIgnoreBusy = row.GetBool(prefix + "StandardIgnoreBusy");
                    break;
            }

            switch (mStandardFilter)
            {
                case StandardFilter.ExistingFriend:
                case StandardFilter.ExistingEnemy:
                    RelationshipLevel standardLevel;
                    if (ParserFunctions.TryParseEnum<RelationshipLevel>(row.GetString(prefix + "StandardGate"), out standardLevel, RelationshipLevel.Neutral))
                    {
                        mStandardGate = (int)standardLevel;
                    }
                    else
                    {
                        RelationshipLevel defGate = RelationshipLevel.Neutral;
                        if (mStandardFilter == StandardFilter.ExistingFriend)
                        {
                            defGate = RelationshipLevel.Friend;
                        }
                        else
                        {
                            defGate = RelationshipLevel.Enemy;
                        }
                        mStandardGate = row.GetInt(prefix + "StandardGate", (int)defGate);
                    }

                    break;
                case StandardFilter.ExistingFlirt:
                case StandardFilter.ExistingOrAnyFlirt:
                    if (!row.Exists(prefix + "StandardDisallowPartner"))
                    {
                        error = prefix + "StandardDisallowPartner missing";
                        return false;
                    }

                    break;
            }

            // The default for DisallowPartner can be altered by the calling system, don't overwrite it
            if (row.Exists(prefix + "StandardDisallowPartner"))
            {
                mStandardDisallowPartner = row.GetBool(prefix + "StandardDisallowPartner");
            }

            switch (mStandardFilter)
            {
                case StandardFilter.AnyFlirt:
                case StandardFilter.ExistingOrAnyFlirt:
                    if (!row.Exists(prefix + "AllowAffair"))
                    {
                        error = prefix + "AllowAffair missing";
                        return false;
                    }

                    break;
            }

            if (row.Exists(prefix + "AllowOpposing"))
            {
                mAllowOpposing = row.GetBool(prefix + "AllowOpposing");
            }
            else
            {
                mAllowOpposing = true;
//.........这里部分代码省略.........
开发者ID:Robobeurre,项目名称:NRaas,代码行数:101,代码来源:SimScenarioFilter.cs

示例14: Parse

        public override bool Parse(XmlDbRow row, ref string error)
        {
            mName = new WeightOption.NameOption(row);

            if (row.Exists("AllowMultiple"))
            {
                mAllowMultiple = row.GetBool("AllowMultiple");
            }

            mMinimumWealth = new IntegerOption.OptionValue();
            if (!mMinimumWealth.Parse(row, "MinimumWealth", Manager, this, ref error))
            {
                return false;
            }

            mSuccess = new WeightScenarioHelper(Origin.FromStore);
            if (!mSuccess.Parse(row, Manager, this, "Success", ref error))
            {
                return false;
            }

            return base.Parse(row, ref error);
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:23,代码来源:InvestScenario.cs

示例15: Parse

        public override bool Parse(XmlDbRow row, ref string error)
        {
            mName = new WeightOption.NameOption(row);

            if (!row.Exists("AllowGoToJail"))
            {
                error = "AllowGoToJail missing";
                return false;
            }

            mAllowGoToJail = row.GetBool("AllowGoToJail");

            mBail = new IntegerOption.OptionValue(-1);
            if (row.Exists("Bail"))
            {
                if (!mBail.Parse(row, "Bail", Manager, this, ref error))
                {
                    return false;
                }
            }

            if (!row.Exists("AllowInjury"))
            {
                error = "AllowInjury missing";
                return false;
            }

            mAllowInjury = row.GetBool("AllowInjury");

            mSneakinessScoring = row.GetString("SneakinessScoring");

            mInvestigate = new InvestigationHelper();
            if (!mInvestigate.Parse(row, Manager, this, ref error))
            {
                return false;
            }

            mSuccess = new WeightScenarioHelper(Origin.FromFire);
            if (!mSuccess.Parse(row, Manager, this, "Success", ref error))
            {
                return false;
            }

            mFailure = new WeightScenarioHelper(Origin.FromFire);
            if (!mFailure.Parse(row, Manager, this, "Failure", ref error))
            {
                return false;
            }

            return base.Parse(row, ref error);
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:51,代码来源:TorchScenario.cs


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