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(); }; }
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(); }; }