コード例 #1
0
        internal void Import(XmlReader reader)
        {
            foreach (XmlReaderAttributeItem xa in reader.GetAttributes())
            {
                switch (xa.LocalName)
                {
                case "Color":
                {
                    Color = XmlStyle.ExcelFormatToColor(xa.Value);

                    break;
                }

                case "PatternColor":
                {
                    PatternColor = XmlStyle.ExcelFormatToColor(xa.Value);

                    break;
                }

                case "Pattern":
                {
                    Pattern = ObjectExtensions.ParseEnum <Pattern>(xa.Value);

                    break;
                }
                }
            }
        }
コード例 #2
0
        internal void Import(XmlReader reader)
        {
            foreach (XmlReaderAttributeItem xa in reader.GetAttributes())
            {
                switch (xa.LocalName)
                {
                case "FontName":
                {
                    Name = xa.Value;

                    break;
                }

                case "Size":
                {
                    int i;
                    if (xa.Value.ParseToInt(out i))
                    {
                        Size = i;
                    }

                    break;
                }

                case "Color":
                {
                    Color = XmlStyle.ExcelFormatToColor(xa.Value);

                    break;
                }

                case "Bold":
                {
                    Bold = xa.Value == "1" ? true : false;

                    break;
                }

                case "Italic":
                {
                    Italic = xa.Value == "1" ? true : false;

                    break;
                }

                case "Underline":
                {
                    Underline = xa.Value == "Single" ? true : false;

                    break;
                }

                case "Strikeout":
                {
                    Strikeout = xa.Value == "1" ? true : false;

                    break;
                }
                }
            }
        }