public JazzImageDefinition(int width, int height) { _transforms = new List <TransformParent>(); _numTransforms = TransformVoting.GetNumTransforms(); for (int i = 0; i < (_numTransforms - 1); i++) { //_transforms.Add(SelectRandomTransform()); if (i % 3 == 0) { _transforms.Add(TransformVoting.GetColorTransform()); } else { _transforms.Add(TransformVoting.GetCoordTransform()); } } _transforms.Add(TransformVoting.GetColorTransform()); // For QAing specific transforms //_transforms.Add(new Swirl()); //_transforms.Add(new HorizontalStripe()); //_transforms.Add(new VerticalStripe()); _width = width; _height = height; }
public void VoteDown() { double voteAmount = 1.0 / _numTransforms; voteAmount = -voteAmount; TransformVoting.RecordVotes(_transforms, _numTransforms, voteAmount); }
private void VoteDownButton_Click(object sender, EventArgs e) { _jazzImage.VoteDown(); VoteUpButton.Enabled = false; VoteDownButton.Enabled = false; VotesLabel.Text = Convert.ToString(TransformVoting.GetNumVotes()); }