Example #1
0
        /// <summary>
        /// Gets the size of.
        /// </summary>
        /// <returns></returns>
        public int GetSizeOf()
        {
            int length = 2;

            if (soundInfo != null)
            {
                length += soundInfo.GetSizeOf();
            }
            return(length);
        }
        /// <summary>
        /// Gets the size of.
        /// </summary>
        /// <returns>Size of this object</returns>
        protected int GetSizeOf()
        {
            int res = 10;

            if (buttonSoundChar != 0 && buttonSoundInfo != null)
            {
                res += buttonSoundInfo.GetSizeOf();
            }
            if (buttonSoundChar1 != 0 && buttonSoundInfo1 != null)
            {
                res += buttonSoundInfo1.GetSizeOf();
            }
            if (buttonSoundChar2 != 0 && buttonSoundInfo2 != null)
            {
                res += buttonSoundInfo2.GetSizeOf();
            }
            if (buttonSoundChar3 != 0 && buttonSoundInfo3 != null)
            {
                res += buttonSoundInfo3.GetSizeOf();
            }

            return(res);
        }