/// <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); }
/// <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); } }
/// <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); }
/// <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; }
private void OnSurveyReceived(SurveyRequestBto requestBto) => SurveyReceived?.Invoke(this, requestBto);