Ejemplo n.º 1
0
 /// <summary>
 /// This method is called to handle everytime a survey is received.
 /// </summary>
 /// <param name="survey"></param>
 private void HandleReceivedSurvey(SurveyRequestBto survey)
 {
     if (_fSurvAnswer.Visible is false)
     {
         _fSurvAnswer.ShowDialog(this);
     }
 }
        public async Task <bool> SendAsync(SurveyRequestBto requestBto)
        {
            _logger.LogInformation("Call SignalR to send the Request");
            await _hub.Invoke("SendSurvey", requestBto);

            return(true);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// This event is fired everytime a survey is received from the server.
 /// Handle appropriately.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e">instance of SurveyRequestBto</param>
 private void surveyReceived(object sender, SurveyRequestBto e)
 {
     _logger.LogInformation($"Received a Survey : {e.Question}");
     if (InvokeRequired)
     {
         Invoke(_receivedSurvey, e);
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Teacher uses this method to send survey to all students.
 /// </summary>
 /// <param name="requestBto"></param>
 public void SendSurvey(SurveyRequestBto requestBto)
 {
     //Student App constantly monitory for this method for any surveys
     Clients.All.publishSurvey(requestBto);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// This method is called to handle everytime a survey is received.
 /// Change this method to display a Form Control.
 /// </summary>
 /// <param name="survey"></param>
 private void HandleReceivedSurvey(SurveyRequestBto survey)
 {
     StuSurveyQuestion.Text = survey.Question;
     radioGroupStudentAnswer.Properties.Items[0].Description = survey.Answer1;
     radioGroupStudentAnswer.Properties.Items[1].Description = survey.Answer2;
 }
Ejemplo n.º 6
0
 private void OnSurveyReceived(SurveyRequestBto requestBto) => SurveyReceived?.Invoke(this, requestBto);