private void Reveal() { if (Answer.IsCorrect) { ButtonCssClass.Add("correct"); } else { ButtonCssClass.Add("wrong"); } }
private Control CreateControl(string commandName, string buttonText, int fieldIndex, string imageUrl) { var ib = new ImageButton(); ib.ImageUrl = imageUrl; ib.AlternateText = HttpUtility.HtmlDecode(buttonText); ((IButtonControl)ib).Text = buttonText; ib.CommandName = commandName; ib.CommandArgument = fieldIndex.ToString(CultureInfo.InvariantCulture); if (ib != null && !ButtonCssClass.HasValue()) { ib.CssClass = ButtonCssClass; } return(ib); }
public override int GetHashCode() { int ret = 0; // Base the calculation on the properties that are copied in CopyProperties ret |= ButtonCssClass.GetHashCode(); ret |= ButtonType.GetHashCode(); ret |= FirstPageImageUrl.GetHashCode(); ret |= FirstPageText.GetHashCode(); ret |= LastPageImageUrl.GetHashCode(); ret |= LastPageText.GetHashCode(); ret |= NextPageImageUrl.GetHashCode(); ret |= NextPageText.GetHashCode(); ret |= PreviousPageImageUrl.GetHashCode(); ret |= PreviousPageText.GetHashCode(); ret |= ShowFirstPageButton.GetHashCode(); ret |= ShowLastPageButton.GetHashCode(); ret |= ShowNextPageButton.GetHashCode(); ret |= ShowPreviousPageButton.GetHashCode(); return(ret); }