Esempio n. 1
0
        public void SetParameter(int nProp, Parameter value)
        {
            int num = PropertyFunc.ExGetNumProps(base.m_pItem);

            if ((nProp >= 0) && (nProp < num))
            {
                bool flag = false;
                if (PropertyFunc.ExGetPropType(base.m_pItem, nProp) == 1)
                {
                    flag = PropertyFunc.ExSetInt(base.m_pItem, nProp, value.IntValue) != 0;
                }
                else if (PropertyFunc.ExGetPropType(base.m_pItem, nProp) == 2)
                {
                    flag = PropertyFunc.ExSetFloat(base.m_pItem, nProp, value.FloatValue) != 0;
                }
                else if (PropertyFunc.ExGetPropType(base.m_pItem, nProp) == 3)
                {
                    flag = PropertyFunc.ExSetBool(base.m_pItem, nProp, value.BoolValue ? -1 : 0) != 0;
                }
                if (flag)
                {
                    PropertyFunc.ExSetDirty(base.m_pItem, nProp);
                }
            }
        }