Beispiel #1
0
        private void TestPrintXML()
        {
            int           hr;
            int           i;
            StringBuilder sb = new StringBuilder(5000);

            hr = m_ips.PrintXML(sb, sb.Capacity, out i, 4);
            DESError.ThrowExceptionForHR(hr);
        }
Beispiel #2
0
        /// <summary>
        /// Populates the supplied property setter with values from the parameter list.
        /// </summary>
        /// <param name="setter"></param>
        /// <param name="parameters"></param>
        internal static void PopulatePropertySetter(IPropertySetter setter, List <Parameter> parameters)
        {
            int hr = 0;

            foreach (Parameter param in parameters)
            {
                DexterParam dexterParam;
                dexterParam.Name    = param.Name;
                dexterParam.dispID  = param.DispId;
                dexterParam.nValues = 1 + param.Intervals.Count;
                DexterValue[] valueArray = new DexterValue[dexterParam.nValues];
                valueArray[0].v        = param.Value;
                valueArray[0].rt       = 0;
                valueArray[0].dwInterp = Dexterf.Interpolate;
                for (int i = 0, valueIndex = 1; i < param.Intervals.Count; i++, valueIndex++)
                {
                    Interval interval = param.Intervals[i];
                    valueArray[valueIndex].v  = interval.Value;
                    valueArray[valueIndex].rt = ToUnits(interval.Time);
                    if (interval.Mode == IntervalMode.Interpolate)
                    {
                        valueArray[valueIndex].dwInterp = Dexterf.Interpolate;
                    }
                    else
                    {
                        valueArray[valueIndex].dwInterp = Dexterf.Jump;
                    }
                }

                hr = setter.AddProp(dexterParam, valueArray);
                DESError.ThrowExceptionForHR(hr);
            }

            StringBuilder builder = new StringBuilder();
            int           printed = 0;

            hr = setter.PrintXML(builder, 0, out printed, 0);
            Console.WriteLine(builder.ToString());
        }