private void _recaptcha_OnServiceStatusInfoCallback(object sender, CaptchaServiceInfoEventArgs eventArgs) { try { var t = $"{Math.Round(eventArgs.Balance, 2)} RUB"; var mb = eventArgs.Balance < MinBalance; //Balance status if (ssRuCaptcha.InvokeRequired) { ssRuCaptcha.BeginInvoke(new MethodInvoker(() => { tsslBalanceValue.ForeColor = mb ? Color.DarkRed : Color.Green; tsslBalanceValue.Text = mb ? $"{t} (We need to replenish the balance)" : t; })); } } catch (Exception e) { this._l.Exception(e); } }
protected virtual void InvokeServiceStatusInfoCallback(CaptchaServiceInfoEventArgs eventargs) { OnServiceStatusInfoCallback?.Invoke(this, eventargs); }