Esempio n. 1
0
        /// <summary>
        /// Gets the int property at the specified index.
        /// </summary>
        public int GetIntProp(int iv, out int tpt, out int nVar)
        {
            ThrowIfPropIndexOutOfRange("iv", iv, m_intProps.Count);

            tpt = m_intProps.Keys[iv];
            TsIntPropValue value = m_intProps.Values[iv];

            nVar = value.Variation;
            return(value.Value);
        }
Esempio n. 2
0
        /// <summary>
        /// Sets an integer property. If the variation and value are -1, the integer property is deleted.
        /// </summary>
        public void SetIntPropValues(int tpt, int nVar, int nVal)
        {
            bool delete = nVar == -1 && nVal == -1;

            if (!delete && tpt == (int)FwTextPropType.ktptWs && nVal <= 0)
            {
                throw new ArgumentOutOfRangeException("nVal", "The specified writing system code is invalid.");
            }

            if (delete)
            {
                IntProperties.Remove(tpt);
            }
            else
            {
                IntProperties[tpt] = new TsIntPropValue(nVar, nVal);
            }
        }