Esempio n. 1
0
 private static string MakeLazyWestKey(LFont font)
 {
     if (lazyKey == null)
     {
         lazyKey = new StringBuilder();
         lazyKey.Append(font.GetFontName().ToLower());
         lazyKey.Append(font.GetStyle());
         lazyKey.Append(font.GetSize());
     }
     else
     {
         lazyKey.Clear();
         lazyKey.Append(font.GetFontName().ToLower());
         lazyKey.Append(font.GetStyle());
         lazyKey.Append(font.GetSize());
     }
     return(lazyKey.ToString());
 }
Esempio n. 2
0
        public static string MakeStringLazyKey(LFont font, string text)
        {
            int hashCode = 0;

            hashCode = LSystem.Unite(hashCode, font.GetSize());
            hashCode = LSystem.Unite(hashCode, font.GetStyle());
            if (lazyKey == null)
            {
                lazyKey = new StringBuilder();
                lazyKey.Append(font.GetFontName().ToLower());
                lazyKey.Append(hashCode);
                lazyKey.Append(split);
                lazyKey.Append(text);
            }
            else
            {
                lazyKey.Clear();
                lazyKey.Append(font.GetFontName().ToLower());
                lazyKey.Append(hashCode);
                lazyKey.Append(split);
                lazyKey.Append(text);
            }
            return(lazyKey.ToString());
        }
Esempio n. 3
0
 private static string MakeLazyWestKey(LFont font)
 {
     if (lazyKey == null)
     {
         lazyKey = new StringBuilder();
         lazyKey.Append(font.GetFontName().ToLower());
         lazyKey.Append(font.GetStyle());
         lazyKey.Append(font.GetSize());
     }
     else
     {
         lazyKey.Clear();
         lazyKey.Append(font.GetFontName().ToLower());
         lazyKey.Append(font.GetStyle());
         lazyKey.Append(font.GetSize());
     }
     return lazyKey.ToString();
 }
Esempio n. 4
0
 public static string MakeStringLazyKey(LFont font, string text)
 {
     int hashCode = 0;
     hashCode = LSystem.Unite(hashCode, font.GetSize());
     hashCode = LSystem.Unite(hashCode, font.GetStyle());
     if (lazyKey == null)
     {
         lazyKey = new StringBuilder();
         lazyKey.Append(font.GetFontName().ToLower());
         lazyKey.Append(hashCode);
         lazyKey.Append(split);
         lazyKey.Append(text);
     }
     else
     {
         lazyKey.Clear();
         lazyKey.Append(font.GetFontName().ToLower());
         lazyKey.Append(hashCode);
         lazyKey.Append(split);
         lazyKey.Append(text);
     }
     return lazyKey.ToString();
 }