Beispiel #1
0
 public static Font CreateFont(string name, float size)
 {
     try {
         return(new Font(name, size));
     }
     catch (ArithmeticException) {
         //JSPagerの件で対応。msvcr71がロードできない環境もあるかもしれないので例外をもらってはじめて呼ぶようにする
         Win32.ClearFPUOverflowFlag();
         return(new Font(name, size));
     }
 }
Beispiel #2
0
        public static Font CreateFont(string name, float size)
        {
            bool flag = false;

            do
            {
                try {
                    return(new Font(name, size));
                }
                catch (ArithmeticException) {
                    if (!flag)
                    {
                        Win32.ClearFPUOverflowFlag();
                        flag = true;
                    }
                    else
                    {
                        throw;
                    }
                }
            } while(true);
        }
Beispiel #3
0
        public static Font CreateFont(string name, float size)
        {
            bool flag = false;

            do
            {
                try {
                    return(new Font(name, size));
                }
                catch (ArithmeticException) {
                    //JSPagerの件で対応。msvcr71がロードできない環境もあるかもしれないので例外をもらってはじめて呼ぶようにする
                    if (!flag)
                    {
                        Win32.ClearFPUOverflowFlag();
                        flag = true;
                    }
                    else                     //既に実行してだめならあきらめる
                    {
                        throw;
                    }
                }
            } while(true);
        }