Esempio n. 1
0
 public FMain1(ILogger <FMain1> logger,
               ICourseService courseService,
               IConfiguration configuration,
               IStorageLocatorFactoryService storageFactory,
               ISurveyResponseService surveyResponse,
               FormSurveyAnswer fSurvAnswer,
               FormQuestionAnswer fQuestAnswer,
               IQuestionResponseService questionResponse,
               IServiceProvider services,
               IScreenSelectorService screenSelectorService,
               ICaptureScreenService captureScreenService,
               IImageToTextService imageToText,
               IServiceProvider serviceProvider)
 {
     InitializeComponent();
     _logger                = logger;
     _courseService         = courseService;
     _storageFactory        = storageFactory;
     _surveyResponse        = surveyResponse;
     _fSurvAnswer           = fSurvAnswer;
     _fQuestAnswer          = fQuestAnswer;
     _services              = services;
     _screenSelectorService = screenSelectorService;
     _captureScreenService  = captureScreenService;
     _imageToText           = imageToText;
     _appName               = configuration.GetValue <string>("Title");
     _questionResponse      = questionResponse;
     //implement Audio feature
     //initAudio();
     _receivedSurvey   = HandleReceivedSurvey;
     _receivedQuestion = HandleReceivedQuestion;
     richEditControl1.ContentChanged    += RichEditControl1_ContentChanged;
     _surveyResponse.SurveyReceived     += surveyReceived;
     _questionResponse.QuestionReceived += questionReceived;
     //questionResponse.QuestionReceived += async (s, e) =>
     //{
     //    await questionResponse.SendAsync(new Domain.Btos.Question.QuestionResponseBto
     //    {
     //        StudentId = Program.Username,//"email.com",
     //        SelectedAnswer = 1
     //    });
     //};
     //screenSelectorService.OnSelectedScreenChanged += (s, e) =>
     //{
     //    SelectedLectureWindow = e;
     //    initAudio();
     //};
     this.FormClosed += (s, e) =>
     {
         var fLogin = serviceProvider.GetRequiredService <FormLoginStudent>();
         fLogin.Close();
         Application.Exit();
     };
 }
Esempio n. 2
0
 public QAController(
     ILogService staffLog,
     ITutorService tutorService,
     IUserService userService,
     IQuestionRequestService questionRequestService,
     IQuestionResponseService questionResponseService,
     IGradeService gradeService)
 {
     _staffLog                = staffLog;
     _tutorService            = tutorService;
     _userService             = userService;
     _questionRequestService  = questionRequestService;
     _questionResponseService = questionResponseService;
     _gradeService            = gradeService;
 }
Esempio n. 3
0
 public FMain(ILogger <FMain> logger,
              ICourseService courseService,
              IConfiguration configuration,
              IStorageLocatorFactoryService storageFactory,
              ISurveyResponseService surveyResponse,
              FormSurveyAnswer fSurvAnswer,
              IQuestionResponseService questionResponse,
              IServiceProvider services,
              IScreenSelectorService screenSelectorService,
              ICaptureScreenService captureScreenService,
              IImageToTextService imageToText)
 {
     InitializeComponent();
     _logger                = logger;
     _courseService         = courseService;
     _storageFactory        = storageFactory;
     _surveyResponse        = surveyResponse;
     _fSurvAnswer           = fSurvAnswer;
     _services              = services;
     _screenSelectorService = screenSelectorService;
     _captureScreenService  = captureScreenService;
     _imageToText           = imageToText;
     _appName               = configuration.GetValue <string>("Title");
     //implement Audio feature
     //initAudio();
     _receivedSurvey = HandleReceivedSurvey;
     richEditControl1.ContentChanged   += RichEditControl1_ContentChanged;
     _surveyResponse.SurveyReceived    += surveyReceived;
     questionResponse.QuestionReceived += async(s, e) =>
     {
         await questionResponse.SendAsync(new Domain.Btos.Question.QuestionResponseBto
         {
             StudentId      = "email.com",
             SelectedAnswer = 1
         });
     };
     screenSelectorService.OnSelectedScreenChanged += (s, e) =>
     {
         SelectedLectureWindow = e;
         initAudio();
     };
 }
Esempio n. 4
0
        public FormQuestionAnswer(IQuestionResponseService questionResponse)
        {
            InitializeComponent();
            _question = questionResponse;

            _question.QuestionReceived += async(s, e) =>
            {
                if (InvokeRequired)
                {
                    Invoke((Action) delegate()
                    {
                        HandleReceivedQuestion(e);
                    });
                }
                else
                {
                    HandleReceivedQuestion(e);
                }
            };
        }