public static int GetGoldAmount() { //Requires ColorSpace == GrayScale || Color (This Means a check needs to be added to see if the value is -1 retry with ColorSpace == Color. string MoneyText = GetOcrResponse(TextConstants.GOLD_START, TextConstants.GOLD_START_SIZE, "2"); MoneyText = MoneyText.ToLower(); MessageBox.Show(MoneyText); int MoneyValue; if (MoneyText.EndsWith("k")) { MoneyValue = MultiplyValue(MoneyText, 1000); } else if (MoneyText.EndsWith("m")) { MoneyValue = MultiplyValue(MoneyText, 1000000); } else { MoneyValue = StringToInt(MoneyText); } MessageBox.Show(MoneyValue.ToString()); return(MoneyValue); }
public static string GetMoneySqlValue() { return($"{MoneyValue.ToString(CultureInfo.InvariantCulture)}"); }