Пример #1
0
        private void BuySkills()
        {
            var args = new List <object>();

            foreach (var skill in attrBindings.OfType <SkillAttributeBinding>())
            {
                args.Add(skill.AttributeName);
                args.Add(skill.BaseValue);
            }
            AttributesChanged.Raise(args.ToArray());
        }
Пример #2
0
        protected virtual void OnProcessDelta(Delta d)
        {
            if (d.HasFlag(Delta.Appearance))
            {
                AppearanceChanged.Raise(this);
            }

            if (d.HasFlag(Delta.Position))
            {
                PositionChanged.Raise(this);
            }

            if (d.HasFlag(Delta.Attributes))
            {
                AttributesChanged.Raise(this);
            }

            if (d.HasFlag(Delta.Properties))
            {
                PropertiesChanged.Raise(this);
            }
        }
        private void UpdateParameters(Collection <string> attributes, bool allAttributes)
        {
            string newText;

            if (allAttributes)
            {
                newText         = "All Attributes";
                m_allAttributes = true;
            }
            else
            {
                newText         = string.Join(", ", AttributeCollectionToArray(attributes));
                m_allAttributes = false;
            }

            if (allAttributes != AllAttributes || !string.Equals(txtAttributes.Text, newText, StringComparison.CurrentCulture))
            {
                txtAttributes.Text = newText;
                m_allAttributes    = allAttributes;
                m_attributeList    = (AllAttributes || attributes == null) ? new Collection <string>() : new Collection <string>(attributes);
                AttributesChanged?.Invoke(this, new EventArgs());
            }
        }