private void nextButton_Click(object sender, RoutedEventArgs e) { if (nextButton.Content.Equals("Next")) { //근무자가 임의로 분류된 코드를 바꿨을 시에 변경한 코드로 매뉴얼을 제시해줌 additionalQuestion.ShowClassifiedManuals(mainQuestion.codeText.Text); SaveCurrentEventVO(); if (currentEvent.EventLOCATION == "") { toastViewModel.ShowError("Location data is missing. Ask where is the accident scene."); return; } else if (currentEvent.EventPROBLEM == "") { toastViewModel.ShowError("Problem data is missing. Ask what is the problem."); return; } additionalQuestion.location.Text = currentEvent.EventLOCATION; //MainPage, MainQuestion, AdditionalQuestion CurrentEvent VO 동기화 작업 mainQuestion.CurrentEventVO = currentEvent; additionalQuestion.CurrentEventVO = currentEvent; //PrintCurrentEvent(currentEvent);//VO 객체 값 할당된 거 확인하는 용도, 나중에 지울 것 mainFrame.Content = additionalQuestion; nextButton.Content = "Previous"; } else { SynchronizeEventData(); //MainPage, MainQuestion, AdditionalQuestion CurrentEvent VO 동기화 작업 currentEvent = additionalQuestion.CurrentEventVO; mainQuestion.CurrentEventVO = currentEvent; //카테고리가 나오기 전에 다음 화면으로 넘어갔을 경우 현재사건VO 객체에 코드 정보가 저장이 안 되어있기 때문에, //다음 화면(AdditionalQuestion 화면)에서 카테고리 결과가 출력되면 VO 객체에 값을 넣어줌 currentEvent.EventCODE = mainQuestion.classifiedResult; mainQuestion.codeText.Text = currentEvent.EventCODE; //PrintCurrentEvent(currentEvent);//VO 객체 값 할당된 거 확인하는 용도, 나중에 지울 것 mainFrame.Content = mainQuestion; nextButton.Content = "Next"; } }
private async void Run(string keyWords) { this.codeText.Text = await TextClassificationAsync(keyWords); //this.textClassify.IsEnabled = true; loadingAnimation.Visibility = Visibility.Hidden; //분류된 카테고리에 대한 매뉴얼 출력후 Toast알림 띄우기, 현재 EventVO에 분류 결과 저장 additionalQuestion.ShowClassifiedManuals(classifiedResult); toastViewModel.ShowWarning("Event Classification : " + classifiedResult); //코드 분석 완료 텍스트 박스 배경색 변경 codeText.Background = pointColorSolidColorBrush; currentEvent.EventCODE = classifiedResult; }