Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public static string GetMoneySqlValue()
 {
     return($"{MoneyValue.ToString(CultureInfo.InvariantCulture)}");
 }