示例#1
0
        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);
            }
        }
示例#2
0
 protected virtual void InvokeServiceStatusInfoCallback(CaptchaServiceInfoEventArgs eventargs)
 {
     OnServiceStatusInfoCallback?.Invoke(this, eventargs);
 }