本文整理汇总了C#中Chummer.CommonFunctions.FindArmor方法的典型用法代码示例。如果您正苦于以下问题:C# CommonFunctions.FindArmor方法的具体用法?C# CommonFunctions.FindArmor怎么用?C# CommonFunctions.FindArmor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Chummer.CommonFunctions
的用法示例。
在下文中一共展示了CommonFunctions.FindArmor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: tsUndoNuyenExpense_Click
//.........这里部分代码省略.........
// Remove the Weapon Mod from the Tree.
foreach (TreeNode objVNode in treVehicles.Nodes[0].Nodes)
{
foreach (TreeNode objNode in objVNode.Nodes)
{
foreach (TreeNode objWNode in objNode.Nodes)
{
foreach (TreeNode objChild in objWNode.Nodes)
{
foreach (TreeNode objSubChild in objChild.Nodes)
{
if (objSubChild.Tag.ToString() == objEntry.Undo.ObjectId)
{
objSubChild.Remove();
break;
}
}
}
}
}
}
break;
}
}
}
}
}
}
}
break;
case NuyenExpenseType.AddArmor:
// Locate the Armor that was added.
Armor objArmor = objCommon.FindArmor(objEntry.Undo.ObjectId, _objCharacter.Armor);
if (objArmor != null)
{
// Remove the Improvements for any child items.
foreach (ArmorMod objMod in objArmor.ArmorMods)
_objImprovementManager.RemoveImprovements(Improvement.ImprovementSource.ArmorMod, objMod.InternalId);
// Remove the Improvements for the Armor.
_objImprovementManager.RemoveImprovements(Improvement.ImprovementSource.Armor, objArmor.InternalId);
// Remove the Armor from the character.
_objCharacter.Armor.Remove(objArmor);
// Remove the Armor from the Tree.
TreeNode objArmorNode = objCommon.FindNode(objEntry.Undo.ObjectId, treArmor);
objArmorNode.Remove();
}
break;
case NuyenExpenseType.AddArmorMod:
// Locate the Armor Mod that was added.
foreach (Armor objFoundArmor in _objCharacter.Armor)
{
foreach (ArmorMod objMod in objFoundArmor.ArmorMods)
{
if (objMod.InternalId == objEntry.Undo.ObjectId)
{
// Remove the Improtements for the Armor Mod.
_objImprovementManager.RemoveImprovements(Improvement.ImprovementSource.ArmorMod, objMod.InternalId);
// Remove the Armor Mod from the Armor.
objFoundArmor.ArmorMods.Remove(objMod);