public RetrieveVotesForm(QuestionSlideConfiguration question) { InitializeComponent(); ClearVotes(); InitCronometer(); _keyStatusValues = new KeyStatusValues(); QuestionAssociated = question; Load += new EventHandler(RetrieveVotesForm_Load); }
internal static QuestionSlideConfiguration GenerateDefaultConfig(int slideId) { var config = new QuestionSlideConfiguration() { SlideId = slideId, //SlideAssociated = PowerPointHelper.FindSlideById(slideId), QuetionTitle = "Pregunta 1", Answers = new List<AnswerEntity>(), IsNew = true, Computation = new AnswerComputation() }; config.Answers.Add(new AnswerEntity(config) { Id = 1, Points = 0, Text = "Respuesta A", VotesCount = 0, Time=0}); config.Answers.Add(new AnswerEntity(config) { Id = 2, Points = 0, Text = "Respuesta B", VotesCount = 0, Time = 0 }); config.Answers.Add(new AnswerEntity(config) { Id = 3, Points = 0, Text = "Respuesta C", VotesCount = 0, Time = 0 }); config.Answers.Add(new AnswerEntity(config) { Id = 4, Points = 0, Text = "Respuesta D", VotesCount = 0, Time = 0 }); return config; }
private void SetConfiguration(Data.QuestionSlideConfiguration config) { this.grdQuestions.DataSource = config.Answers; this.txtQuestionTitle.Text = config.QuetionTitle; this.cboPuntCalc.SelectedIndex = config.Computation.GetIntType(); this.chkAcumTimePoints.Checked = config.Computation.TakeTime; this.rdbCronoAnimacion.Checked = config.ShowCronometerAnimation; this.chkVotesCounter.Checked = config.IsNew ? true : config.ShowCounterVotes; _currentConfiguration = config; }
internal void SaveQuestionConfiguration(QuestionSlideConfiguration config) { config.IsNew = false; QuestionSlideConfigurations.Add(config); }
public AnswerEntity(QuestionSlideConfiguration parent) { this.Parent = parent; Votes = new List<VotesFlat>(); }