SetParam() public method

Sets param values from script values. Subclasses can define their own params in addition to what this base class already defines.
public SetParam ( string param, string val ) : bool
param string
val string
return bool
示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="line"></param>
        /// <param name="overlay"></param>
        /// <param name="element"></param>
        private void ParseElementAttrib(string line, Overlay overlay, OverlayElement element)
        {
            var parms = line.Split(' ');

            // get a string containing only the params
            var paramLine = line.Substring(line.IndexOf(' ', 0) + 1);

            // set the param, and hopefully it exists
            if (!element.SetParam(parms[0].ToLower(), paramLine))
            {
                LogManager.Instance.Write("Bad element attribute line: {0} for element '{1}'", line, element.Name);
            }
        }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="line"></param>
        /// <param name="overlay"></param>
        /// <param name="element"></param>
        private void ParseElementAttrib(string line, Overlay overlay, OverlayElement element)
        {
            string[] parms = line.Split(' ');

            // get a string containing only the params
            string paramLine = line.Substring(line.IndexOf(' ', 0) + 1);

            // set the param, and hopefully it exists
            if (!element.SetParam(parms[0].ToLower(), paramLine))
            {
                log.WarnFormat("Bad element attribute line: {0} for element '{1}'", line, element.Name);
            }
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="line"></param>
        /// <param name="overlay"></param>
        /// <param name="element"></param>
        private void ParseElementAttrib(string line, Overlay overlay, OverlayElement element)
        {
            string[] parms = line.Split(' ');

            // get a string containing only the params
            string paramLine = line.Substring(line.IndexOf(' ', 0) + 1);

            // set the param, and hopefully it exists
            if(!element.SetParam(parms[0].ToLower(), paramLine)) {
                log.WarnFormat("Bad element attribute line: {0} for element '{1}'", line, element.Name);
            }
        }