Example #1
0
        /// <summary>
        /// 字符转换为纵向排列方式
        /// </summary>
        /// <param name="str">字符</param>
        /// <returns>字符</returns>
        public static FCVerticalAlign convertStrToVerticalAlign(String str)
        {
            str = str.ToLower();
            FCVerticalAlign verticalAlign = FCVerticalAlign.Middle;

            if (str == "bottom")
            {
                verticalAlign = FCVerticalAlign.Bottom;
            }
            else if (str == "inherit")
            {
                verticalAlign = FCVerticalAlign.Inherit;
            }
            else if (str == "top")
            {
                verticalAlign = FCVerticalAlign.Top;
            }
            return(verticalAlign);
        }
Example #2
0
        /// <summary>
        /// 纵向排列方式转换为字符
        /// </summary>
        /// <param name="verticalAlign">横向排列方式</param>
        /// <returns>字符</returns>
        public static String convertVerticalAlignToStr(FCVerticalAlign verticalAlign)
        {
            String str = "";

            if (verticalAlign == FCVerticalAlign.Bottom)
            {
                str = "Bottom";
            }
            else if (verticalAlign == FCVerticalAlign.Inherit)
            {
                str = "Inherit";
            }
            else if (verticalAlign == FCVerticalAlign.Middle)
            {
                str = "Middle";
            }
            else if (verticalAlign == FCVerticalAlign.Top)
            {
                str = "Top";
            }
            return(str);
        }