Beispiel #1
0
        //* -----------------------------------------------------------------------*
        /// <summary>解像度列挙体に対応する解説を取得します。</summary>
        ///
        /// <param name="resolution">解像度列挙体</param>
        /// <returns>解説</returns>
        static public string ToString(EResolution resolution)
        {
            string    strRes = resolution.ToString().Replace("plus", "+").Replace("43", "");
            Rectangle rect   = CResolution.toRect(resolution);

            return(strRes + string.Format("({0}x{1})", rect.Width, rect.Height));
        }
Beispiel #2
0
        //* -----------------------------------------------------------------------*
        /// <summary>解像度列挙体に対応する解説を取得します。</summary>
        ///
        /// <param name="resolution">解像度列挙体。</param>
        /// <returns>解説。</returns>
        /// <exception cref="System.ArgumentOutOfRangeException">
        /// 予約値を設定しようとした場合。
        /// </exception>
        public static string getDescription(this EResolution resolution)
        {
            string strRes = resolution.ToString().Replace("plus", "+");
            Point  pos    = resolution.getXY();

            return(strRes + string.Format(
                       "({0}x{1})", pos.X.ToString(), pos.Y.ToString()));
        }
Beispiel #3
0
        //* -----------------------------------------------------------------------*
        /// <summary>解像度列挙体に対応する解説を取得します。</summary>
        ///
        /// <param name="resolution">解像度列挙体</param>
        /// <returns>解説</returns>
        public static string ToString(this EResolution resolution)
        {
            string    strRes = resolution.ToString().Replace("plus", "+").Replace("43", string.Empty);
            Rectangle rect   = resolution.toRect();

            return(strRes + string.Format(
                       "({0}x{1})", rect.Width.ToString(), rect.Height.ToString()));
        }