Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:Dt.Cells.Data.SpreadTheme" /> class.
 /// </summary>
 /// <param name="name">The name of the spread theme.</param>
 /// <param name="colors">The base colors of the theme color.</param>
 /// <param name="headingFontName">Name of the heading font.</param>
 /// <param name="bodyFontName">Name of the body font.</param>
 public SpreadTheme(string name, ThemeColor colors, string headingFontName, string bodyFontName)
 {
     this.isDirty         = false;
     this.name            = name;
     this.colors          = colors;
     this.headingFontName = headingFontName;
     this.bodyFontName    = bodyFontName;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Creates a new object that is a copy of the current instance.
        /// </summary>
        /// <returns>
        /// A new object that is a copy of this instance.
        /// </returns>
        public object Clone()
        {
            ThemeColor color = new ThemeColor {
                name      = this.name,
                colorList = new Windows.UI.Color[12]
            };

            Array.Copy(this.colorList, color.colorList, 12);
            return(color);
        }
Exemplo n.º 3
0
        void IXmlSerializable.ReadXml(XmlReader reader)
        {
            Serializer.InitReader(reader);
            this.name              = null;
            this.colors            = null;
            this.headingFontName   = null;
            this.headingFontFamily = null;
            this.bodyFontName      = null;
            this.bodyFontFamily    = null;
            this.isDirty           = false;
            while (reader.Read())
            {
                string str;
                if ((reader.NodeType == ((XmlNodeType)((int)XmlNodeType.Element))) && ((str = reader.Name) != null))
                {
                    if (str != "ThemeColors")
                    {
                        if (str == "Name")
                        {
                            goto Label_00B1;
                        }
                        if (str == "HeadingFont")
                        {
                            goto Label_00CE;
                        }
                        if (str == "BodyFont")
                        {
                            goto Label_00EB;
                        }
                    }
                    else
                    {
                        this.colors = new ThemeColor();
                        XmlReader reader2 = Serializer.ExtractNode(reader);
                        Serializer.DeserializePublicProperties(this.colors, reader2);
                        reader2.Close();
                    }
                }
                continue;
Label_00B1:
                this.name = (string)((string)Serializer.DeserializeObj(typeof(string), reader));
                continue;
Label_00CE:
                this.headingFontName = (string)((string)Serializer.DeserializeObj(typeof(string), reader));
                continue;
Label_00EB:
                this.bodyFontName = (string)((string)Serializer.DeserializeObj(typeof(string), reader));
            }
        }