Ejemplo n.º 1
0
 private void cmbQuestionNum_SelectedIndexChanged(object sender, EventArgs e)
 {
     string qNum = cmbQuestionNum.SelectedItem.ToString();
     string question = txtQuestionDesc.Text;
     string answerA = txtA.Text;
     string answerB = txtB.Text;
     string answerC = txtC.Text;
     string answerD = txtD.Text;
     string extension = writeExt;
     string questionPlusAnswers = "";
     if (question == "")
     {
         question = "*";
     }
     if (answerA == "")
     {
         answerA = "*";
     }
     if (answerB == "")
     {
         answerB = "*";
     }
     if (answerC == "")
     {
         answerC = "*";
     }
     if (answerD == "")
     {
         answerD = "*";
     }
     IPCFileProducer createNewMessage = new IPCFileProducer();
         questionPlusAnswers = qNum + "|" + question + "|";
         questionPlusAnswers += answerA + "|" + answerB + "|" + answerC + "|" + answerD;
         createNewMessage.WriteData(questionPlusAnswers, "changeQuestionAnswer", directory + extension);//write question into file
 }
Ejemplo n.º 2
0
 private void rdbd_CheckedChanged(object sender, EventArgs e)
 {
     string extension = writeExt;
     string usersAnswer = "";
     IPCFileProducer createNewMessage = new IPCFileProducer();
     usersAnswer = currentQuestionCounter + rdbd.Text;
     createNewMessage.WriteData(usersAnswer, userName, directory + extension);//write question into file
     timeLeft = 20;
     currentQuestionCounter++;
 }