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


C# SpiritControl.RebuildSpiritList方法代码示例

本文整理汇总了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();
        }
开发者ID:cormanater,项目名称:chummer5a,代码行数:35,代码来源:frmCreate.cs

示例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);
开发者ID:cormanater,项目名称:chummer5a,代码行数:66,代码来源:frmCreate.cs

示例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();
        }
开发者ID:cormanater,项目名称:chummer5a,代码行数:51,代码来源:frmCreate.cs

示例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);
开发者ID:janhelke,项目名称:chummer2,代码行数:66,代码来源:frmCreate.cs

示例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();
        }
开发者ID:Althalusdlg,项目名称:chummer5a,代码行数:28,代码来源:frmCareer.cs

示例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();
        }
开发者ID:Althalusdlg,项目名称:chummer5a,代码行数:43,代码来源:frmCareer.cs

示例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);
开发者ID:Althalusdlg,项目名称:chummer5a,代码行数:66,代码来源:frmCareer.cs

示例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);
开发者ID:argo2445,项目名称:chummer5a,代码行数:66,代码来源:frmCreate.cs


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