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


C# ImprovementManager.CreateImprovement方法代码示例

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


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

示例1: UpdateArmorRating

        /// <summary>
        /// Update the label and tooltip for the character's Armor Rating.
        /// </summary>
        /// <param name="lblArmor"></param>
        /// <param name="tipTooltip"></param>
        protected void UpdateArmorRating(Label lblArmor, ToolTip tipTooltip, ImprovementManager _objImprovementManager)
        {
            // Armor Ratings.
            lblArmor.Text = _objCharacter.TotalArmorRating.ToString();
            string strArmorToolTip = "";
            strArmorToolTip = LanguageManager.Instance.GetString("Tip_Armor") + " (" + _objCharacter.ArmorRating.ToString() + ")";
            if (_objCharacter.ArmorRating != _objCharacter.TotalArmorRating)
                strArmorToolTip += " + " + LanguageManager.Instance.GetString("Tip_Modifiers") + " (" +
                                   (_objCharacter.TotalArmorRating - _objCharacter.ArmorRating).ToString() + ")";
            tipTooltip.SetToolTip(lblArmor, strArmorToolTip);

            // Remove any Improvements from Armor Encumbrance.
            _objImprovementManager.RemoveImprovements(Improvement.ImprovementSource.ArmorEncumbrance, "Armor Encumbrance");
            // Create the Armor Encumbrance Improvements.
            if (_objCharacter.ArmorEncumbrance < 0)
            {
                _objImprovementManager.CreateImprovement("AGI", Improvement.ImprovementSource.ArmorEncumbrance, "Armor Encumbrance", Improvement.ImprovementType.Attribute, "", 0, 1, 0, 0, _objCharacter.ArmorEncumbrance);
                _objImprovementManager.CreateImprovement("REA", Improvement.ImprovementSource.ArmorEncumbrance, "Armor Encumbrance", Improvement.ImprovementType.Attribute, "", 0, 1, 0, 0, _objCharacter.ArmorEncumbrance);
            }
        }
开发者ID:argo2445,项目名称:chummer5a,代码行数:25,代码来源:CharacterShared.cs

示例2: AddFreeSkills

        private void AddFreeSkills(int intFreeLevels)
        {
            ImprovementManager manager = new ImprovementManager(_objCharacter);
            var type = "Aspected Magician".Equals(cboTalents.SelectedValue) ? Improvement.ImprovementType.SkillGroupBase : Improvement.ImprovementType.SkillBase;

            if (cboSkill1.Visible)
            {
                manager.CreateImprovement(cboSkill1.Text, Improvement.ImprovementSource.Heritage, "Heritage", type, "", intFreeLevels);
            }

            if (cboSkill2.Visible)
            {
                manager.CreateImprovement(cboSkill2.Text, Improvement.ImprovementSource.Heritage, "Heritage", type, "", intFreeLevels);
            }

            manager.Commit();
        }
开发者ID:argo2445,项目名称:chummer5a,代码行数:17,代码来源:frmPriorityMetatype.cs


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