/// <summary> /// Extracting Equation only from HML /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void extractEquation_Click(object sender, EventArgs e) { string myText = ConvertHwp2Hml(); //originalText.Text = myText; List <string> eqList = ExtractEq.ExtractEquation(myText); string outText = ""; string inText = ""; if (eqList == null || eqList.Count <= 0) { outText = "추출된 수식이 없습니다.."; } else { for (int i = 0; i < eqList.Count; i++) { inText = inText + eqList[i] + "\n"; //Remove unuseful delimeters outText = outText + ExtractEq.removingDelimeterOfEq(eqList[i]) + "\n"; } } originalText.Text = inText; extractedText.Text = outText; }
/// <summary> /// Extracting Equation in first and foloowed TEXT from HML /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ExtTextAndEq_Click(object sender, EventArgs e) { string myText = ConvertHwp2Hml(); // Extracting EQUATION List <string> myListEq = ExtractEq.ExtractEquation(myText); string outText = ""; string inText = ""; if (myListEq == null || myListEq.Count <= 0) { outText = "추출된 수식이 없습니다.."; } else { for (int i = 0; i < myListEq.Count; i++) { inText = inText + myListEq[i]; //Remove unuseful delimeters outText = outText + ExtractEq.removingDelimeterOfEq(myListEq[i]) + "\n"; } } // Extracting TEXT List <string> myListText = ExtractEq.ExtractText(myText); if (myListText == null || myListText.Count <= 0) { outText = outText + "====추출된 TEXT가 없습니다..====="; } else { for (int i = 0; i < myListText.Count; i++) { inText = inText + myListText[i]; outText = outText + myListText[i] + "\n"; } } originalText.Text = inText; extractedText.Text = outText; }