Ejemplo n.º 1
0
        /// <summary>
        /// Saves properties
        /// </summary>
        /// <param name="name">Name for the node</param>
        /// <param name="writer">XmlWriter</param>
        /// <returns>True if saved</returns>
        public bool Save(string name, XmlWriter writer)
        {
            if (writer == null || string.IsNullOrEmpty(name))
            {
                return(false);
            }

            writer.WriteStartElement(name);
            writer.WriteAttributeString("throws", Throws.ToString());
            writer.WriteAttributeString("faces", Faces.ToString());
            writer.WriteAttributeString("modifier", Modifier.ToString());
            writer.WriteEndElement();

            return(true);
        }
Ejemplo n.º 2
0
        //override the ToString method - used for returning CSS classes
        override public String ToString()
        {
            Faces f = (Faces)Enum.Parse(typeof(Faces), Face);

            return(Suit + " " + f.ToString());
        }