public static void Run() { while (true) { try { //BTC.Do(); BCH.Do(); ETH.Do(); ETC.Do(); LTC.Do(); EOS.Do(); XRP.Do(); OMG.Do(); DASH.Do(); ZEC.Do(); Thread.Sleep(1000 * 5); // 创新 ITC.Do(); NAS.Do(); RUFF.Do(); ZIL.Do(); DTA.Do(); Thread.Sleep(1000 * 5); LET.Do(); HT.Do(); THETA.Do(); HSR.Do(); QTUM.Do(); Thread.Sleep(1000 * 5); SNT.Do(); IOST.Do(); NEO.Do(); STORJ.Do(); GNT.Do(); Thread.Sleep(1000 * 5); CVC.Do(); SMT.Do(); VEN.Do(); ELF.Do(); XEM.Do(); Thread.Sleep(1000 * 5); } catch (Exception ex) { Console.WriteLine(ex.Message); } } }
public void RefreshChoice() { ActiveChoices = new List <ConversationChoice>(); foreach (ConversationChoice CVC in Choices) { if (CVC.Active()) { ActiveChoices.Add(CVC); } } }
/// <summary> /// Returns true if PaymentResponse instances are equal /// </summary> /// <param name="other">Instance of PaymentResponse to be compared</param> /// <returns>Boolean</returns> public bool Equals(PaymentResponse other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( CurrencyCode == other.CurrencyCode || CurrencyCode != null && CurrencyCode.Equals(other.CurrencyCode) ) && ( Amount == other.Amount || Amount != null && Amount.Equals(other.Amount) ) && ( CVC == other.CVC || CVC != null && CVC.Equals(other.CVC) ) && ( CardNumber == other.CardNumber || CardNumber != null && CardNumber.Equals(other.CardNumber) ) && ( FullName == other.FullName || FullName != null && FullName.Equals(other.FullName) ) && ( CardExpiryDate == other.CardExpiryDate || CardExpiryDate != null && CardExpiryDate.Equals(other.CardExpiryDate) ) && ( RequestDate == other.RequestDate || RequestDate != null && RequestDate.Equals(other.RequestDate) )); }
internal void SetPaymentDataWithValidations(StorefrontData storefront) { //paymentMethod.ClickButton(); //paymentMethodList.ClickButton(); Browser.SwitchToFrame(iFrame.GetElement()); cardNumber.InputKey(storefront.InvalidCardNumber); Browser.SwitchToDefaultContent(); Assert.AreEqual(ErrorMessages.InvalidCardNum, paymentsError.GetElementValue()); Driver.SwitchTo().Frame(iFrame.GetElement()); cardNumber.InputKey(storefront.ValidCardNumber); Driver.SwitchTo().DefaultContent(); if (DictionaryProperties.Details["ScenarioName"].Contains(_appSettings.ScenarioName.PromoteDesign)) { ElementLocatorExtensions.GetElementXpath(commonButton, "Next").ClickButton(); } else { ElementLocatorExtensions.GetElementXpath(commonButton, "Add Card").ClickButton(); } Assert.AreEqual(ErrorMessages.RequiredExpError, paymentsError.GetElementValue()); Driver.SwitchTo().Frame(iFrame.GetElement()); expires.InputKey(storefront.InvalidExpires); Driver.SwitchTo().DefaultContent(); Assert.AreEqual(ErrorMessages.InvaidExp, paymentsError.GetElementValue()); Driver.SwitchTo().Frame(iFrame.GetElement()); expires.InputKey(storefront.ValidExpires); CVC.InputKey(storefront.InvalidCVC); Driver.SwitchTo().DefaultContent(); if (DictionaryProperties.Details["ScenarioName"].Contains(_appSettings.ScenarioName.PromoteDesign)) { ElementLocatorExtensions.GetElementXpath(commonButton, "Next").ClickButton(); } else { ElementLocatorExtensions.GetElementXpath(commonButton, "Add Card").ClickButton(); } Assert.AreEqual(ErrorMessages.RequiredCVC, paymentsError.GetElementValue()); Driver.SwitchTo().Frame(iFrame.GetElement()); CVC.InputKey(storefront.ValidCVC); Driver.SwitchTo().DefaultContent(); if (DictionaryProperties.Details["ScenarioName"].Contains(_appSettings.ScenarioName.PromoteDesign)) { ElementLocatorExtensions.GetElementXpath(commonButton, "Next").ClickButton(); } else { ElementLocatorExtensions.GetElementXpath(commonButton, "Add Card").ClickButton(); } Assert.AreEqual(ErrorMessages.RequiredPostal, paymentsError.GetElementValue()); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (CurrencyCode != null) { hashCode = hashCode * 59 + CurrencyCode.GetHashCode(); } if (Amount != null) { hashCode = hashCode * 59 + Amount.GetHashCode(); } if (CVC != null) { hashCode = hashCode * 59 + CVC.GetHashCode(); } if (CardNumber != null) { hashCode = hashCode * 59 + CardNumber.GetHashCode(); } if (FullName != null) { hashCode = hashCode * 59 + FullName.GetHashCode(); } if (CardExpiryDate != null) { hashCode = hashCode * 59 + CardExpiryDate.GetHashCode(); } if (RequestDate != null) { hashCode = hashCode * 59 + RequestDate.GetHashCode(); } if (SendingBankName != null) { hashCode = hashCode * 59 + SendingBankName.GetHashCode(); } if (RecievingBankName != null) { hashCode = hashCode * 59 + RecievingBankName.GetHashCode(); } return(hashCode); } }
/// <summary> /// Checks whether or not the <see cref="CVC"/> property is valid. /// </summary> /// <returns><see langword="true"> if valid, <see langword="false"> otherwise</returns> public bool ValidateCVC() { if (string.IsNullOrWhiteSpace(CVC)) { return(false); } string cvcValue = CVC.Trim(); string updatedType = GetBrand(); bool validLength = (updatedType == null && cvcValue.Length >= 3 && cvcValue.Length <= 4) || (AMERICAN_EXPRESS.Equals(updatedType) && cvcValue.Length == 4) || cvcValue.Length == 3; return(StripeTextUtils.IsWholePositiveNumber(cvcValue) && validLength); }
IEnumerator winCountDown() { if (player1score > player2score) { playerWinningTextD1.text = "Green Holds All Holofields"; playerWinningTextD2.text = "Green Holds All Holofields"; playerWinningTextD3.text = "Green Holds All Holofields"; } else if (player2score > player1score) { playerWinningTextD1.text = "Blue Holds All Holofields"; playerWinningTextD2.text = "Blue Holds All Holofields"; playerWinningTextD3.text = "Blue Holds All Holofields"; } while (winCountDownTime >= 0 && isWinCountDownActive && !stopWinCountDown) { yield return(new WaitForSeconds(1)); winCountDownTime--; ToggleUIText3(winCountDownTextD1, winCountDownTextD2, winCountDownTextD3, winCountDownTime); if (winCountDownTime <= 5) { if (winCountDownTime == 5) { CVCvalue = 0; } CVC.setValue(CVCvalue); if (CVCvalue < 6) { CVCvalue = CVCvalue + 1; } Countdown.start(); } } if (winCountDownTime < 1 && !stopWinCountDown) { Time.timeScale = 0; WinScreen(); } yield return(new WaitForEndOfFrame()); //yield return new WaitWhile(() => winCountDownTime >= 0); }
IEnumerator GameRoundCountdown() { while (roundCountdownTime > 0 && isGameRoundTimerRunning) { yield return(new WaitForSeconds(1)); roundCountdownTime--; ToggleUIText3(roundCountdownText_D1, roundCountdownText_D2, roundCountdownText_D3, roundCountdownTime); if (roundCountdownTime <= 5) { if (roundCountdownTime == 5) { CVCvalue = 0; } CVC.setValue(CVCvalue); if (CVCvalue < 6) { CVCvalue = CVCvalue + 1; } Countdown.start(); } } if (roundCountdownTime <= 0 && player1score == player2score) { isGameRoundTimerRunning = false; StartCoroutine(Overtime()); } else if (roundCountdownTime <= 0) { isGameRoundTimerRunning = false; Time.timeScale = 0; WinScreen(); } yield return(new WaitForEndOfFrame()); }
// The validations above will be the first to execute. public IEnumerable <ValidationResult> Validate(ValidationContext validationContext) { int currentyear = DateTime.Now.Year; int currentmonth = DateTime.Now.Month; if (currentyear > ExpiryYear) { yield return(new ValidationResult("Card has already been expired", new string[] { "ExpiryYear", "ExpiryMonth" })); } if (currentyear == ExpiryYear && currentmonth > ExpiryMonth) { yield return(new ValidationResult("Card has already been expired", new string[] { "ExpiryYear", "ExpiryMonth" })); } int cvclength = CVC.ToString().Length; if (cvclength != 3) { yield return(new ValidationResult("CVC must be exactly 3 digits long", new string[] { "CVC" })); } yield return(ValidationResult.Success); }