本文整理汇总了C#中Chummer.SpiritControl.RebuildSpiritList方法的典型用法代码示例。如果您正苦于以下问题:C# SpiritControl.RebuildSpiritList方法的具体用法?C# SpiritControl.RebuildSpiritList怎么用?C# SpiritControl.RebuildSpiritList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Chummer.SpiritControl
的用法示例。
在下文中一共展示了SpiritControl.RebuildSpiritList方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: cmdAddSprite_Click
private void cmdAddSprite_Click(object sender, EventArgs e)
{
int i = panSprites.Controls.Count;
// The number of registered Sprites cannot exceed the character's LOG.
if (i >= _objCharacter.LOG.Value && !_objCharacter.IgnoreRules)
{
MessageBox.Show(LanguageManager.Instance.GetString("Message_RegisteredSpriteLimit"), LanguageManager.Instance.GetString("MessageTitle_RegisteredSpriteLimit"), MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
Spirit objSprite = new Spirit(_objCharacter);
_objCharacter.Spirits.Add(objSprite);
SpiritControl objSpriteControl = new SpiritControl();
objSpriteControl.SpiritObject = objSprite;
objSpriteControl.EntityType = SpiritType.Sprite;
// Attach an EventHandler for the ServicesOwedChanged Event.
objSpriteControl.ServicesOwedChanged += objSprite_ServicesOwedChanged;
objSpriteControl.ForceChanged += objSprite_ForceChanged;
objSpriteControl.BoundChanged += objSprite_BoundChanged;
objSpriteControl.DeleteSpirit += objSprite_DeleteSpirit;
objSpriteControl.FileNameChanged += objSprite_FileNameChanged;
objSpriteControl.ForceMaximum = Convert.ToInt32(nudRES.Value);
objSpriteControl.Force = Convert.ToInt32(nudRES.Value);
objSpriteControl.RebuildSpiritList(_objCharacter.TechnomancerStream);
objSpriteControl.Top = i * objSpriteControl.Height;
panSprites.Controls.Add(objSpriteControl);
_blnIsDirty = true;
UpdateWindowTitle();
}
示例2: frmCreate_Load
//.........这里部分代码省略.........
}
// Populate Magician Spirits.
i = -1;
foreach (Spirit objSpirit in _objCharacter.Spirits)
{
if (objSpirit.EntityType == SpiritType.Spirit)
{
i++;
SpiritControl objSpiritControl = new SpiritControl();
objSpiritControl.SpiritObject = objSpirit;
// Attach an EventHandler for the ServicesOwedChanged Event.
objSpiritControl.ServicesOwedChanged += objSpirit_ServicesOwedChanged;
objSpiritControl.ForceChanged += objSpirit_ForceChanged;
objSpiritControl.BoundChanged += objSpirit_BoundChanged;
objSpiritControl.DeleteSpirit += objSpirit_DeleteSpirit;
objSpiritControl.FileNameChanged += objSpirit_FileNameChanged;
objSpiritControl.SpiritName = objSpirit.Name;
objSpiritControl.ServicesOwed = objSpirit.ServicesOwed;
if (_objCharacter.AdeptEnabled && _objCharacter.MagicianEnabled)
{
if (_objOptions.SpiritForceBasedOnTotalMAG)
objSpiritControl.ForceMaximum = _objCharacter.MAG.TotalValue;
else
objSpiritControl.ForceMaximum = _objCharacter.MAGMagician;
}
else
objSpiritControl.ForceMaximum = _objCharacter.MAG.TotalValue;
objSpiritControl.CritterName = objSpirit.CritterName;
objSpiritControl.Force = objSpirit.Force;
objSpiritControl.Bound = objSpirit.Bound;
objSpiritControl.RebuildSpiritList(_objCharacter.MagicTradition);
objSpiritControl.Top = i * objSpiritControl.Height;
panSpirits.Controls.Add(objSpiritControl);
}
}
// Populate Technomancer Sprites.
i = -1;
foreach (Spirit objSpirit in _objCharacter.Spirits)
{
if (objSpirit.EntityType == SpiritType.Sprite)
{
i++;
SpiritControl objSpiritControl = new SpiritControl();
objSpiritControl.SpiritObject = objSpirit;
objSpiritControl.EntityType = SpiritType.Sprite;
// Attach an EventHandler for the ServicesOwedChanged Event.
objSpiritControl.ServicesOwedChanged += objSprite_ServicesOwedChanged;
objSpiritControl.ForceChanged += objSprite_ForceChanged;
objSpiritControl.BoundChanged += objSprite_BoundChanged;
objSpiritControl.DeleteSpirit += objSprite_DeleteSpirit;
objSpiritControl.FileNameChanged += objSprite_FileNameChanged;
objSpiritControl.SpiritName = objSpirit.Name;
objSpiritControl.ServicesOwed = objSpirit.ServicesOwed;
objSpiritControl.ForceMaximum = _objCharacter.RES.TotalValue;
objSpiritControl.CritterName = objSpiritControl.CritterName;
objSpiritControl.Force = objSpirit.Force;
objSpiritControl.Bound = objSpirit.Bound;
objSpiritControl.RebuildSpiritList(_objCharacter.TechnomancerStream);
示例3: cmdAddSpirit_Click
private void cmdAddSpirit_Click(object sender, EventArgs e)
{
int i = panSpirits.Controls.Count;
// The number of bound Spirits cannot exeed the character's CHA.
if (i >= _objCharacter.CHA.Value && !_objCharacter.IgnoreRules)
{
MessageBox.Show(LanguageManager.Instance.GetString("Message_BoundSpiritLimit"), LanguageManager.Instance.GetString("MessageTitle_BoundSpiritLimit"), MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
Spirit objSpirit = new Spirit(_objCharacter);
_objCharacter.Spirits.Add(objSpirit);
SpiritControl objSpiritControl = new SpiritControl();
objSpiritControl.SpiritObject = objSpirit;
objSpiritControl.EntityType = SpiritType.Spirit;
// Attach an EventHandler for the ServicesOwedChanged Event.
objSpiritControl.ServicesOwedChanged += objSpirit_ServicesOwedChanged;
objSpiritControl.ForceChanged += objSpirit_ForceChanged;
objSpiritControl.BoundChanged += objSpirit_BoundChanged;
objSpiritControl.DeleteSpirit += objSpirit_DeleteSpirit;
objSpiritControl.FileNameChanged += objSpirit_FileNameChanged;
int intMAG = Convert.ToInt32(_objCharacter.MAG.TotalValue);
if (_objCharacter.AdeptEnabled && _objCharacter.MagicianEnabled)
{
intMAG = _objCharacter.MAG.TotalValue;
}
if (_objOptions.SpiritForceBasedOnTotalMAG)
{
objSpiritControl.ForceMaximum = _objCharacter.MAG.TotalValue;
objSpiritControl.Force = _objCharacter.MAG.TotalValue;
}
else
{
if (intMAG == 0)
intMAG = 1;
objSpiritControl.ForceMaximum = intMAG;
objSpiritControl.Force = intMAG;
}
objSpiritControl.RebuildSpiritList(_objCharacter.MagicTradition);
objSpiritControl.Top = i * objSpiritControl.Height;
panSpirits.Controls.Add(objSpiritControl);
_blnIsDirty = true;
UpdateWindowTitle();
}
示例4: frmCreate_Load
//.........这里部分代码省略.........
if (objPower.DiscountedGeas)
objPowerControl.DiscountedByGeas = true;
objPowerControl.Top = i * objPowerControl.Height;
panPowers.Controls.Add(objPowerControl);
}
// Populate Magician Spirits.
i = -1;
foreach (Spirit objSpirit in _objCharacter.Spirits)
{
if (objSpirit.EntityType == SpiritType.Spirit)
{
i++;
SpiritControl objSpiritControl = new SpiritControl();
objSpiritControl.SpiritObject = objSpirit;
// Attach an EventHandler for the ServicesOwedChanged Event.
objSpiritControl.ServicesOwedChanged += objSpirit_ServicesOwedChanged;
objSpiritControl.ForceChanged += objSpirit_ForceChanged;
objSpiritControl.BoundChanged += objSpirit_BoundChanged;
objSpiritControl.DeleteSpirit += objSpirit_DeleteSpirit;
objSpiritControl.FileNameChanged += objSpirit_FileNameChanged;
objSpiritControl.SpiritName = objSpirit.Name;
objSpiritControl.ServicesOwed = objSpirit.ServicesOwed;
if (_objCharacter.AdeptEnabled && _objCharacter.MagicianEnabled)
objSpiritControl.ForceMaximum = _objCharacter.MAGMagician;
else
objSpiritControl.ForceMaximum = _objCharacter.MAG.TotalValue;
objSpiritControl.CritterName = objSpirit.CritterName;
objSpiritControl.Force = objSpirit.Force;
objSpiritControl.Bound = objSpirit.Bound;
objSpiritControl.RebuildSpiritList(_objCharacter.MagicTradition);
objSpiritControl.Top = i * objSpiritControl.Height;
panSpirits.Controls.Add(objSpiritControl);
}
}
// Populate Technomancer Sprites.
i = -1;
foreach (Spirit objSpirit in _objCharacter.Spirits)
{
if (objSpirit.EntityType == SpiritType.Sprite)
{
i++;
SpiritControl objSpiritControl = new SpiritControl();
objSpiritControl.SpiritObject = objSpirit;
objSpiritControl.EntityType = SpiritType.Sprite;
// Attach an EventHandler for the ServicesOwedChanged Event.
objSpiritControl.ServicesOwedChanged += objSprite_ServicesOwedChanged;
objSpiritControl.ForceChanged += objSprite_ForceChanged;
objSpiritControl.BoundChanged += objSprite_BoundChanged;
objSpiritControl.DeleteSpirit += objSprite_DeleteSpirit;
objSpiritControl.FileNameChanged += objSprite_FileNameChanged;
objSpiritControl.SpiritName = objSpirit.Name;
objSpiritControl.ServicesOwed = objSpirit.ServicesOwed;
objSpiritControl.ForceMaximum = _objCharacter.RES.TotalValue;
objSpiritControl.CritterName = objSpiritControl.CritterName;
objSpiritControl.Force = objSpirit.Force;
objSpiritControl.Bound = objSpirit.Bound;
objSpiritControl.RebuildSpiritList(_objCharacter.TechnomancerStream);
示例5: cmdAddSprite_Click
private void cmdAddSprite_Click(object sender, EventArgs e)
{
int i = panSprites.Controls.Count;
Spirit objSprite = new Spirit(_objCharacter);
_objCharacter.Spirits.Add(objSprite);
SpiritControl objSpriteControl = new SpiritControl(true);
objSpriteControl.SpiritObject = objSprite;
objSpriteControl.EntityType = SpiritType.Sprite;
// Attach an EventHandler for the ServicesOwedChanged Event.
objSpriteControl.ServicesOwedChanged += objSprite_ServicesOwedChanged;
objSpriteControl.ForceChanged += objSprite_ForceChanged;
objSpriteControl.BoundChanged += objSprite_BoundChanged;
objSpriteControl.DeleteSpirit += objSprite_DeleteSpirit;
objSpriteControl.FileNameChanged += objSprite_FileNameChanged;
objSpriteControl.ForceMaximum = _objCharacter.RES.TotalValue * 2;
objSpriteControl.Force = Convert.ToInt32(_objCharacter.RES.Value);
objSpriteControl.RebuildSpiritList(_objCharacter.TechnomancerStream);
objSpriteControl.Top = i * objSpriteControl.Height;
panSprites.Controls.Add(objSpriteControl);
_blnIsDirty = true;
UpdateWindowTitle();
}
示例6: cmdAddSpirit_Click
private void cmdAddSpirit_Click(object sender, EventArgs e)
{
int i = panSpirits.Controls.Count;
Spirit objSpirit = new Spirit(_objCharacter);
_objCharacter.Spirits.Add(objSpirit);
SpiritControl objSpiritControl = new SpiritControl(true);
objSpiritControl.SpiritObject = objSpirit;
objSpiritControl.EntityType = SpiritType.Spirit;
// Attach an EventHandler for the ServicesOwedChanged Event.
objSpiritControl.ServicesOwedChanged += objSpirit_ServicesOwedChanged;
objSpiritControl.ForceChanged += objSpirit_ForceChanged;
objSpiritControl.BoundChanged += objSpirit_BoundChanged;
objSpiritControl.DeleteSpirit += objSpirit_DeleteSpirit;
objSpiritControl.FileNameChanged += objSpirit_FileNameChanged;
int intMAG = Convert.ToInt32(_objCharacter.MAG.TotalValue);
if (_objCharacter.AdeptEnabled && _objCharacter.MagicianEnabled)
{
intMAG = _objCharacter.MAGMagician;
}
if (_objOptions.SpiritForceBasedOnTotalMAG)
{
objSpiritControl.ForceMaximum = _objCharacter.MAG.TotalValue * 2;
objSpiritControl.Force = _objCharacter.MAG.TotalValue;
}
else
{
if (intMAG == 0)
intMAG = 1;
objSpiritControl.ForceMaximum = intMAG * 2;
objSpiritControl.Force = intMAG;
}
objSpiritControl.RebuildSpiritList(_objCharacter.MagicTradition);
objSpiritControl.Top = i * objSpiritControl.Height;
panSpirits.Controls.Add(objSpiritControl);
_blnIsDirty = true;
UpdateWindowTitle();
}
示例7: frmCareer_Load
//.........这里部分代码省略.........
if (objPower.DiscountedGeas)
objPowerControl.DiscountedByGeas = true;
objPowerControl.Top = i * objPowerControl.Height;
panPowers.Controls.Add(objPowerControl);
}
// Populate Magician Spirits.
i = -1;
foreach (Spirit objSpirit in _objCharacter.Spirits)
{
if (objSpirit.EntityType == SpiritType.Spirit)
{
i++;
SpiritControl objSpiritControl = new SpiritControl(true);
objSpiritControl.SpiritObject = objSpirit;
// Attach an EventHandler for the ServicesOwedChanged Event.
objSpiritControl.ServicesOwedChanged += objSpirit_ServicesOwedChanged;
objSpiritControl.ForceChanged += objSpirit_ForceChanged;
objSpiritControl.BoundChanged += objSpirit_BoundChanged;
objSpiritControl.DeleteSpirit += objSpirit_DeleteSpirit;
objSpiritControl.FileNameChanged += objSpirit_FileNameChanged;
objSpiritControl.SpiritName = objSpirit.Name;
objSpiritControl.ServicesOwed = objSpirit.ServicesOwed;
if (_objOptions.SpiritForceBasedOnTotalMAG)
objSpiritControl.ForceMaximum = _objCharacter.MAG.TotalValue * 2;
else
objSpiritControl.ForceMaximum = intCharacterMAG * 2;
objSpiritControl.CritterName = objSpirit.CritterName;
objSpiritControl.Force = objSpirit.Force;
objSpiritControl.Bound = objSpirit.Bound;
objSpiritControl.RebuildSpiritList(_objCharacter.MagicTradition);
objSpiritControl.Top = i * objSpiritControl.Height;
panSpirits.Controls.Add(objSpiritControl);
}
}
// Populate Technomancer Sprites.
i = -1;
foreach (Spirit objSpirit in _objCharacter.Spirits)
{
if (objSpirit.EntityType == SpiritType.Sprite)
{
i++;
SpiritControl objSpiritControl = new SpiritControl(true);
objSpiritControl.SpiritObject = objSpirit;
objSpiritControl.EntityType = SpiritType.Sprite;
// Attach an EventHandler for the ServicesOwedChanged Event.
objSpiritControl.ServicesOwedChanged += objSprite_ServicesOwedChanged;
objSpiritControl.ForceChanged += objSprite_ForceChanged;
objSpiritControl.BoundChanged += objSprite_BoundChanged;
objSpiritControl.DeleteSpirit += objSprite_DeleteSpirit;
objSpiritControl.FileNameChanged += objSprite_FileNameChanged;
objSpiritControl.SpiritName = objSpirit.Name;
objSpiritControl.ServicesOwed = objSpirit.ServicesOwed;
objSpiritControl.ForceMaximum = _objCharacter.RES.TotalValue * 2;
objSpiritControl.CritterName = objSpirit.CritterName;
objSpiritControl.Force = objSpirit.Force;
objSpiritControl.Bound = objSpirit.Bound;
objSpiritControl.RebuildSpiritList(_objCharacter.TechnomancerStream);
示例8: frmCreate_Load
//.........这里部分代码省略.........
}
// Populate Magician Spirits.
i = -1;
foreach (Spirit objSpirit in _objCharacter.Spirits)
{
if (objSpirit.EntityType == SpiritType.Spirit)
{
i++;
SpiritControl objSpiritControl = new SpiritControl();
objSpiritControl.SpiritObject = objSpirit;
// Attach an EventHandler for the ServicesOwedChanged Event.
objSpiritControl.ServicesOwedChanged += objSpirit_ServicesOwedChanged;
objSpiritControl.ForceChanged += objSpirit_ForceChanged;
objSpiritControl.BoundChanged += objSpirit_BoundChanged;
objSpiritControl.DeleteSpirit += objSpirit_DeleteSpirit;
objSpiritControl.FileNameChanged += objSpirit_FileNameChanged;
objSpiritControl.SpiritName = objSpirit.Name;
objSpiritControl.ServicesOwed = objSpirit.ServicesOwed;
if (_objCharacter.AdeptEnabled && _objCharacter.MagicianEnabled)
{
if (_objOptions.SpiritForceBasedOnTotalMAG)
objSpiritControl.ForceMaximum = _objCharacter.MAG.TotalValue;
else
objSpiritControl.ForceMaximum = _objCharacter.MAGMagician;
}
else
objSpiritControl.ForceMaximum = _objCharacter.MAG.TotalValue;
objSpiritControl.CritterName = objSpirit.CritterName;
objSpiritControl.Force = objSpirit.Force;
objSpiritControl.Bound = objSpirit.Bound;
objSpiritControl.RebuildSpiritList(_objCharacter.MagicTradition);
objSpiritControl.Top = i * objSpiritControl.Height;
panSpirits.Controls.Add(objSpiritControl);
}
}
// Populate Technomancer Sprites.
i = -1;
foreach (Spirit objSpirit in _objCharacter.Spirits)
{
if (objSpirit.EntityType == SpiritType.Sprite)
{
i++;
SpiritControl objSpiritControl = new SpiritControl();
objSpiritControl.SpiritObject = objSpirit;
objSpiritControl.EntityType = SpiritType.Sprite;
// Attach an EventHandler for the ServicesOwedChanged Event.
objSpiritControl.ServicesOwedChanged += objSprite_ServicesOwedChanged;
objSpiritControl.ForceChanged += objSprite_ForceChanged;
objSpiritControl.BoundChanged += objSprite_BoundChanged;
objSpiritControl.DeleteSpirit += objSprite_DeleteSpirit;
objSpiritControl.FileNameChanged += objSprite_FileNameChanged;
objSpiritControl.SpiritName = objSpirit.Name;
objSpiritControl.ServicesOwed = objSpirit.ServicesOwed;
objSpiritControl.ForceMaximum = _objCharacter.RES.TotalValue;
objSpiritControl.CritterName = objSpiritControl.CritterName;
objSpiritControl.Force = objSpirit.Force;
objSpiritControl.Bound = objSpirit.Bound;
objSpiritControl.RebuildSpiritList(_objCharacter.TechnomancerStream);