Exemplo n.º 1
0
 public static String identifyChars(CharIdentifier identifier, Image image, ref int count)
 {
     try
     {
         return(identifier.identifyChars(image));
     }
     catch (UnknownCharException ex)
     {
         Console.WriteLine("Saving image");
         saveBitmap("bet", count++, toBitmap(ex.image));
         return("?");
     }
 }
Exemplo n.º 2
0
 private String identifyChars(Image image)
 {
     try
     {
         return(identifier.identifyChars(image));
     }
     catch (UnknownCharException ex)
     {
         if (SAVE_UNKNOWN_IMAGES)
         {
             saveBitmap("controls", (int)DateTime.Now.Ticks, ImageTools.toBitmap(ex.image));
         }
         return("?");
     }
 }
Exemplo n.º 3
0
 private String identifyChars(CharIdentifier identifier, Image image)
 {
     try
     {
         return(identifier.identifyChars(image));
     }
     catch (UnknownCharException ex)
     {
         try
         {
             Log.Warn("Unknown char in lobby");
             if (SAVE_UNKNOWN)
             {
                 saveBitmap("lobby", 0, toBitmap(ex.image));
             }
         }
         catch (Exception)
         {
         }
         return("?");
     }
 }
Exemplo n.º 4
0
 public static String identifyChars(CharIdentifier identifier, Image image)
 {
     try
     {
         return(identifier.identifyChars(image));
     }
     catch (UnknownCharException ex)
     {
         try
         {
             Console.WriteLine("Unknown");
             if (SAVE_UNKNOWN)
             {
                 saveBitmap("lobby", 0, toBitmap(ex.image));
             }
         }
         catch (Exception)
         {
         }
         return("?");
     }
 }