public bool IsKeyword(int index, StyleValueKeyword keyword)
        {
            if (m_CurrentStyleValue.keyword == StyleKeyword.Undefined)
            {
                return(false);
            }

            return(m_CurrentStyleValue.keyword == keyword.ToStyleKeyword());
        }
示例#2
0
        public StyleLength ReadStyleLength(int index)
        {
            StylePropertyValue stylePropertyValue = this.m_Values[this.m_CurrentValueIndex + index];
            bool        flag = stylePropertyValue.handle.valueType == StyleValueType.Keyword;
            StyleLength result;

            if (flag)
            {
                StyleValueKeyword valueIndex = (StyleValueKeyword)stylePropertyValue.handle.valueIndex;
                result = new StyleLength(valueIndex.ToStyleKeyword());
            }
            else
            {
                result = new StyleLength(stylePropertyValue.sheet.ReadDimension(stylePropertyValue.handle).ToLength());
            }
            return(result);
        }