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("?"); } }
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("?"); } }
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("?"); } }
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("?"); } }